android webservice call - issue - java

I am a newbie to Android platform.
I want to call a webservice from android java development enviornment. Am using axis technology to connect to a webservice in java development.
Can i use the same technology here in android development also.?
one more doubt am having is am using several jar files (like axis,commons-logging,commons-httpclient) in java dev enviornment for webservice call and its implementations.
Can i use these jar files in android java dev platform.?
Experts please give me a clear idea about all these..??

if your web service is SOAP you can use KSOAP2, it enables you communicate easily with SOAP web service. if your web service is REST you can then use classes like HttpClient, HttpGet and HttpPost that exist already on Android.

Your question has already been asked here.
It isn't possible to use Axis or some other framework as is with Android. You will have to recompile all jars with Android SDK in order to do so.

Related

Developing app with web and Android client with Java

I'm going to start developing a new simple "X management" kind app, like contact management or events management. What I want to know is which tools would be the best to achieve it in the way I want.
My app needs to be a web app running on a server that has a mysql database to save and retrieve some simple information. This app must have a web client but I want it to be able to be extended to work with an Android app client.
Things I've thought:
I've worked on Java with facelets and JPA travels management app running on a GlassFish server on localhost with a JSF web view, so maybe my web client and the full app could be done with this.
I've worked with web services such as SOAP and REST with Jaxb and xml schemes to retrieve information parsing some webs into xml or json to show on a client .net app. So I've thought I can add to my app, like last topic we talked about, a REST web service layer to easily work as I want, or at least I think it would be easy. If I do this the Android app could share the same app core code but using the REST service.
My question is what could be the best way to do an app with 2 client side in different platforms that could share some code to be easy to extend it moreover to a desktop app. I've talked about these 2 options because I'm a students of computers at university and those are the tools I know, but I can easy learn more. I've also think about just a REST service and create a web and an Android client to work on same service or something like that.
This post is getting long, so here is the summary: What technologies and tools do you think are the best choice to create an java web app that needs to have web and Android client? Also what server, like tomcat, GlassFish or another, should I use? And what about persistence layer? JPA with mysql is the best I know to work with.
Thanks a lot.
P.D: I work with eclipse
From my point of view:
You can use java jersey and java spring both ( java spring as Dependency injection) for creating RESTful Web service. So, In server side you will create endpoint and you can access data from any platform through those endpoint.
Server can be anyone. It's up to you. I always try to use tomcat but tomcat is not a full JavaEE container it's only a servlet container. So if you want to use full JavaEE version then you should use Glassfish.
And yes JPA .It can be easily used in any environment supporting JPA including Java SE applications, Java EE application servers, Enterprise OSGi containers etc.
On the other hand, still choice is yours.

FunctionalTests for App Engine with the generated Cloud Endpoint Library

I have created an App Engine service that exposes a REST api. I created that with the Cloud Endpoint framework. One thing that this framework gives me is a java library that I for example can use in my Android app. That works fine.
What I want to do now is to add some testing of the endpoint. I would like to use the generated library to make calls to a running server. The Gradle App Engine plugin already support this by a build step called FunctionalTests. The only problem I have is that I have no idea how to access the generated library classes from my test. Anybody has done something like this?

Build Sip Client using Sip Servlet as signalling

I am using mobicent sip servlet and I have deployed it in JBOSS as7 successfully. But I saw testing is from the sip softphones.
I have google search alot about building our own sip client but I cannot find the proper guide.
What I have to do is using Sip Servlet as a signalling and I have to create Android client(using JAIN-SIP) and also I have to create UAC from browser.
I am confuse about how can I use my Sip Servlet application that is running on server? How I send requests(Register,Invite and so on) from client to sip servlet?
For Example this tutorial But How I create my client? :)
A little guide or small tutorial about create UAC or how to use sip servlet can help
Android has built in very simple SIP client and APIs here http://developer.android.com/reference/android/net/sip/package-summary.html. You only need your own JAIN-SIP in android if you are using some more advanced features. There are plenty of examples here https://svn.java.net/svn/jsip~svn/trunk/src/examples
I would recommend starting studying this example https://github.com/Mobicents/sip-servlets/tree/master/sip-servlets-examples/websocket-b2bua
This is the Sip Servlets application behind the bundled WebRTC demo that comes with Mobicents SIP Servlets : https://github.com/Mobicents/sip-servlets/wiki/HTML5WebRTCVideoApplication
This demo connects 2 WebRTC browsers together to have a video or audio call.
In your case, you'll need to replace one of the browsers with an Android based Client. I would recommend looking at an Android SDK that supports WebRTC. We started building one at https://github.com/Mobicents/restcomm-android-sdk which is based on JAIN-SIP but the media side doesn't fully support WebRTC yet. (Any contributions are welcome though) Altough you can use it for chat/messaging to start with and show it works.

how to build a java web service and consuming it in j2me client (with netbeans)

Anyone can give me some guidelines or resources about how to build a java web service and consuming it in j2me client application with Netbeans IDE? (Step-to-step tutorial is appreciated)
Do I have to write servlet or just normal Java class? How to invoke service from J2me client application?
How to create webservice in java in netbeans
Consuming webservice from java-me client
Nothing explain this better.

Webservice API for my Java App Engine GWT app

I'm creating a web app that runs on Google App Engine. I'm also developing a desktop client that needs to access/update data on the webapp.
I would like to create a web sevice api between the server and the client. What would be my best options?
According to GAE the do not support RMI og JAX out of the box.
I hate to answer my own question but Restlet is working on a GAE version. The current development version seems to work well.
http://wiki.restlet.org/docs_1.2/13-restlet/252-restlet.html

Categories

Resources