• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calling Web Service method from Java ME

 
Jeffry Kristianto Yanuar
Ranch Hand
Posts: 759
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
Jeffry Kristianto Yanuar
Ranch Hand
Posts: 759
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I already called it successfully.

So the problem is solved?
 
Jeffry Kristianto Yanuar
Ranch Hand
Posts: 759
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes it is, calling the Web Service from MIDP is easier than calling from Java Desktop application.

Jeffry Kristianto Yanuar SCJP, SCJA, SCJD
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic