aspose file tools*
The moose likes Web Services and the fly likes WSDL Reference in generated Client Stub. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "WSDL Reference in generated Client Stub." Watch "WSDL Reference in generated Client Stub." New topic
Author

WSDL Reference in generated Client Stub.

Jobin Mathew
Ranch Hand

Joined: Oct 17, 2006
Posts: 83
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

Joined: Aug 17, 2009
Posts: 15
better to go for wsdl to java, and use them in a jar.


SCJP1.4, SCBCD 5.0, SCDJWS, SCWCD 5.0, SCEA 5.0
Jobin Mathew
Ranch Hand

Joined: Oct 17, 2006
Posts: 83
But I am using JAXWS 2. Is there any way in JAXWS to remove this rumtime dependency with wsdl?
Manju Sebastian
Greenhorn

Joined: Aug 17, 2009
Posts: 15
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

Joined: Oct 17, 2006
Posts: 83
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

Joined: Nov 17, 2008
Posts: 19
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

Joined: Oct 17, 2006
Posts: 83
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

Joined: Oct 17, 2006
Posts: 83
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

Joined: Nov 17, 2008
Posts: 19
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

Joined: Oct 17, 2006
Posts: 83
Thanks a lot Manan.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: WSDL Reference in generated Client Stub.
 
Similar Threads
org.xml.sax.SAXException: Unregistered type: class java.lang.Object
need help to consume webservice in Java
Web Services Client Error
Parameter names in wsdl - axis2
Webservice client code generation using axis2 and eclipse galilio