Hi,

Assume your SEI class is Greeter
you can do something like


QName endpointName = new QName("...", "...");
service.addPort(endpointName, SOAPBinding.SOAP11HTTP_BINDING, "http://your _new_endpoint_address");
Greeter greeter = service.getPort(endpointName, Greeter.class);

then use greeter to do the invocation

Freeman
On 2009-12-30, at 上午12:06, Alex wrote:

hi out there,

I generate my client code via wsdl2java, I have already found a solution to
override the wsdl-location.

ClassLoader cl = Thread.currentThread().getContextClassLoader();
if ( null == cl ){
  cl = InitClient.class.getClassLoader();
}
InitClient.WSDL_LOCATION = cl.getResource( "description/ myservice.wsdl" ); MyService service = new MyService(InitClient.WSDL_LOCATION, InitClient.SERVICE_NAME);

But I didn't find a way how to override the endpoint-address.

thank you, alex


--
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com

Reply via email to