Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

web service client

 
Meet Gaurav
Ranch Hand
Posts: 492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Meet Gaurav
Ranch Hand
Posts: 492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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();



 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic