You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Xinjun Chen <xj...@gmail.com> on 2007/05/09 05:01:11 UTC

[Axis2 1.2] Java2WSDL with support of SwA and/or MTOM

Hi,

I am trying to write a web service with attachment support.
The method signature is as follows:
String uploadFile(String userID, String fileName) {}
When the client invoke this uploadFile operation, he/she will upload a file
whose file name is "fileName".
The implementation of uploadFile send the client another attachment file,
and send the file name to the client as the response.

As can be seen, the Java class contains no information about the
attachments.
Using Java2WSDL, how can I generate a WSDL which mentions attachments? Do I
need to change the method signature?

My second question is:
What will be the differences between MTOM and SwA in terms of Web Service
implementation class (the signature) and the WSDL?

Another question about attachment is about interoperability.
>From Axis2 user guide, MTOM is much better than SwA. However, MTOM is not
WS-I Basic Profile 1.0 or 1.1 compliant. Will there be any issue if my web
service uses MTOM and the client uses .NET or other non-Axis2 SOAP toolkit?


Regards,
Xinjun

Re: [Axis2 1.2] Java2WSDL with support of SwA and/or MTOM

Posted by Xinjun Chen <xj...@gmail.com>.
Hi Thilina,

Thanks for your reply.
I will try MTOM also.

Regards,
Xinjun

On 5/12/07, Thilina Gunarathne <cs...@gmail.com> wrote:
>
> Hi,
> > I have make enabled SwA support in Axis2. It seems that I cannot enable
> both
> > SwA and MTOM at the same time.
> No it's not possible... MTOM will get priority if both are enabled...
>
> > If the attachment is very big, will base64Binary introduce more
> performance
> > penalty?
> Yes if you are going to inline the binary using base64 encoding.. But
> with MTOM you'll still be able to be compliant with base64Binary data
> type without doing any encoding to the data...
>
> You will be able handle large attachments using MTOM without much
> memory/performance issues by using the Axis2 file caching mechanisms
> and correctly choosing or implementing the DataSource
> implenentations...
>
> Thanks,
> Thilina
> >
> > Regards.
> > Xinjun
> >
> > On 5/10/07, Thilina Gunarathne <cs...@gmail.com> wrote:
> > >
> > > Axis2 supports Java2WSDL only for MTOM...
> > > > String uploadFile(String userID, String fileName) {}
> > > Try changing the method as follows,
> > > String uploadFile(String userID, DataHandler file) {}
> > >
> > > > My second question is:
> > > > What will be the differences between MTOM and SwA in terms of Web
> > Service
> > > > implementation class (the signature) and the WSDL?
> > > It's not trivial to capture the SwA details in the WSDL... Axis2 does
> > > not support it either..
> > > On the other hand specifying a MTOM compatible WSDL is trivial.. You
> > > just need to specify a element with the type base64Binary...
> > >
> > > > Another question about attachment is about interoperability.
> > > > From Axis2 user guide, MTOM is much better than SwA. However, MTOM
> is
> > not
> > > > WS-I Basic Profile 1.0 or 1.1 compliant.
> > > I don't think MTOM was there when they are doing the basic profile
> ;)...
> > >
> > > >Will there be any issue if my web
> > > > service uses MTOM and the client uses .NET or other non-Axis2 SOAP
> > toolkit?
> > > Most of the newer stacks including WCF (.net) supports MTOM..If you
> > > are looking for a futuristic approach then MTOM is the choice..If you
> > > are looking for support from the older stacks, then SwA is the choice.
> > >
> > > Thanks,
> > > Thilina
> > >
> > >
> > > --
> > > Thilina Gunarathne  -  http://www.wso2.com -
> http://thilinag.blogspot.com
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > >
> >
> >
>
>
> --
> Thilina Gunarathne  -  http://www.wso2.com - http://thilinag.blogspot.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

Re: [Axis2 1.2] Java2WSDL with support of SwA and/or MTOM

Posted by Thilina Gunarathne <cs...@gmail.com>.
Hi,
> I have make enabled SwA support in Axis2. It seems that I cannot enable both
> SwA and MTOM at the same time.
No it's not possible... MTOM will get priority if both are enabled...

> If the attachment is very big, will base64Binary introduce more performance
> penalty?
Yes if you are going to inline the binary using base64 encoding.. But
with MTOM you'll still be able to be compliant with base64Binary data
type without doing any encoding to the data...

You will be able handle large attachments using MTOM without much
memory/performance issues by using the Axis2 file caching mechanisms
and correctly choosing or implementing the DataSource
implenentations...

