This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Web Services and the fly likes Webservice method calls Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Webservice method calls" Watch "Webservice method calls" New topic
Author

Webservice method calls

Anjali S Sharma
Ranch Hand

Joined: Jun 29, 2005
Posts: 279
From my Java client I am instantiating a Webservice using

mySvc = serviceFactory.getRemoteService(IAcmeCustomService.class, context, "samples", "http://172.16.1.114:8888/services");

then I am calling two methods of this webservice using
AcmeServiceInfo acmeServiceInfo = mySvc.getAcmeServiceInfo();
DocTypeStatus status = mySvc.getDocTypeStatus();

The problem is that the instance variables set in getAcmeServiceInfo() are not available in getDocTypeStatus(). Is this the expected behavior? Or should the webservice instance variables be available across methods.
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9280
    
  17

I've never created one, but you should go through these articles

https://jax-ws.dev.java.net/nonav/2.1/docs/statefulWebservice.html

http://gdp.globus.org/gt4-tutorial/multiplehtml/ch03.html


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Webservice method calls
 
Similar Threads
Subclass Inheritence for protected variable
Having confusion with variable override and method override
WSDL
Help needed to convert a existing java class into webservice
Has-a relationship