On Wednesday 01 December 2010 12:54:39 pm Christian Schneider wrote:
> In CXF you could adapt the example give in the mail from devakatiyar to
> achieve the same.
> Attaching the interceptor to a CXF endpoint is much easier than setting
> up camel and cxf. The downside is that interceptors in
> CXF are not so easy to work with as they need to work on streams.
Actually, not true at all. You could put an interceptor late in the chain
(like USER_LOGICAL) and then you could deal with the JAXB objects directly to
verify it's content or whatever.
If you stick it in the PRE_PROTOCOL phase, you could call
SOAPMessage doc = msg.getContent(SOAPMessage.class);
if (doc == null) {
new SAAJInInterceptor().handleMessage(msg);
doc = msg.getContent(SOAPMessage.class);
}
to get the SOAP message as a SAAJ/DOM and do all the XPath things and such
just fine as well.
Basically, there is quite a bit of flexibility that you could do depending on
the requirements.
Dan
>
> Best regards
>
> Christian
>
> Am 01.12.2010 14:10, schrieb Maatari:
> > Thank you guys for your answers. Actually, I need to manipulate and
> > see the content of the message. Basically, to cut the story short the
> > idea is that, the intermediaries will have the responsibility to check
> > the content of the message and analyze the semantic implication of
> > each message to monitor conversation. In other term, is the message
> > authorized, does the message imply obligation from the sender etc.....
> > Hence I need to see the content of the message and forward or stop it
> > if necessary while, keeping track of the semantic implication of the
> > messages.
> >
> > On Dec 1, 2010, at 8:09 AM, Christian Schneider [via CXF] wrote:
> >> That depends on what the intermediary should do. If it should work
> >> with
> >> java objects deserialized from the incoming soap request then CXF will
> >> help you of course.
> >> If the intermediary should simply route based on the xml or based on
> >> some header fields then apache camel will be a better solution.
> >>
> >> Best regards
> >>
> >> Christian
> >>
> >> Am 01.12.2010 02:33, schrieb Maatari:
> >>> Dear All
> >>>
> >>> Is there any facilities/helps provided by the framework to
> >>
> >> implement a soap
> >>
> >>> intermediary ?
> >>>
> >>> I would like to implement an intermediary between a client and a
> >>
> >> service as
> >>
> >>> 3 endpoint situated at different location.
> >>>
> >>>
> >>> Many thanks
> >>
> >> View message @
> >> http://cxf.547215.n5.nabble.com/Soap-Intermdiaries-and-CXF-tp3287079p32
> >> 87283.html To unsubscribe from Soap Intermdiaries and CXF, click here.
--
Daniel Kulp
[email protected]
http://dankulp.com/blog