0

I'm using SOAPHandler.handleMessage(...) to intercept outgoint SOAP messages from client to server.

I need to confirm that the interception takes place after the message has been sent. Not sure if this is really the case. Any ideas?

Joel Shemtov
  • 3,008
  • 2
  • 22
  • 22

1 Answers1

1

There's a simple trick to check your assumption. Add this code in handleMessage method:

    SOAPMessage msg = ((SOAPMessageContext) context).getMessage();
    SOAPPart sp = msg.getSOAPPart();
    SOAPEnvelope env = sp.getEnvelope();

Now when you have a SOAPEnvelope try to alternate SOAP message and see what happens when receiver receives it. I will spoil the surprise and reveal you: it will be changed :-) Thus, your SOAPHandler intercepts the message before it's actually sent.

Miljen Mikic
  • 14,765
  • 8
  • 58
  • 66