Advanced Customization > Info*Engine User’s Guide > Web Services Framework > Writing a Java-based Web Service Client > Portable Web Service Clients > Dynamically Specifying a Web Service URL
  
Dynamically Specifying a Web Service URL
When creating a Java-based web service client, the HTTP connection information is determined from your Windchill configuration. When building the JAR for your web service client, the framework stores a local copy of the Web Service Definition Language (WSDL) to your web service and references that WSDL from a catalog file. This allows your client to avoid having to access the WSDL over the network at runtime.
By default, the web services framework configures your JAX-WS handler chain to include a class that imposes the URL to your server based on the Windchill configuration. The default implementation is com.ptc.jws.client.handler.WebServiceURLHandler, which can be overridden in build.xml using the handler.chain.url property. You should therefore not need to specify this information to run your client.
Your client can use the wt.webservice.url system property to override the web server URL, or you can supply the URL programmatically using the setWebServiceURL(java.net.URL url) method on the com.ptc.jws.client.handler.WebServiceURLHandler class.
Alternatively, you can override the handler.chain.url property with your own implementation to supply this URL. Doing this requires that you set the javax.xml.ws.BindingProvider.ENDPOINT_ADDRESS_PROPERTY within the instance of javax.xml.ws.handler.soap.SOAPMessageContext given to your handler implementation.