cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guillaume Porcher (JIRA)" <>
Subject [jira] Created: (CXF-2318) Invalid message created when using MTOM and WS-RM
Date Fri, 26 Jun 2009 10:13:07 GMT
Invalid message created when using MTOM and WS-RM

                 Key: CXF-2318
             Project: CXF
          Issue Type: Bug
          Components: WS-* Components
    Affects Versions: 2.2.2
            Reporter: Guillaume Porcher

When using WS-RM and MTOM, the generated message content is:

POST /services/SayHello HTTP/1.1

Content-Type: multipart/related; type="application/xop+xml"; boundary="uuid:d861ffd6-2559-491d-b995-4420ac2e99e0";
start="<>"; start-info="application/soap+xml"

Accept: */*

User-Agent: Apache CXF 2.2.2

Cache-Control: no-cache

Pragma: no-cache

Host: localhost:12345

Connection: keep-alive

Content-Length: 1619


Content-Type: application/xop+xml; charset=UTF-8; type="application/soap+xml";

Content-Transfer-Encoding: binary

Content-ID: <>


Content-Type: application/octet-stream

Content-Transfer-Encoding: binary

Content-ID: <d027f743-11a2-45e8-b95e-592f8b751bb4-1@>

attachment content

--uuid:d861ffd6-2559-491d-b995-4420ac2e99e0--<soap:Envelope xmlns:soap=""><soap:Header><Action
xmlns:ns2="" xmlns:wsrm=""><wsrm:Identifier>urn:uuid:b5383bf0-2444-4af8-b923-146d02610ab5</wsrm:Identifier><wsrm:MessageNumber>1</wsrm:MessageNumber></wsrm:Sequence></soap:Header><soap:Body><ns1:hello
xmlns:xop="" href=""/></arg1></ns1:hello></soap:Body></soap:Envelope>

The soap envelope is sent after the last attachment instead of being in the <>

This bug seems to be caused by :
1- the AttachmentOutInterceptor writes the prolog by using the current message outputstream
2- the RetransmissionInterceptor wraps the message outputstream in a WriteOnCloseOutputStream
3- the soap envelope is written in the current message outputsream OS2.
4- the attachments are written in the outputstream OS1 used to write the prolog.
5- the WriteOnCloseOutputstream OS2 is closed, and the soap envelope is appended in the wrapped
outputstream OS1.

Setting the RetransmissionInterceptor to be before AttachmentOutInterceptor in the interceptor
chain seems to solve this issue.

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

View raw message