Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
1.1, 1.2, 1.3
-
None
-
None
-
Axis2 1.3, Rampart 1.3, Tomcat 5.5
Description
There is an issue with Rampart Security and MTOM, whenever Rampart is engaged, it includes the attachment file as base64 encoded string inside soap envelope. However without Rampart, attachment file is included as Mime part and reference using xop:include from Soap envelope.
RAMPART-77 and RAMPART-96 seems to be related but no response seen to them, Please advise if it is know issue in Rampart or we are missing something?
Thanks, Narayan
Examples -
(1) Soap envelope - MTOM with Rampart - No Mime part for attachment and file is inlined inside Soap envelope.
dd5
--MIMEBoundaryurn_uuid_9395065C4A7701CDBE1196433529155
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
Content-Transfer-Encoding: binary
Content-ID: <0.urn:uuid:9395065C4A7701CDBE1196433529156@apache.org>
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<wsse:Security>....
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<ns1:request xmlns:ns1="urn:com.test.request">
<requestId xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="id-3571905">STS2S.zip</requestId>
<file>QA4AAAAwAAAAAAA...</file>
</ns1:InitiatePaymentRequest>
</soapenv:Body>
</soapenv:Envelope>
3a
-MIMEBoundaryurn_uuid_9395065C4A7701CDBE1196433529155-
(2) MTOM without Ramprt - File is correctly as mime part.
--MIMEBoundaryurn_uuid_8D93BCF1C2142A74821196338403433
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
Content-Transfer-Encoding: binary
Content-ID: <0.urn:uuid:8D93BCF1C2142A74821196338403434@apache.org>
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing">
<soapenv:Header>
<wsa:To>http://localhost:8090/axis2/services/PaymentInitiation2</wsa:To>
<wsa:MessageID>urn:uuid:8D93BCF1C2142A74821196338403338</wsa:MessageID>
<wsa:Action>""</wsa:Action>
</soapenv:Header>
<soapenv:Body>
<ns1:request xmlns:ns1="urn:com.test.request">
<requestId>downloaded.dat</requestId>
<file>
<xop:Include href="cid:1.urn:uuid:8D93BCF1C2142A74821196338403513@apache.org" xmlns:xop="http://www.w3.org/2004/08/xop/include" />
</file>
</ns1:InitiatePaymentRequest>
</soapenv:Body>
</soapenv:Envelope>
--MIMEBoundaryurn_uuid_8D93BCF1C2142A74821196338403433
Content-Type: application/octet-streamContent-Transfer-Encoding: binaryContent-ID: <1.urn:uuid:8D93BCF1C2142A74821196338403513@apache.org>......binary data....
-MIMEBoundaryurn_uuid_8D93BCF1C2142A74821196338403433-0
(3) Client code -
OMFactory fac = OMAbstractFactory.getOMFactory();
OMElement msg = fac.createOMElement("request ", fac.createOMNamespace("urn:com.test.request", "ns1"));
OMElement reqId = fac.createOMElement("requestId", null);
reqId.addChild(fac.createOMText(msg, "downloaded.dat"));
msg.addChild(reqId);
//Add MTOM data source...
DataHandler dataHandler = new DataHandler(new FileDataSource("test.zip"));
OMElement file= fac.createOMElement("file", null);
OMText mtom = fac.createOMText(dataHandler, true);
mtom.setOptimize(true);
file.addChild(mtom);
msg.addChild(file);
OMElement response = stub.upload(msg);
Attachments
Issue Links
- duplicates
-
RAMPART-96 MTOM+Rampart,binary node at client side is converted to plain text node at server side.
- Open
- is related to
-
AXIOM-264 Serializing an MTOM SOAPEnvelope inlines the attachments
- Closed