You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Saminda Abeyruwan <sa...@opensource.lk> on 2005/08/23 07:45:22 UTC

[Axis2] MTOM Support

Hi all,

Studing the current code for MTOM support for Axis2, it's being found, 
when "optimized" is on, CommonsHttpTrasnsportSender uses "chunk" as 
default. When doing interop tests, i've found that some interop end 
points couldn't handle "chunked" stream. Could we allow "chunking" 
on/off via Axis2.xml, till the policy is integrated to the system.

Any thoughts...

Saminda

Re: [Axis2] MTOM Support

Posted by Saminda Abeyruwan <sa...@opensource.lk>.
Hi all,

Considering prior comments current code  has  been upgraded to handle 
both regular streams and chunked streams for MTOM. Chunking is not given 
as default. To enable chunking, user has to do the following changes to 
the axis2.xml,

.....
<transportSender name="http" 
class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
        <parameter name="PROTOCOL" locked="xsd:false">HTTP/1.1</parameter>
        <parameter name="Transfer-Encoding" 
locked="xsd:false">chunked</parameter>
</transportSender>
.....

Patch for the above changes attached herewith. Someone please be kind 
enough to apply it.

Thanks

Saminda



Ajith Ranabahu wrote:

> I guess Saminda is stating the same thing, A similar piece of code 
> should be in the sender right now. my guess is we'll put an entry in 
> the axis2.xml (the configuration) stating which setting is to be used 
> as default.
>
> On 8/23/05, *ERAN CHINTHAKA* <chinthaka@opensource.lk 
> <ma...@opensource.lk>> wrote:
>
>     I'd like to see something like this.
>
>     If(doingMTOM){
>         // by default chunking is on
>     }else{
>         // by default chunking is off
>     }
>
>
>     But, this should be configurable through the MEPClient api.
>     Meaning, one
>     should be able to explicitly override the default settings through the
>     MEPClient API.
>
>     something like, mepClient.doMTOM(boolean);
>
>     -- Chinthaka
>
>     Saminda Abeyruwan wrote:
>
>     > Hi all,
>     >
>     > Studing the current code for MTOM support for Axis2, it's being
>     found,
>     > when "optimized" is on, CommonsHttpTrasnsportSender uses "chunk" as
>     > default. When doing interop tests, i've found that some interop end
>     > points couldn't handle "chunked" stream. Could we allow "chunking"
>     > on/off via Axis2.xml, till the policy is integrated to the system.
>     >
>     > Any thoughts...
>     >
>     > Saminda
>     >
>     >
>
>
>
>
> -- 
> Ajith Ranabahu 



Re: [Axis2] MTOM Support

Posted by Ajith Ranabahu <aj...@gmail.com>.
I guess Saminda is stating the same thing, A similar piece of code should be 
in the sender right now. my guess is we'll put an entry in the
axis2.xml(the configuration) stating which setting is to be used as
default.

On 8/23/05, ERAN CHINTHAKA <ch...@opensource.lk> wrote:
> 
> I'd like to see something like this.
> 
> If(doingMTOM){
> // by default chunking is on
> }else{
> // by default chunking is off
> }
> 
> 
> But, this should be configurable through the MEPClient api. Meaning, one
> should be able to explicitly override the default settings through the
> MEPClient API.
> 
> something like, mepClient.doMTOM(boolean);
> 
> -- Chinthaka
> 
> Saminda Abeyruwan wrote:
> 
> > Hi all,
> >
> > Studing the current code for MTOM support for Axis2, it's being found,
> > when "optimized" is on, CommonsHttpTrasnsportSender uses "chunk" as
> > default. When doing interop tests, i've found that some interop end
> > points couldn't handle "chunked" stream. Could we allow "chunking"
> > on/off via Axis2.xml, till the policy is integrated to the system.
> >
> > Any thoughts...
> >
> > Saminda
> >
> >
> 



-- 
Ajith Ranabahu

Re: [Axis2] MTOM Support

Posted by Davanum Srinivas <da...@gmail.com>.
Please open a jira bug to track the issue.

thanks,
dims

On 8/24/05, Saminda Abeyruwan <sa...@opensource.lk> wrote:
> Hi all,
> 
> As Thilina wrote current code deals MTOMized message with "chunking" as
> default. It's good, but the problem is flexibility. AFAIK HttpClient can
> set the "Content-Length" properly via RequestEntity. I inquire
> httpclinet-dev list the capability of it and they are pretty good about
> it. If we can decide to give this flexibility of supporting "chunking"
> on/off, it would be great.
> 
> Saminda
> 
> Thilina Gunarathne wrote:
> 
> > Hi,
> > See my comments below....
> >
> >     I'd like to see something like this.
> >
> >     If(doingMTOM){
> >         // by default chunking is on
> >     }else{
> >         // by default chunking is off
> >     }
> >
> >
> > Yes.. this is exactly what is happening now. If we are sending an
> > MTOMized message chunking is by switched on. It was reported that
> > HTTPClient reports a wrong content-length. This was the reason behind
> > that move....
> >
> > But the problem Shaminda talks is some interop endpoints (eg :
> > Whitemesa MTOM endpoint) does not support http chunking. So he wants
> > to know whether we can give the option of enabling and disabling
> > chunking for MTOM....
> >
> >     But, this should be configurable through the MEPClient api.
> >     Meaning, one
> >     should be able to explicitly override the default settings through
> >     the
> >     MEPClient API.
> >
> >     something like, mepClient.doMTOM(boolean);
> >
> >
> > Yes.. This should be.... But what Shaminda wants is,
> >     mepClient.doMTOM(boolean);
> >     mepClient.doChunking(boolean); // even in the MTOM case
> >
> > Thanx & Regards,
> > ~Thilina
> >
> >
> >     -- Chinthaka
> >
> >     Saminda Abeyruwan wrote:
> >
> >     > Hi all,
> >     >
> >     > Studing the current code for MTOM support for Axis2, it's being
> >     found,
> >     > when "optimized" is on, CommonsHttpTrasnsportSender uses "chunk" as
> >     > default. When doing interop tests, i've found that some interop end
> >     > points couldn't handle "chunked" stream. Could we allow "chunking"
> >     > on/off via Axis2.xml, till the policy is integrated to the system.
> >     >
> >     > Any thoughts...
> >     >
> >     > Saminda
> >     >
> >     >
> >
> >
> >
> >
> > --
> > "May the SourcE be with u"
> > http://www.bloglines.com/blog/thilina              http://webservices.apache.org/~thilina/
> > <http://webservices.apache.org/%7Ethilina/>
> 
> 
> 


-- 
Davanum Srinivas : http://wso2.com/ - Oxygenating The Web Service Platform

Re: [Axis2] MTOM Support

Posted by Saminda Abeyruwan <sa...@opensource.lk>.
Hi all,

As Thilina wrote current code deals MTOMized message with "chunking" as 
default. It's good, but the problem is flexibility. AFAIK HttpClient can 
set the "Content-Length" properly via RequestEntity. I inquire 
httpclinet-dev list the capability of it and they are pretty good about 
it. If we can decide to give this flexibility of supporting "chunking" 
on/off, it would be great.

Saminda

Thilina Gunarathne wrote:

> Hi,
> See my comments below....
>
>     I'd like to see something like this.
>
>     If(doingMTOM){
>         // by default chunking is on
>     }else{
>         // by default chunking is off
>     }
>
>
> Yes.. this is exactly what is happening now. If we are sending an 
> MTOMized message chunking is by switched on. It was reported that 
> HTTPClient reports a wrong content-length. This was the reason behind 
> that move....
>
> But the problem Shaminda talks is some interop endpoints (eg : 
> Whitemesa MTOM endpoint) does not support http chunking. So he wants 
> to know whether we can give the option of enabling and disabling 
> chunking for MTOM....
>
>     But, this should be configurable through the MEPClient api.
>     Meaning, one
>     should be able to explicitly override the default settings through
>     the
>     MEPClient API.
>
>     something like, mepClient.doMTOM(boolean);
>
>
> Yes.. This should be.... But what Shaminda wants is,
>     mepClient.doMTOM(boolean);
>     mepClient.doChunking(boolean); // even in the MTOM case
>
> Thanx & Regards,
> ~Thilina
>  
>
>     -- Chinthaka
>
>     Saminda Abeyruwan wrote:
>
>     > Hi all,
>     >
>     > Studing the current code for MTOM support for Axis2, it's being
>     found,
>     > when "optimized" is on, CommonsHttpTrasnsportSender uses "chunk" as
>     > default. When doing interop tests, i've found that some interop end
>     > points couldn't handle "chunked" stream. Could we allow "chunking"
>     > on/off via Axis2.xml, till the policy is integrated to the system.
>     >
>     > Any thoughts...
>     >
>     > Saminda
>     >
>     >
>
>
>
>
> -- 
> "May the SourcE be with u"
> http://www.bloglines.com/blog/thilina              http://webservices.apache.org/~thilina/ 
> <http://webservices.apache.org/%7Ethilina/> 



Re: [Axis2] MTOM Support

Posted by Thilina Gunarathne <cs...@gmail.com>.
Hi,
See my comments below....

> I'd like to see something like this.
> 
> If(doingMTOM){
> // by default chunking is on
> }else{
> // by default chunking is off
> }


Yes.. this is exactly what is happening now. If we are sending an MTOMized 
message chunking is by switched on. It was reported that HTTPClient reports 
a wrong content-length. This was the reason behind that move....

But the problem Shaminda talks is some interop endpoints (eg : Whitemesa 
MTOM endpoint) does not support http chunking. So he wants to know whether 
we can give the option of enabling and disabling chunking for MTOM....

But, this should be configurable through the MEPClient api. Meaning, one
> should be able to explicitly override the default settings through the
> MEPClient API.
> 
> something like, mepClient.doMTOM(boolean);


Yes.. This should be.... But what Shaminda wants is,
mepClient.doMTOM(boolean);
mepClient.doChunking(boolean); // even in the MTOM case

Thanx & Regards,
~Thilina

-- Chinthaka
> 
> Saminda Abeyruwan wrote:
> 
> > Hi all,
> >
> > Studing the current code for MTOM support for Axis2, it's being found,
> > when "optimized" is on, CommonsHttpTrasnsportSender uses "chunk" as
> > default. When doing interop tests, i've found that some interop end
> > points couldn't handle "chunked" stream. Could we allow "chunking"
> > on/off via Axis2.xml, till the policy is integrated to the system.
> >
> > Any thoughts...
> >
> > Saminda
> >
> >
> 



-- 
"May the SourcE be with u" 
http://www.bloglines.com/blog/thilina 
http://webservices.apache.org/~thilina/

Re: [Axis2] MTOM Support

Posted by ERAN CHINTHAKA <ch...@opensource.lk>.
I'd like to see something like this.

If(doingMTOM){
    // by default chunking is on
}else{
    // by default chunking is off
}


But, this should be configurable through the MEPClient api. Meaning, one 
should be able to explicitly override the default settings through the 
MEPClient API.

something like, mepClient.doMTOM(boolean);

-- Chinthaka

Saminda Abeyruwan wrote:

> Hi all,
>
> Studing the current code for MTOM support for Axis2, it's being found, 
> when "optimized" is on, CommonsHttpTrasnsportSender uses "chunk" as 
> default. When doing interop tests, i've found that some interop end 
> points couldn't handle "chunked" stream. Could we allow "chunking" 
> on/off via Axis2.xml, till the policy is integrated to the system.
>
> Any thoughts...
>
> Saminda
>
>