Method 1:
Implement SOAPHandler<SOAPMessageContext> and HandlerResolver, and setHandlerResolver for the service
public boolean handleMessage(final SOAPMessageContext smc)
Boolean outboundProperty = (Boolean) smc.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY)
if(outboundProperty)
System.out.println("SOAP Request:");
smc.getMessage().writeTo(System.out);
else
System.out.println("Soap Response:");
smc.getMessage()message.writeTo(System.out);
Method 2:
System.setProperty("com.sun.xml.ws.transport.http.client.HttpTransportPipe.dump", "true");
System.setProperty("com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.dump", "true");
System.setProperty("com.sun.xml.ws.transport.http.HttpAdapter.dump", "true");
System.setProperty("com.sun.xml.internal.ws.transport.http.HttpAdapter.dump", "true");
No comments:
Post a Comment