You can change the url at run time without changing the stub. The service
generated by WSDL2Java has two methods to get the web service:

public x.y.z.WebService getWebService() throws
javax.xml.rpc.ServiceException;
public x.y.z.WebService getWebService(java.net.URL portAddress) throws
javax.xml.rpc.ServiceException;

If you use the second method your code look like:

WebServiceService service = new WebServiceServiceLocator();
WebService ws = service.getWebService(new
URL("http://www.your-host.com/axis/services/WebService";));

and you are free to change the url.

Luca Palli

> -----Original Message-----
> From: Jung, Eric (Contractor) [mailto:[EMAIL PROTECTED]]
> Sent: jeudi, 10. octobre 2002 20:10
> To: '[EMAIL PROTECTED]'
> Subject: RE: WSDL2Java 
> 
> 
> I am very interested in this, too. To date, I have been 
> manually editing the
> stub classes to accept a runtime parameter, which, needless to say, is
> extremely tedious.
> 
> Eric H. Jung
> 
> 
> -----Original Message-----
> From: Stefan Henke [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 10, 2002 2:02 PM
> To: [EMAIL PROTECTED]
> Subject: WSDL2Java 
> 
> 
> Hi,
> 
> I have a wsdl-definition which I want to publish as a kind of 
> "standard"
> interface. This wsdl-file contains all parts except the 
> service-element. As
> it is a standard, it shouldn´t contain an access url. A list 
> of valid urls
> is token at runtime from a uddi registry.
> 
> I checked the docs and I found that the service-interface and the
> servicelocator-class are not generated in this case. My 
> question is how to
> use the stub without this files? The constructor of the stub 
> requires a
> Service-object. Is it possible to tell WSDL2Java to create 
> these two files
> without a url?
> 
> Thanks
> Stefan
> 

Reply via email to