File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 471
    
    4
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: 471
    
    4
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: 471
    
    4
(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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error in JAXWS client web service usig dynamic url