1 Reply Latest reply on Apr 7, 2013 9:16 PM by jtahlborn

    Jax-ws client can be a singleton?

      I have to call a webservice using JAX-WS and I have to include a parameter in header of webservice xml. I've used wsimport to generate client classes and now I'm using them in this way (I use MyHandlerResolver to inject parameter in header):

      MyServiceService myServiceService = new MyServiceService(url, new QName("http://mysite/service", "MyServiceService"));

      MyHandlerResolver handlerResolver = new MyHandlerResolver();


      MyService myService = myServiceService.getMyServicePort();

      *((BindingProvider) myService).getRequestContext().put("myParameter", myParameter);*


      My question is: can MyServiceService be a singleton? Are there issues with concurrent requests? I haven't found any clear answer on this argument. Is there any official documentation about this?