You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Guillaume Nodet <gn...@gmail.com> on 2008/04/01 15:19:32 UTC

Re: Wrong content type produced by CXF BC provider

Sure, please do.  But if the patch is against CXF, you'd better raise it on
  http://issues.apache.org/jira/browse/CXF

On Tue, Apr 1, 2008 at 4:01 PM, Gianfranco Boccalon <
gianfranco.boccalon@eng.it> wrote:

> Hi all,
> I found a problem on the CXF BC provider: I'm sending a MTOM/XOP message
> and I found an error on the content type of the first SOAP part (the one
> containing the SOAP envelope).
>
> As you can see the attribute "type" of the part contains also the
> attributes action and charset:
>
> ------=_Part_0_20040450.1206892450875
>
> Content-Type: application/xop+xml; charset=UTF-8;
> type="application/soap+xml;
> action="urn:ihe:iti:2007:RetrieveDocumentSet"; charset=UTF-8"
>
>
> The correct value for the attribute should be:
>
> ------=_Part_0_20040450.1206892450875
>
> Content-Type: application/xop+xml; charset=UTF-8;
> type="application/soap+xml";
>
> I found the problem in the class
> org.apache.cxf.attachment.AttachmentSerializer in the method
> writeProlog().
> The code that produces the problem is:
>
>        mimeBodyCt.append("application/xop+xml; charset=")
>        .append(enc)
>        .append("; type=\"")
>        .append(bodyCt)
>        .append("; charset=")
>        .append(enc)
>        .append("\"");
>
>
> while it should be:
>
>        mimeBodyCt.append("application/xop+xml; charset=")
>            .append(enc)
>            .append("; type=\"")
>            .append(bodyCt)
>            .append("\";");
>
> I found a similar problem on the header of the SOAP request, on the
> attribute start-info:
>
> Content-Type: multipart/related; type="application/xop+xml";
> boundary="----=_Part_0_20040450.1206892450875";
> start="<ro...@cxf.apache.org>"; start-info="application/soap+xml;
> action="urn:ihe:iti:2007:RetrieveDocumentSet""
>
> it should be:
>
> Content-Type: multipart/related; type="application/xop+xml";
> boundary="----=_Part_0_20040450.1206892450875";
> start="<ro...@cxf.apache.org>";
> start-info="application/soap+xml";
> action="urn:ihe:iti:2007:RetrieveDocumentSet"
>
>
> The problem is aways on the same class.
> Should I raise a JIRA ?
>
> Regards
> Gianfranco Boccalon
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/