axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "naveen kvm (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AXIS2-4219) Overriding Content-Type HTTP Header Fails
Date Thu, 22 Jan 2009 13:53:59 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-4219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12666143#action_12666143
] 

naveen kvm commented on AXIS2-4219:
-----------------------------------

If you find any solution, please mail to naveenkvm@gmail.com

> Overriding Content-Type HTTP Header Fails
> -----------------------------------------
>
>                 Key: AXIS2-4219
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4219
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.4.1
>         Environment: Axis 1.4.1, adb, no atachments with request message
>            Reporter: naveen kvm
>            Priority: Blocker
>
> I need to override the Content-Type HTTP header value while sending gzip request to .NET
webservice.
> I am getting the following error:
> HTTP/1.1 415 Cannot process the message because the content type 'text/xml; charset=UTF-8'
was not the expected type 'application/x-gzip'.\r\n
> I am using SOAP 1.1 and HTTP 1.1.
> the .NET webservice expects the value of Content-Type header to be application/x-gzip.
> I have added a new header for content type as follows in my code:
> this.addHttpHeader(_messageContext, "Content-Type","application/x-gzip");
> But now i am facing different exception from. NET webservice:
> <h1>Bad Request (Invalid Header Name)</h1>
> This is because the request message now contains 2 headers for Content-Type with values
as 'text/xml; charset=UTF-8'  and 'application/x-gzip'.
> I want to edit the content-type header and change it's value to application/x-gzip.
> I have enabled g-zip support as follows in my stub class:
> 		  _serviceClient.getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.MC_ACCEPT_GZIP,
> 		  Boolean.TRUE);
> 		  _serviceClient.getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.MC_GZIP_REQUEST,
> 		  Boolean.TRUE);
> 		  _serviceClient.getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.MC_GZIP_RESPONSE,Boolean.TRUE);
> 		  _serviceClient.getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.COMPRESSION_GZIP,Boolean.TRUE);
> 		  _serviceClient.getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED,Boolean.FALSE);
> 		  _serviceClient.getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.HEADER_CONTENT_TYPE,"application/x-gzip");
> Plz help me to edit the value of Content-Type header in Axis2 1.4.1 ADB generated stub
or client while sending the request.
> Thanks in advance.
> Naveen.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message