axis-java-dev mailing list archives

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


Andreas Veithen resolved AXIS2-4786.

    Resolution: Duplicate

Duplicate of AXIS2-4712.

> hardcoded content type in AxisServlet response
> ----------------------------------------------
>                 Key: AXIS2-4786
>                 URL:
>             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(
> 	at org.apache.axis2.builder.SOAPBuilder.processDocument(
> 	at org.apache.axis2.transport.TransportUtils.createDocumentElement(
> 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="">here</a>.
> I have disabled REST in axis2.xml and enabled content negotiation, but that didn't fix
> 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:
For additional commands, e-mail:

View raw message