This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Services and the fly likes web service client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "web service client" Watch "web service client" New topic
Author

web service client

Meet Gaurav
Ranch Hand

Joined: Oct 08, 2008
Posts: 492
Hi am using JAX-WS client to invoke my web service. But it's making 2 call to the server. 1 st call to check the wsdl(get call) with empty body and 2nd call post with body. But when I use axis it's making only 1 call. Could some one please help me why it's making 2 call.
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
It could be that the Axis web service stack assumes that there are no changes in the WSDL and the endpoint address used when generating the client artifacts, while the JAX-WS web service stack does indeed check.
Best wishes!


My free books and tutorials: http://www.slideshare.net/krizsan
Meet Gaurav
Ranch Hand

Joined: Oct 08, 2008
Posts: 492
Thanks for quick reply. Is there any way I can stop that ?. It's performance issue for me(2 network calls)
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
The JAX-WS specification mandates support for the Oasis XML Catalogs 1.1 specification, which enables you to redirect requests for XML schema and WSDL documents.
You could use this feature to redirect requests for the WSDL and associated XML schemas to local copies and thus avoid the network requests.
Reference:
Oasis XML Catalogs 1.1 specification: http://www.oasis-open.org/committees/download.php/14809/xml-catalogs.html
The specification includes links to examples.
Best wishes!
Meet Gaurav
Ranch Hand

Joined: Oct 08, 2008
Posts: 492
Thanks for response. Am new to web services, could you please assist me how to implement this in client code

<rewriteSystem systemIdStartString="http://www.example.com/"
rewritePrefix="file:///share/mirrors/example/"/>

As per my understanding
JavadbWebServiceService service = new JavadbWebServiceService();
JavadbWebService port = service.getJavadbWebServicePort(); ----- This is making the get call.

String currentTime = port.getTime();



 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: web service client
 
Similar Threads
Synchronous processing - Challenge
How to get details of error message
Thread , Memory , Singleton
How to use the web service client classes generated with Eclipse for consuming an axis 1.4 service ?
REST Web service makes call to another REST web service