You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Dies Koper <di...@jp.fujitsu.com> on 2006/05/09 01:56:15 UTC
Re: How to avoid hardcoding the location of wsdl file in generated
source?
Hello Joshua,
Set the URL yourself in your client:
import javax.xml.rpc.*;
[...]
ServiceFactory sf = ServiceFactory.newInstance();
YourService service = (YourService)sf.loadService(YourService.class);
YourSEI remote = service.getYourSEI();
String url = args[0];
((Stub)remote)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, url);
Load the url from a property file or pass it as argument to your client.
Regards,
Dies
Joshua.White@hartfordlife.com wrote:
> When using the axis-wsdl2java ant task, the location of the wsdl file gets hard
> coded in the generated client code. I need to move my app between environments
> without having to recompile. How do I prevent this from happening? Is there
> another alternative?
>
> Regards,
>
> Joshua