• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

WSDL Reference in generated Client Stub.

 
Jobin Mathew
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I generated the client stubs for my Webservice using wsimport command (using JAXWS 2).
In the class generated I can see a path to my locally saved wsdl

url = new URL("file:/D:/Jobin/Tests/1.wsdl");

In this case I need to save the WSDL also.
Is there any way to avoid dependency to wsdl after the creation of client stub (like Axis 1.4)?
 
Manju Sebastian
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
better to go for wsdl to java, and use them in a jar.
 
Jobin Mathew
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But I am using JAXWS 2. Is there any way in JAXWS to remove this rumtime dependency with wsdl?
 
Manju Sebastian
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
which tool you are using, eclipse or net beans? i think there are two ways in the tool, the wsdl can be imported also.
 
Jobin Mathew
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not using any of these tools for generating client stubs.
I just execute the command wsimport from the command prompt.
 
Manan Panchal
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have generated your client using "D:/Jobin/Tests/1.wsdl".
You can use wsdl of service by "serviceURL?wsdl", so you dont have to save wsdl.

And if you don't want to hard code the file url, then there is another constructor also which accepts "URL wsdlLocation" and "QName serviceName" as paramenter.

Thanks
 
Jobin Mathew
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Manan and Manju for providing the details.

My question is, Is there any way to avoid this runtime dependency to wsdl (local/serviceendpoint?wsdl) if i am using JAXWS 2.
 
Jobin Mathew
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any way to avoid the runtime dependency to wsdl (local/serviceendpoint?wsdl) if i am using JAXWS 2 generated client stubs.
 
Manan Panchal
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, there is no way to avoid the runtime dependency.
Client has to identify the service, and for that it has to have something like "address".
 
Jobin Mathew
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Manan.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic