1

I have created web-service client to the existing service in netbeans, and ide makes all in oop style correctly, but I need to log xml request and response to and from service, how to log these information?

test1604
  • 620
  • 4
  • 12
  • 31

1 Answers1

2

For the purpose of logging the request and response of your web service, you need to create your custom soap handler for JAX-WS which implements SOAPHandler<SOAPMessageContext> interface.

The method to do anything you like with a message is handleMessage(SAOPMessageContext messageContext). From the message context you will be able to get the SOAP message and log it.

See my post here how to implement SOAP handler interface and override handleMessage method for the specific requirements.

This post leads to what you are trying to achieve. Take a look at this article. It might be helpful as well. If you are not able to set up your handler, come back with more specific problem.

Community
  • 1
  • 1
Paulius Matulionis
  • 23,085
  • 22
  • 103
  • 143