Thursday, 1 July 2010

Change the endpoint for a JAX-WS web service

Using the netbeans webservice client example.

org.me.calculator.CalculatorWSService service = new org.me.calculator.CalculatorWSService();

String location = "http://localhost:46772/CalculatorWSApplication/CalculatorWSService";

org.me.calculator.CalculatorWS port = service.getCalculatorWSPort();
BindingProvider bp = (BindingProvider)port;
bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, location);

No comments: