Announcement Announcement Module
No announcement yet.
Duplicate Contect Type header in the SOAP response Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Duplicate Contect Type header in the SOAP response

    Hi All,

    I have converted one of our existing web service that was implemented using Axis + Spring to Spring WS, everyting went well except that in the SOAP response, I got duplicate content type header. Any thoughts?

    HTTP/1.1 100 Continue
    Server: Oracle Application Server Containers for J2EE 10g (
    Date: Thu, 23 Nov 2006 14:44:56 GMT

    HTTP/1.1 200 OK
    Date: Thu, 23 Nov 2006 14:44:58 GMT
    Server: Oracle Application Server Containers for J2EE 10g (
    Connection: Keep-Alive
    Keep-Alive: timeout=15, max=100
    Content-Type: application/octet-stream
    Content-Type: text/xml; charset="utf-8"
    Content-Length: 12370
    SOAPAction: ""
    Transfer-Encoding: chunked

    <SOAP-ENV:Envelope xmlns:SOAP-ENV="">

  • #2
    Hmm, looks like a bug. The "text/xml" header is the correct one. Could you file one in JIRA? Make sure you enter details about with SOAP implementation you are using (SAAJ or Axiom).



    • #3
      SaajSoapMessageContextFactory is missing?

      I seems like this problem is fixed in M3, so I downloaded the jars files, but I got another problem. I got the ClassNotFound exception for messageContextFactory

      <bean id="messageContextFactory"
      class=" ssageContextFactory" />

      any idea? Thanks in advance


      • #4
        Yes, there has been done some refactorings in the last couple of weeks. This is mainly due to the upcoming client-side support.

        One of the changes is that the various message context factories have been changed to a message factories. So, in your case, you should change to the following:

        <bean id="messageFactory" class=""/>
        You can check out the sample applications to see if there are more changes required.

        I will include some migration notes in the upcoming M3 release, to be released later this month.


        • #5
          Thanks Arjen. At the same time, I found a work around of this problem with OC4J for now. It seems like the OC4J container get the default MIME type from
          orion-web.xml, so I created a customized orion-web.xml file like below:

          <orion-web-app deployment-version=""
          temporary-directory="./temp" internationalize-resources="false"

          and then packag it into EAR file. This might help if somebody had the same problem.