Meaningless Drivel is fun!*
The moose likes Java Micro Edition and the fly likes Calling Web Service method from Java ME Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Calling Web Service method from Java ME" Watch "Calling Web Service method from Java ME" New topic
Author

Calling Web Service method from Java ME

Jeffry Kristianto Yanuar
Ranch Hand

Joined: Oct 01, 2007
Posts: 759
Hi guys, I have a little problem to calling web services' method using Java ME device.

I use NetBeans to generate the Web Service client. After I generate it, now what ? How can I call the method ?



Thanks


Jeffry Kristianto Yanuar
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42047
    
  64
Is the SOAP stack you're using compatible with JME? I would imagine that you need to rewrite the client to use the classes in javax.microedition.io instead of the java.net classes (which don't exist in JME).


Ping & DNS - my free Android networking tools app
Jeffry Kristianto Yanuar
Ranch Hand

Joined: Oct 01, 2007
Posts: 759
I already called it successfully.

The key is, by creating Web services client using NetBeans feature, and then use the class XXX_stub.class to create object, and then call the object method. The XXX will be a specific Web services name.

Using NetBeans to call a web services in J2ME is as easy as calling local method.


Thanks


Jeffry Kristianto Yanuar SCJA, SCJP, SCJD
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42047
    
  64
I already called it successfully.

So the problem is solved?
Jeffry Kristianto Yanuar
Ranch Hand

Joined: Oct 01, 2007
Posts: 759
Yes it is, calling the Web Service from MIDP is easier than calling from Java Desktop application.

Jeffry Kristianto Yanuar SCJP, SCJA, SCJD
 
GeeCON Prague 2014
 
subject: Calling Web Service method from Java ME