You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Daniel Kulp <dk...@apache.org> on 2009/06/02 18:46:12 UTC

Re: Transfer Encoding & Http-conf:conduit Properties

On Thu May 28 2009 2:17:22 pm CA-Dave wrote:
> Hi,
>
> I've written a webservice client program using CXF 2.2.1. The web service
> implements WS security and the client seems to be working fine except when
> I need to turn on/off chunking using http-conf:conduit properties. It
> appears that chunking is always turned-off. None of the properties
> specified within the http-conf element kicks in. I added the
> http:authorization without any luck.

Can you create a sample and attach to a JIRA?    Mostly concerned about the 
authorization.

Regarding the chunking:  even if chunking is turned on (which is the default), 
if the message is less than 4K (I think, would need to look at the code to 
refresh my memory) which is the size of a "chunk", then it's not sent in 
chunked form.   The main reason is that in chunked form with the 
HTTPUrlConnection, a minimum of 3 network packets are sent.  One for the 
headers + the first chunk size, the chunk itself, and finally the "0" to mark 
the end.      In non-chunked, the HTTPUrlConnection is a bit smarter and uses 
less network packets.   However, once around 4K is hit, the benefits of the 
chunking override the packet issue.

Dan


> Any suggestions or pointers will be greatly appreciated!
>
> Thanks,
> Dave
> http://www.nabble.com/file/p23767127/ClientAppContext2.xml
> ClientAppContext2.xml

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

Re: Transfer Encoding & Http-conf:conduit Properties

Posted by Daniel Kulp <dk...@apache.org>.
On Tue June 2 2009 1:55:15 pm CA-Dave wrote:
> Thanks for explaining the technical details around chunking!
>
> It is possible to change the chunking size used by CXF using a
> configuration parameter or even programmetically? The intent is to force
> chunking at a lower size and test the web service behavior with and without
> chunking (although it's something that's handled by the application
> server).

The HTTPClientPolicy object has a "chunkingThreshold" property that controls 
the crossover point.   The default is indeed 4K.   That should be settable via 
config or via API's like any other setting for HTTPClientPolicy stuff.


> The web service is a solution delivered by a third-party and expects a
> digitally signed soap-message of size less than 3K (sample attached). Some
> of the clients who consume the web service are using MULE. We see that the
> SOAP message coming in as chunked. We wanted to write a simple command-line
> CXF client to configure Websphere (for the web service) so that it can
> serve chunked and non-chunked requets. We were told that with MULE, the
> requests is always chunked. Do you know a way to turn-off chunking from a
> MULE client?

That's because MULE still uses CXF 2.1.2 which predates all the benchmarking 
and stuff I did around chunking for 2.1.4.  (Why MULE insists on sticking with 
such an old version is beyond me)   Yes, you can turn it off in MULE, but I'm 
not sure how (I'm not a MULE person).   Possibly just with programmatic APIs.  
Not really sure.

> I'd also like to know why we are not seeing the authorization-headers and
> have uploaded the source code.

I assume the auth stuff is defined in the /ClientAppContext.xml file which you 
didn't include?

Dan


>
> Thanks a lot again!
>
> -Dave
>
>
>
>
>
>
>
>
>
> I'm not  http://www.nabble.com/file/p23837605/src.zip src.zip
> http://www.nabble.com/file/p23837605/Request.log Request.log
>
> dkulp wrote:
> > On Thu May 28 2009 2:17:22 pm CA-Dave wrote:
> >> Hi,
> >>
> >> I've written a webservice client program using CXF 2.2.1. The web
> >> service implements WS security and the client seems to be working fine
> >> except when
> >> I need to turn on/off chunking using http-conf:conduit properties. It
> >> appears that chunking is always turned-off. None of the properties
> >> specified within the http-conf element kicks in. I added the
> >> http:authorization without any luck.
> >
> > Can you create a sample and attach to a JIRA?    Mostly concerned about
> > the
> > authorization.
> >
> > Regarding the chunking:  even if chunking is turned on (which is the
> > default),
> > if the message is less than 4K (I think, would need to look at the code
> > to refresh my memory) which is the size of a "chunk", then it's not sent
> > in chunked form.   The main reason is that in chunked form with the
> > HTTPUrlConnection, a minimum of 3 network packets are sent.  One for the
> > headers + the first chunk size, the chunk itself, and finally the "0" to
> > mark
> > the end.      In non-chunked, the HTTPUrlConnection is a bit smarter and
> > uses
> > less network packets.   However, once around 4K is hit, the benefits of
> > the
> > chunking override the packet issue.
> >
> > Dan
> >
> >> Any suggestions or pointers will be greatly appreciated!
> >>
> >> Thanks,
> >> Dave
> >> http://www.nabble.com/file/p23767127/ClientAppContext2.xml
> >> ClientAppContext2.xml
> >
> > --
> > Daniel Kulp
> > dkulp@apache.org
> > http://www.dankulp.com/blog

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

Re: Transfer Encoding & Http-conf:conduit Properties

Posted by CA-Dave <dm...@sbcglobal.net>.
Dan,

Thanks for explaining the technical details around chunking!

It is possible to change the chunking size used by CXF using a configuration
parameter or even programmetically? The intent is to force chunking at a
lower size and test the web service behavior with and without chunking
(although it's something that's handled by the application server). 

The web service is a solution delivered by a third-party and expects a
digitally signed soap-message of size less than 3K (sample attached). Some
of the clients who consume the web service are using MULE. We see that the
SOAP message coming in as chunked. We wanted to write a simple command-line
CXF client to configure Websphere (for the web service) so that it can serve
chunked and non-chunked requets. We were told that with MULE, the requests
is always chunked. Do you know a way to turn-off chunking from a MULE
client?

I'd also like to know why we are not seeing the authorization-headers and
have uploaded the source code. 

Thanks a lot again!

-Dave

   







I'm not  http://www.nabble.com/file/p23837605/src.zip src.zip 
http://www.nabble.com/file/p23837605/Request.log Request.log 




dkulp wrote:
> 
> On Thu May 28 2009 2:17:22 pm CA-Dave wrote:
>> Hi,
>>
>> I've written a webservice client program using CXF 2.2.1. The web service
>> implements WS security and the client seems to be working fine except
>> when
>> I need to turn on/off chunking using http-conf:conduit properties. It
>> appears that chunking is always turned-off. None of the properties
>> specified within the http-conf element kicks in. I added the
>> http:authorization without any luck.
> 
> Can you create a sample and attach to a JIRA?    Mostly concerned about
> the 
> authorization.
> 
> Regarding the chunking:  even if chunking is turned on (which is the
> default), 
> if the message is less than 4K (I think, would need to look at the code to 
> refresh my memory) which is the size of a "chunk", then it's not sent in 
> chunked form.   The main reason is that in chunked form with the 
> HTTPUrlConnection, a minimum of 3 network packets are sent.  One for the 
> headers + the first chunk size, the chunk itself, and finally the "0" to
> mark 
> the end.      In non-chunked, the HTTPUrlConnection is a bit smarter and
> uses 
> less network packets.   However, once around 4K is hit, the benefits of
> the 
> chunking override the packet issue.
> 
> Dan
> 
> 
>> Any suggestions or pointers will be greatly appreciated!
>>
>> Thanks,
>> Dave
>> http://www.nabble.com/file/p23767127/ClientAppContext2.xml
>> ClientAppContext2.xml
> 
> -- 
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
> 
> 

-- 
View this message in context: http://www.nabble.com/Transfer-Encoding---Http-conf%3Aconduit-Properties-tp23767127p23837605.html
Sent from the cxf-user mailing list archive at Nabble.com.