This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Services and the fly likes Error in JAXWS client web service usig dynamic url Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Error in JAXWS client web service usig dynamic url" Watch "Error in JAXWS client web service usig dynamic url" New topic
Author

Error in JAXWS client web service usig dynamic url

Meir Yan
Ranch Hand

Joined: Apr 27, 2006
Posts: 597
i have client wsdl , from it i generated java stubs like this:

now in the client i want to be able to set dynamic endpoint urls, after reading few post here i did it like this:



but when it come to real invocation of the client im getting this exception:



any idea why ?
H Paul
Ranch Hand

Joined: Jul 26, 2011
Posts: 391
Look at the exception. See what it said.
Meir Yan
Ranch Hand

Joined: Apr 27, 2006
Posts: 597
Hi
i forget the last sentence in the question ,
The error as you see that it tryes to read the wsdl file from which i compiled the stubs.
why , i dont need the wsdl after i already have the stubs , don't i ?
H Paul
Ranch Hand

Joined: Jul 26, 2011
Posts: 391
If you run wsimport OK, then you should see classes generated - Client artifacts that you called stubs.

Search among those classes where it refered to the wsdl and see why? Also look into the wsdl and see element <soap:address
Meir Yan
Ranch Hand

Joined: Apr 27, 2006
Posts: 597
well the only indecation in the client stubs is in :


in the ApiService.java stub
what im doing wrong
H Paul
Ranch Hand

Joined: Jul 26, 2011
Posts: 391
(1. A side note: you don't put the provider's wsdl in the same directory's wsimport.)
2. Look at the exception and see what it said. Read slowly.
3. Look entirely at the ApiService.java.
5. If possible, instead of using command line wsimport, use an IDE Eclipse to import the wsdl. You will see the whole flow and the exception.
Meir Yan
Ranch Hand

Joined: Apr 27, 2006
Posts: 597
i thing the answer is just " the client have to have the wsdl"
ok i found about the -wslocation parameter
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Error in JAXWS client web service usig dynamic url
 
Similar Threads
CertificateException: No name matching <hostname> found.
WSDL access error
Attempt to retrieve Sharepoint WSDL fails with “Server redirected too many times”
Web Service *Client*
JAX-WS Authentication problem -javax.xml.ws.WebServiceException Response: '401: Unauthorized'