Rampart and MTOM not working together
-------------------------------------
Key: RAMPART-118
URL: https://issues.apache.org/jira/browse/RAMPART-118
Project: Rampart
Issue Type: Bug
Components: rampart-core
Affects Versions: 1.1, 1.2, 1.3
Environment: Axis2 1.3, Rampart 1.3, Tomcat 5.5
Reporter: Narayan S Dhillon
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:[EMAIL PROTECTED]>
<?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:[EMAIL PROTECTED]>
<?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:[EMAIL PROTECTED]"
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:[EMAIL PROTECTED]>......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);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.