Thanks,
Thilina
>
> Regards.
> Xinjun
>
> On 5/10/07, Thilina Gunarathne <cs...@gmail.com> wrote:
> >
> > Axis2 supports Java2WSDL only for MTOM...
> > > String uploadFile(String userID, String fileName) {}
> > Try changing the method as follows,
> > String uploadFile(String userID, DataHandler file) {}
> >
> > > My second question is:
> > > What will be the differences between MTOM and SwA in terms of Web
> Service
> > > implementation class (the signature) and the WSDL?
> > It's not trivial to capture the SwA details in the WSDL... Axis2 does
> > not support it either..
> > On the other hand specifying a MTOM compatible WSDL is trivial.. You
> > just need to specify a element with the type base64Binary...
> >
> > > Another question about attachment is about interoperability.
> > > From Axis2 user guide, MTOM is much better than SwA. However, MTOM is
> not
> > > WS-I Basic Profile 1.0 or 1.1 compliant.
> > I don't think MTOM was there when they are doing the basic profile ;)...
> >
> > >Will there be any issue if my web
> > > service uses MTOM and the client uses .NET or other non-Axis2 SOAP
> toolkit?
> > Most of the newer stacks including WCF (.net) supports MTOM..If you
> > are looking for a futuristic approach then MTOM is the choice..If you
> > are looking for support from the older stacks, then SwA is the choice.
> >
> > Thanks,
> > Thilina
> >
> >
> > --
> > Thilina Gunarathne  -  http://www.wso2.com - http://thilinag.blogspot.com
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
>


-- 
Thilina Gunarathne  -  http://www.wso2.com - http://thilinag.blogspot.com

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


Re: [Axis2 1.2] Java2WSDL with support of SwA and/or MTOM

Posted by Xinjun Chen <xj...@gmail.com>.
Hi Thilina,

Thanks for comments.
I have make enabled SwA support in Axis2. It seems that I cannot enable both
SwA and MTOM at the same time.
If the attachment is very big, will base64Binary introduce more performance
penalty?

Regards.
Xinjun

On 5/10/07, Thilina Gunarathne <cs...@gmail.com> wrote:
>
> Axis2 supports Java2WSDL only for MTOM...
> > String uploadFile(String userID, String fileName) {}
> Try changing the method as follows,
> String uploadFile(String userID, DataHandler file) {}
>
> > My second question is:
> > What will be the differences between MTOM and SwA in terms of Web
> Service
> > implementation class (the signature) and the WSDL?
> It's not trivial to capture the SwA details in the WSDL... Axis2 does
> not support it either..
> On the other hand specifying a MTOM compatible WSDL is trivial.. You
> just need to specify a element with the type base64Binary...
>
> > Another question about attachment is about interoperability.
> > From Axis2 user guide, MTOM is much better than SwA. However, MTOM is
> not
> > WS-I Basic Profile 1.0 or 1.1 compliant.
> I don't think MTOM was there when they are doing the basic profile ;)...
>
> >Will there be any issue if my web
> > service uses MTOM and the client uses .NET or other non-Axis2 SOAP
> toolkit?
> Most of the newer stacks including WCF (.net) supports MTOM..If you
> are looking for a futuristic approach then MTOM is the choice..If you
> are looking for support from the older stacks, then SwA is the choice.
>
> Thanks,
> Thilina
>
>
> --
> Thilina Gunarathne  -  http://www.wso2.com - http://thilinag.blogspot.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

Re: [Axis2 1.2] Java2WSDL with support of SwA and/or MTOM

Posted by Thilina Gunarathne <cs...@gmail.com>.
Axis2 supports Java2WSDL only for MTOM...
> String uploadFile(String userID, String fileName) {}
Try changing the method as follows,
String uploadFile(String userID, DataHandler file) {}

> My second question is:
> What will be the differences between MTOM and SwA in terms of Web Service
> implementation class (the signature) and the WSDL?
It's not trivial to capture the SwA details in the WSDL... Axis2 does
not support it either..
On the other hand specifying a MTOM compatible WSDL is trivial.. You
just need to specify a element with the type base64Binary...

> Another question about attachment is about interoperability.
> From Axis2 user guide, MTOM is much better than SwA. However, MTOM is not
> WS-I Basic Profile 1.0 or 1.1 compliant.
I don't think MTOM was there when they are doing the basic profile ;)...

>Will there be any issue if my web
> service uses MTOM and the client uses .NET or other non-Axis2 SOAP toolkit?
Most of the newer stacks including WCF (.net) supports MTOM..If you
are looking for a futuristic approach then MTOM is the choice..If you
are looking for support from the older stacks, then SwA is the choice.

Thanks,
Thilina


-- 
Thilina Gunarathne  -  http://www.wso2.com - http://thilinag.blogspot.com

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