Daniel Kulp wrote:
Jervis,
I've come across an issue when trying to make SOAPHandlerInterceptor
able to read SOAPMessage in the outbound direction. Basically the
problem is that our current outbound interceptor chain is not a flat
chain, it looks like below:
WrapperClassOutInterceptor
LogicalHandlerInterceptor
MessageSenderInterceptor
StaxOutInterceptor
SOAPHandlerInterceptor
SoapOutInterceptor
WrappedOutInterceptor
BareOutInterceptor
Out of curiosity, why couldn't the SOAPHandlerInterceptor do the same
thing. Make it:
WrapperClassOutInterceptor
LogicalHandlerInterceptor
MessageSenderInterceptor
StaxOutInterceptor
SOAPHandlerInterceptor
SoapOutInterceptor
WrappedOutInterceptor
BareOutInterceptor
Basically, the SOAPHandlerInterceptor would create a StAX writer that
writes to the SAAJ model/DOM and then calls:
message.getInterceptorChain().doIntercept(message);
When that returns, the SAAJ model should be fully built up at which point
you can call the SAAJ handlers. When they are done, stream the SAAJ to
the output stream.
Because what happens if there is an interceptor after the
SOAPHandlerInterceptor which wants to use the SAAJ/DOM tree? Like
WS-Security?
- Dan
--
Dan Diephouse
(616) 971-2053
Envoi Solutions LLC
http://netzooid.com