File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error in JAXWS client web service usig dynamic url

 
Meir Yan
Ranch Hand
Posts: 599
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 471
4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at the exception. See what it said.
 
Meir Yan
Ranch Hand
Posts: 599
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 471
4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 599
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well the only indecation in the client stubs is in :


in the ApiService.java stub
what im doing wrong
 
H Paul
Ranch Hand
Posts: 471
4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(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
Posts: 599
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic