axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Veithen (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (AXIS2-4786) hardcoded content type in AxisServlet response
Date Sat, 31 Jul 2010 10:20:16 GMT

     [ https://issues.apache.org/jira/browse/AXIS2-4786?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Andreas Veithen resolved AXIS2-4786.
------------------------------------

    Resolution: Duplicate

Duplicate of AXIS2-4712.

> hardcoded content type in AxisServlet response
> ----------------------------------------------
>
>                 Key: AXIS2-4786
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4786
>             Project: Axis2
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: 1.5.1
>         Environment: Windows XP, JBoss 4.3, Spring Framework, Axis2 embedded in app war
>            Reporter: john c
>
> I get this error on the client side:
> Transport level information does not match with SOAP Message namespace URI
> 	at org.apache.axis2.builder.BuilderUtil.validateSOAPVersion(BuilderUtil.java:768)
> 	at org.apache.axis2.builder.SOAPBuilder.processDocument(SOAPBuilder.java:62)
> 	at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:197)
> This happens because the response header Content-Type is text/xml.
> Background:
> I use Soap1.2. My request contains Content-Type: application/soap+xml;charset=UTF-8,
doesn't have SOAPAction header (to avoid Soap1.1 processing) and the soap envelope is serialized
by Soap1.2 formatter.
> On the server side I have the same setup: Soap1.2 formatter, the messageType on the response
message context is set to application/soap+xml, I tried to set HTTP Content-Type header manually
as per <a href="http://www.keith-chapman.org/2008/10/axis2-setting-custom-http-headers-on.html">here</a>.
> I have disabled REST in axis2.xml and enabled content negotiation, but that didn't fix
anything.
> The problem is that the org.apache.axis2.transport.http.AxisServlet class hardcodes the
contenttype on line 160:
> response.setContentType("text/xml; charset="
>                         + msgContext
>                         .getProperty(Constants.Configuration.CHARACTER_SET_ENCODING));
> I suggest replacing "text/xml" part with msgContext.getProperty(Constants.MESSAGE_TYPE)
and hardcoding if not set.

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


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


Mime
View raw message