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 foampile <am...@yahoo.com> on 2010/01/07 23:47:24 UTC

Setting HTTP header fields for SOAP request in Axis2

Apparently, Axis 2 does not specify the content-length field in the HTTP
header.  The WS I am dealing with is requiring it, otherwise throwing a "411
Error: Length Required".

Does anyone know how to set the HTTP header using Axis 2 ?

Thanks
-- 
View this message in context: http://old.nabble.com/Setting-HTTP-header-fields-for-SOAP-request-in-Axis2-tp27068422p27068422.html
Sent from the Axis - Dev mailing list archive at Nabble.com.


Re: Setting HTTP header fields for SOAP request in Axis2

Posted by Deepal jayasinghe <de...@gmail.com>.
I think he means chunking, and you can do that as follows

opts.setProperty(HTTPConstants.CHUNKED, false);

opts - an instance of Option which you use for the client.

Thanks,
Deepal
> how do i do this ?  what is chunching ?
>
>
>
> Amila Suriarachchi wrote:
>   
>> On Fri, Jan 8, 2010 at 4:17 AM, foampile <am...@yahoo.com> wrote:
>>
>>     
>>> Apparently, Axis 2 does not specify the content-length field in the HTTP
>>> header.  The WS I am dealing with is requiring it, otherwise throwing a
>>> "411
>>> Error: Length Required".
>>>
>>> Does anyone know how to set the HTTP header using Axis 2 ?
>>>
>>>       
>> switch off chunching. there is a constant in HttpConstants to set this.
>>
>> thanks,
>> Amila.
>>
>>     
>>> Thanks
>>> --
>>> View this message in context:
>>> http://old.nabble.com/Setting-HTTP-header-fields-for-SOAP-request-in-Axis2-tp27068422p27068422.html
>>> Sent from the Axis - Dev mailing list archive at Nabble.com.
>>>
>>>
>>>       
>> -- 
>> Amila Suriarachchi
>> WSO2 Inc.
>> blog: http://amilachinthaka.blogspot.com/
>>
>>
>>     
>
>   


-- 
Thank you!


http://blogs.deepal.org
http://deepal.org


Re: Setting HTTP header fields for SOAP request in Axis2

Posted by foampile <am...@yahoo.com>.
how do i do this ?  what is chunching ?



Amila Suriarachchi wrote:
> 
> On Fri, Jan 8, 2010 at 4:17 AM, foampile <am...@yahoo.com> wrote:
> 
>>
>> Apparently, Axis 2 does not specify the content-length field in the HTTP
>> header.  The WS I am dealing with is requiring it, otherwise throwing a
>> "411
>> Error: Length Required".
>>
>> Does anyone know how to set the HTTP header using Axis 2 ?
>>
> 
> switch off chunching. there is a constant in HttpConstants to set this.
> 
> thanks,
> Amila.
> 
>>
>> Thanks
>> --
>> View this message in context:
>> http://old.nabble.com/Setting-HTTP-header-fields-for-SOAP-request-in-Axis2-tp27068422p27068422.html
>> Sent from the Axis - Dev mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Amila Suriarachchi
> WSO2 Inc.
> blog: http://amilachinthaka.blogspot.com/
> 
> 

-- 
View this message in context: http://old.nabble.com/Setting-HTTP-header-fields-for-SOAP-request-in-Axis2-tp27068422p27078808.html
Sent from the Axis - Dev mailing list archive at Nabble.com.


Re: Setting HTTP header fields for SOAP request in Axis2

Posted by Amila Suriarachchi <am...@gmail.com>.
On Fri, Jan 8, 2010 at 4:17 AM, foampile <am...@yahoo.com> wrote:

>
> Apparently, Axis 2 does not specify the content-length field in the HTTP
> header.  The WS I am dealing with is requiring it, otherwise throwing a
> "411
> Error: Length Required".
>
> Does anyone know how to set the HTTP header using Axis 2 ?
>

switch off chunching. there is a constant in HttpConstants to set this.

thanks,
Amila.

>
> Thanks
> --
> View this message in context:
> http://old.nabble.com/Setting-HTTP-header-fields-for-SOAP-request-in-Axis2-tp27068422p27068422.html
> Sent from the Axis - Dev mailing list archive at Nabble.com.
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/