dev@jax-ws.java.net

Re: MTOM processing and Handlers

From: Vivek Pandey <Vivek.Pandey_at_Sun.COM>
Date: Thu, 15 Dec 2005 13:53:51 -0800

Hi Mark,


Date: Wed, 02 Nov 2005 10:17:18 -0500
From: Mark Hansen <mark_at_javector.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Subject: MTOM processing and Handlers


>I'm trying to understand part of the JAX-WS 2.0 spec related to handlers
>and MTOM.

>It seems that, within a request handler, the handler interfaces give you
>access to the XML infoset representation of a SOAP request message PRIOR
>to the JAXB unmarshalling of the message into a Java content tree (i.e.,
>instances of JAXB-annotated program elements). So, via the SAAJ API,
>you can read/write the SOAP message's XML infoset.

yes. Spec does not talk about the infoset representation(XOP or non-XOP) at the
point when handlers see the message.

>But, has the MTOM processing occured at this point? That is, does the
>XML infoset representation that you access from within a request handler
>include the "unpackaged" binary attachments as xs:base64Binary elements?
> Or does the infoset still have the XOP references of the form
><xop:Include ... href='cid:http:// ...'/>?

XOP optimization is applied during marshalling so it would have occurred when a
handler sees the message. So a handler might see the xop:Include infoset if mtom
is enabled and the binary data size is above threshold(default is 1000 bytes).



-vivek.