user3242906
user3242906

Reputation: 11

application independent soap message handler

I have a web services application in weblogic10.3. I used SOAP message handler for logging. But now I have to include my soap message handler code for logging in every package. Is there any way to create a jar for this and include it with whatever application we want. If yes please tell. Thanks..

Upvotes: 0

Views: 904

Answers (1)

sakura
sakura

Reputation: 2279

@SOAPMessageHandlers have been deprecated so better you should not use it.

I would recommend you to implement SOAPHandler<MessageContext> interface and override the methods handleRequest() ,handleResponse() and 'handleFault()`. The messageContext contains the details of incoming/outgoing SOAP message/fault.

The implementing class needs to be added as a HandlerChain in the SOAP contract. If all your service packages are in just one deployable war\ear, you don't need to create a separate Jar to contain this single SOAPHandler implemenation.

Please refer this link for more details.

http://docs.oracle.com/cd/E13222_01/wls/docs103/webserv_adv_rpc/handlers.html

For full sample example, below link would be helpful:

http://examples.javacodegeeks.com/enterprise-java/jws/jax-ws-soap-handler-example/

Upvotes: 2

Related Questions