You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by Paul Fremantle <pz...@gmail.com> on 2007/01/06 12:39:03 UTC

MTOM attachment handler

Rajith

Firstly, I want to say thanks for submitting the attachment mediator
patch. Very cool!

Secondly, I just wanted to suggest a slightly neater syntax:

<attachment mode="toMTOM|toBase64" mimeType="image/gif"
xmlns:ns1="http://axis2/sample/namespace1">
       ns1:picture
</attachment>

I think its neater to use the standard xmlns way of defining
namespaces that will be used later. This helps because it means you
can define the ns at any level inside the XML. It also matches how we
do XPath naming. Also, because this removes the second subelement, it
means we don't need such a big structure and the path can simply be
the text node of the element.

If this is only doing one attachment, then I think the tag should be
named attachment.

Finally, I think its better, if possible, to simply say what the final
form should be (MTOM, Base64). In other words, I don't care whether
the message comes in with B64 or MTOM, I know I want it to go out with
MTOM.

Sorry its taken so long to make these comments!

Paul



> The attachment path is the xpath to the element that represents the attachment
> The attachment names space is the NS for the attachment element.
> * Enable MTOM at the axis2.xml, as there is a bug in axis2 (JIRA AXIS2-1798)
>  For the reverse please do the following.
>         <attachments mode="MTOM_TO_BASE64" mimeType="image/gif">
>             <attachmentPath>ns1:picture</attachmentPath>
>             <attachmentNS prefix="ns1" name="http://axis2/sample/namespace1" />
>         </attachments>

-- 
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

http://bloglines.com/blog/paulfremantle
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com

---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org


Re: MTOM attachment handler

Posted by Paul Fremantle <pz...@gmail.com>.
Thanks for creating it!

Paul

On 1/10/07, Rajith Attapattu <ra...@gmail.com> wrote:
> Hey Paul,
>
> Sorry for the delay, I somehow have missed the email.
> I agree with your comments and will incorporate the changes when I submit
> another patch for B64 <--> SwA and SwA <--> MTOM .
> Once again thanks for reviewing the patch.
>
> Rajith
>
>
> On 1/6/07, Paul Fremantle <pz...@gmail.com> wrote:
> >
> > Rajith
> >
> > Firstly, I want to say thanks for submitting the attachment mediator
> > patch. Very cool!
> >
> > Secondly, I just wanted to suggest a slightly neater syntax:
> >
> > <attachment mode="toMTOM|toBase64" mimeType="image/gif"
> > xmlns:ns1="http://axis2/sample/namespace1">
> >        ns1:picture
> > </attachment>
> >
> > I think its neater to use the standard xmlns way of defining
> > namespaces that will be used later. This helps because it means you
> > can define the ns at any level inside the XML. It also matches how we
> > do XPath naming. Also, because this removes the second subelement, it
> > means we don't need such a big structure and the path can simply be
> > the text node of the element.
> >
> > If this is only doing one attachment, then I think the tag should be
> > named attachment.
> >
> > Finally, I think its better, if possible, to simply say what the final
> > form should be (MTOM, Base64). In other words, I don't care whether
> > the message comes in with B64 or MTOM, I know I want it to go out with
> > MTOM.
> >
> > Sorry its taken so long to make these comments!
> >
> > Paul
> >
> >
> >
> > > The attachment path is the xpath to the element that represents the
> attachment
> > > The attachment names space is the NS for the attachment element.
> > > * Enable MTOM at the axis2.xml, as there is a bug in axis2 (JIRA
> AXIS2-1798)
> > >  For the reverse please do the following.
> > >         <attachments mode="MTOM_TO_BASE64" mimeType="image/gif">
> > >
> <attachmentPath>ns1:picture</attachmentPath>
> > >             <attachmentNS prefix="ns1"
> name="http://axis2/sample/namespace1 " />
> > >         </attachments>
> >
> > --
> > Paul Fremantle
> > VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
> >
> > http://bloglines.com/blog/paulfremantle
> > paul@wso2.com
> >
> > "Oxygenating the Web Service Platform", www.wso2.com
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> synapse-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: synapse-dev-help@ws.apache.org
> >
> >
>
>


-- 
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

http://bloglines.com/blog/paulfremantle
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com

---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org


Re: MTOM attachment handler

Posted by Rajith Attapattu <ra...@gmail.com>.
Hey Paul,

Sorry for the delay, I somehow have missed the email.
I agree with your comments and will incorporate the changes when I submit
another patch for B64 <--> SwA and SwA <--> MTOM .
Once again thanks for reviewing the patch.

Rajith

On 1/6/07, Paul Fremantle <pz...@gmail.com> wrote:
>
> Rajith
>
> Firstly, I want to say thanks for submitting the attachment mediator
> patch. Very cool!
>
> Secondly, I just wanted to suggest a slightly neater syntax:
>
> <attachment mode="toMTOM|toBase64" mimeType="image/gif"
> xmlns:ns1="http://axis2/sample/namespace1">
>        ns1:picture
> </attachment>
>
> I think its neater to use the standard xmlns way of defining
> namespaces that will be used later. This helps because it means you
> can define the ns at any level inside the XML. It also matches how we
> do XPath naming. Also, because this removes the second subelement, it
> means we don't need such a big structure and the path can simply be
> the text node of the element.
>
> If this is only doing one attachment, then I think the tag should be
> named attachment.
>
> Finally, I think its better, if possible, to simply say what the final
> form should be (MTOM, Base64). In other words, I don't care whether
> the message comes in with B64 or MTOM, I know I want it to go out with
> MTOM.
>
> Sorry its taken so long to make these comments!
>
> Paul
>
>
>
> > The attachment path is the xpath to the element that represents the
> attachment
> > The attachment names space is the NS for the attachment element.
> > * Enable MTOM at the axis2.xml, as there is a bug in axis2 (JIRA
> AXIS2-1798)
> >  For the reverse please do the following.
> >         <attachments mode="MTOM_TO_BASE64" mimeType="image/gif">
> >             <attachmentPath>ns1:picture</attachmentPath>
> >             <attachmentNS prefix="ns1" name="
> http://axis2/sample/namespace1" />
> >         </attachments>
>
> --
> Paul Fremantle
> VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
>
> http://bloglines.com/blog/paulfremantle
> paul@wso2.com
>
> "Oxygenating the Web Service Platform", www.wso2.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-dev-help@ws.apache.org
>
>