webservices-client

Are JAX-WS clients thread safe?

依然范特西╮ 提交于 2019-11-27 01:49:45
问题 Because the initialization of the WS client side port is so costly we would like to reuse the same instance. We would also like to set different values in the BindingProvider/RequestContext before each call. Initially we would like to do this: MyService service = new MyService(wsdlURL, name); MyPort myPort = service .getMyServicePort(); then later, before each call do this: Map requestContext = ((BindingProvider)myPort ).getRequestContext(); requestContext.put(BindingProvider.USERNAME