Massimo - The ServiceLocator class contains a method that accepts a service URL as a parameter, and returns an appropriately configured Service class. This method is the preferred one to use when the location is dynamic.
My suggestion would be to modify the WSDL to point to a non-existent service address, and then have your client program instantiate the appropriate service class by passing the URL to the ServiceLocator method. /Chris -----Original Message----- From: Massimo Barabino [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 30, 2003 7:26 AM To: [EMAIL PROTECTED] Subject: Variable Service Address Help Hi, can anyone suggest me a way to solve the following problem? Consider a WS client which has to access a Web Service which can be deploied at different sites. The choice of what service endpoint to use is made by the user of the client program at Run Time. I' m trying to develop such client. Using WSDL2Java I obtain classes (to access the service) with static (hardcoded) service address, complex types Qnames, etc... (depending on which WSDL address I provide to WSDL2Java). Is it correct to modify the classes generated by WSDL2Java manually, replacing those hardcoded addresses with dinamic ones (generated by user interaction)? This solution is a bit uncomfortable because if I modify the service and regenerate the client classes using WSDL2Java all my changes are lost. Is this the only solution (since I also need to get classes for complex types generated) or is there a more elegant (comfortable) one? Thanks in advance Massimo Barabino