MTOM: JAX-RS response missing XOP attachment
--------------------------------------------
Key: CXF-2857
URL: https://issues.apache.org/jira/browse/CXF-2857
Project: CXF
Issue Type: Bug
Components: JAX-RS
Affects Versions: 2.2.9
Environment: WIndows 7 64 bit, JBoss AS 5.01
Reporter: Andrew Bryndin
Priority: Critical
Hi,
We have configured our JAX-RS service endpoint to support mtom
<jaxrs:server
...
<jaxrs:properties>
<entry key="mtom-enabled" value="true"/>
<entry key="mtom-threshold" value="0"/>
</jaxrs:properties>
</jaxrs:server>
Service resource @Produces("multipart/related") mime type, client Accepts the
same
Service returns JAXB object with DataHandler field
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "DocData", propOrder = {
"uri",
"data"
})
public class DocData {
protected String uri;
@XmlMimeType("application/octet-stream")
protected DataHandler data;
Response generated by server
HTTP/1.1 201 Created
Server: Apache-Coyote/1.1
Location:
http://localhost:8081/ds-doc-store/documents/6711b0bf-0a2a-4e06-b48f-4c27243ae9a2
Date: Fri, 18 Jun 2010 20:57:53 GMT
Content-Type: multipart/related; type="application/xop+xml";
boundary="uuid:692e6f1f-ed9e-4027-8841-29bd5550eea5"; start="<1>";
start-info="text/xml"
Content-Length: 1017
--uuid:692e6f1f-ed9e-4027-8841-29bd5550eea5
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml";
Content-Transfer-Encoding: binary
Content-ID: <1>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><documentResp
xmlns="http://www.bla.com/data-services"
modifiedDate="2010-06-18T13:57:54.049-07:00"
createdDate="2010-06-18T13:57:54.049-07:00"
docId="6711b0bf-0a2a-4e06-b48f-4c27243ae9a2" ssn="123-45-6789" appVersion="1.0"
appId="TTO" year="2010" docTypeId="W2" docName="Test
Document"><docProperties><docProperty
propertyName="ein">1276894673334</docProperty><docProperty
propertyName="wages">1276894673334</docProperty></docProperties>
<docData>
<data><xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include"
href="cid:[email protected]"/></data>
</docData>
<link title="Test Document" rel="self"
href="http://localhost:8081/ds-doc-store/documents/6711b0bf-0a2a-4e06-b48f-4c27243ae9a2"/></documentResp>
--uuid:692e6f1f-ed9e-4027-8841-29bd5550eea5--
data element contains the xop reference but the actual xop attachment is
missing.
<data><xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include"
href="cid:[email protected]"/></data>
CXF-RS WebClient seems to work fine, attaching xop binary in request, and
server properly processes request with xop, so it only happens with outbound
message's on server side, in both cases same JAXB object with DataHandler field
was used.
Thanks
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.