File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java Micro Edition and the fly likes Call a web service from j2me application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Call a web service from j2me application" Watch "Call a web service from j2me application" New topic

Call a web service from j2me application

vinoth Robert
Ranch Hand

Joined: Feb 02, 2011
Posts: 31


I have created a webservice in java. it is running in tomcat server. I could call it from my java program. it works fine.
this is the url for my service:

And my requirement is to call that webservice from a mobile application.

can any one give me sample program or reference?

thanks in advance.

Ove Lindström
Ranch Hand

Joined: Mar 10, 2008
Posts: 326

What kind of mobile application? Java ME, Android, iPhone?

In Android you have the DefaultHttpClient in the SDK so yo ucan do

Then you just have to parse the response.

There are also a lot of libraries that you could use.
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 46362
Thank you for the reply, Ove Lindström.

I think this thread would sit better elsewhere. Not sure where, but I'll try somewhere and hope I get it right
Gabriel Vince

Joined: Feb 05, 2009
Posts: 24
Hello, I know this may be an obsolete topic, but I am curious what was the outpup. And I may have an idea if it fits here..
Gopinath Karyadath
Ranch Hand

Joined: Oct 14, 2009
Posts: 87

Create stub for using web service. you can use that stub class file for calling web service.
need more clarification on that I can help you.

I agree. Here's the link:
subject: Call a web service from j2me application
It's not a secret anymore!