Skip to main content

retrieve wsdl location ...

1 reply [Last post]
hoffman462
Offline
Joined: 2008-07-24
Points: 0

I have a client side stub, with a wsdl location annotation pointing to a server wsdl (which makes sense). The server wsdl is something like: https://server.domain/etc. This client side stub has been generated with wsimport.
How can i get that string from this java source file, which has been created with wsimport?
I've tried stuff like this:

<br />
// this is my generated stub<br />
ClientService cs = new ClientService();<br />
(Service(cs)).getWSDLDocumentLocation().toString();<br />

Or even:

<br />
((WebServiceClient)cs).wsdlLocation();<br />

It was my assumption that since the code was compiled and generated that it should be pretty strait forward to ask for some object to get that value?

thank you for any thoughts,

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
hoffman462
Offline
Joined: 2008-07-24
Points: 0

In reply to this:

When calling:

ClientService cs = new ClientService()
in the above scenario an exception is thrown, which provides the location of the wsdl. 
By catching the exception, and parsing e.getMessage() one is able to retrieve the wsdl location -

Unfortunately, I can't find a method that actually retrieves the WSDL location without parsing the exception -