I need to call a Web Service but by sending the SOAP request via JMS.Is it possible if I have enpoint intiated from WSDL not to call the service itself but generate only String representation of the SOAP call?

I need the serialization at the client side, not server side. I need to convert the SOAP call to String and sent it via JMS to ESB or for example I need only to display what message would be sent without actually sending it.

Thanks for the response, this approach works. But I hit another problem. I am also applying WS-S rules on message and in handler I am getting plain SOAP without WSS rules applied. Is it possible that I will receive message even with security handlers and encrypted?

I tried two approaches1) use typecasting to StubExt and set security config. Then security works OK, but my handler is called before message is enriched with security elements2) I used handlerChain.add(new org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerClient()); In this case my handler was called after the security one. The WS was successfully invoked but when the service returned result, the client thrown an exception SOAP request exception [testng] org.jboss.ws.WSException: Cannot find child element: returnApparently the client did not processed WSS headers

So I am looking for one of the two solutions1) Force client to first process security set via StubExt and then the process handlers (preferred)2) Or enable the second approach working. maybe I need to add another handler that will process the response separately?

An explanation that may help, hope it's not too late.The reason why your first approach results in your handler being called before the wsse one is that the latter is configured as a post-handler while yours is an endpoint-handler. You would need your handler to be a post-handler, however afaik this can only be achieved editing the jbossws configurations in standard-jaxws-client-config.xml.

Speaking of the second approach, where did you do that call? where is the handlerChain instance from?