As part of developing a WS client with axis for SOAP-RPC calls, I would like
the ability to configure the HTTP service location, so that the client could
look to the external, true implementation of the service, or look to an
internal, dummy implementation (that was built on the same WSDL).

I can easily do this in a simple fashion by editing the <ServiceName>Locator
class after it is generated by WSDL2Java. But every time the WSDL is
compiled, this would have to be updated. I am using WSDL2Java to generate a
full compliment of client stubs, and identifying the service through static
stubs:

        AppointmentService service = new AppointmentServiceLocator();
        AppointmentServiceSoap port = service.getAppointmentServiceSoap();

My brainstorm so far has revealed the following options:

1. Shift to a dynamic invocation method, where the client is responsible for
establishing more of the low level details of the call. Do I lose
performance with this? 

2. Extend the AppointmentServiceLocator class in a new class, say
ConfigurableServiceLocator, and have it manage the SOAP_Address. I'm still
'modifying' a generated class in a way (by extending it) so I'm not crazy
about this option.

3. Write a service handler for the client to use, that will modify the
properties of the call to match the desired endpoint address. Is this an
abuse of what a service handler is intended for?

Thanks!

Peter Pascale
 

**************************************************************************** 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 
****************************************************************************

Reply via email to