WS-Security specifies to use DOM to read the SOAP message, that's why
attachments are shown as inline as opposed to attachment.

However I got around this issue by enforcing it to use DOOM which is
(DOM+ AXIOM) as follows:
stub._getServiceClient().getOptions().setProperty(WSSHandlerConstants.US
E_DOOM, Constants.VALUE_TRUE);

Give it a go.

Cheers, Narayan

-----Original Message-----
From: Kondala Rao Vayineni (JIRA) [mailto:[EMAIL PROTECTED] 
Sent: 24 December 2007 17:27
To: [email protected]
Subject: [jira] Created: (RAMPART-130) MTOM with WS-Security

MTOM with WS-Security
---------------------

                 Key: RAMPART-130
                 URL: https://issues.apache.org/jira/browse/RAMPART-130
             Project: Rampart
          Issue Type: Bug
          Components: rampart-integration
    Affects Versions: 1.3
         Environment: Windows XP Professional
            Reporter: Kondala Rao Vayineni
             Fix For: 1.3


Hi, 
  I am doing a simple example with MTOM and WS-Security(Rampart). If I
don't engage rampart then MTOM is working fine. But if engage rampart
and use OutflowSecurity UsernameToken then MTOM is not working. In this
case binery data is going as a part of body. 
Find the SOAP request in the both scenarios.  


MTOM with WS Security SOAP Request 
----------------------------------- 

POST /axis2/services/PayloadTransport?wsdl HTTP/1.1 
Content-Type: multipart/related;
boundary=MIMEBoundaryurn_uuid_B98B9F8C95A886E8931197587620317;
type="application/xop+xml";
start="0.urn:uuid:[EMAIL PROTECTED]";
start-info="application/soap+xml"; action="urn:uploadFile" 
User-Agent: Axis2 
Host: 10.50.25.230:8082 
Transfer-Encoding: chunked 

57b 
--MIMEBoundaryurn_uuid_B98B9F8C95A886E8931197587620317 
Content-Type: application/xop+xml; charset=UTF-8;
type="application/soap+xml" 
Content-Transfer-Encoding: binary 
Content-ID: <0.urn:uuid:[EMAIL PROTECTED]> 
   <?xml version='1.0' encoding='UTF-8'?> 
      <soapenv:Envelope
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";
xmlns:wsa="http://www.w3.org/2005/08/addressing";> 
         <soapenv:Header> 
            <wsse:Security
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wsse
curity-secext-1.0.xsd" soapenv:mustUnderstand="true"> 
               <wsse:UsernameToken
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssec
urity-utility-1.0.xsd" wsu:Id="UsernameToken-29420695"> 
                  <wsse:Username>kondala</wsse:Username> 
                  <wsse:Password
Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-t
oken-profile-1.0#PasswordText">kondala</wsse:Password> 
               </wsse:UsernameToken> 
            </wsse:Security> 
 
<wsa:To>http://10.50.25.230:8082/axis2/services/PayloadTransport?wsdl&lt
;/wsa:To> 
 
<wsa:MessageID>urn:uuid:B98B9F8C95A886E8931197587620034</wsa:MessageID> 
            <wsa:Action>urn:uploadFile</wsa:Action> 
         </soapenv:Header> 
         <soapenv:Body> 
            <ns1:uploadFile xmlns:ns1="http://pojo.poc.adp.com";> 
               <ns1:data>QSBzYW1wbGUgTVRPTSBBdHRhY2htZW50</ns1:data> 
               <ns1:fileName>xmlrules.xml.upload</ns1:fileName> 
            </ns1:uploadFile> 
         </soapenv:Body> 
 
</soapenv:Envelope>--MIMEBoundaryurn_uuid_B98B9F8C95A886E893119758762031
7--0 


--------------------------------- 
MTOM without WS Security SOAP Request 
----------------------------------- 

POST /axis2/services/PayloadTransport?wsdl HTTP/1.1 
Content-Type: multipart/related;
boundary=MIMEBoundaryurn_uuid_9E8BD1C1934D690B4E1197587662146;
type="application/xop+xml";
start="0.urn:uuid:[EMAIL PROTECTED]";
start-info="application/soap+xml"; action="urn:uploadFile" 
User-Agent: Axis2 
Host: 10.50.25.230:8082 
Transfer-Encoding: chunked 

4c9 
--MIMEBoundaryurn_uuid_9E8BD1C1934D690B4E1197587662146 
Content-Type: application/xop+xml; charset=UTF-8;
type="application/soap+xml" 
Content-Transfer-Encoding: binary 
Content-ID: <0.urn:uuid:[EMAIL PROTECTED]> 
   <?xml version='1.0' encoding='UTF-8'?> 
      <soapenv:Envelope
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";
xmlns:wsa="http://www.w3.org/2005/08/addressing";> 
         <soapenv:Header> 
 
<wsa:To>http://10.50.25.230:8082/axis2/services/PayloadTransport?wsdl&lt
;/wsa:To> 
 
<wsa:MessageID>urn:uuid:9E8BD1C1934D690B4E1197587661942</wsa:MessageID> 
            <wsa:Action>urn:uploadFile</wsa:Action> 
         </soapenv:Header> 
         <soapenv:Body> 
            <ns1:uploadFile xmlns:ns1="http://pojo.poc.adp.com";> 
               <ns1:data> 
                  <xop:Include
href="cid:1.urn:uuid:[EMAIL PROTECTED]"
xmlns:xop="http://www.w3.org/2004/08/xop/include"; /> 
               </ns1:data> 
               <ns1:fileName>xmlrules.xml.upload</ns1:fileName> 
            </ns1:uploadFile> 
         </soapenv:Body> 
 
</soapenv:Envelope>--MIMEBoundaryurn_uuid_9E8BD1C1934D690B4E119758766214
6Content-Type: application/octet-streamContent-Transfer-Encoding:
binaryContent-ID: 
      <1.urn:uuid:[EMAIL PROTECTED]>A sample
MTOM Attachment--MIMEBoundaryurn_uuid_9E8BD1C1934D690B4E1197587662146--0



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


*****************************************************
This email is issued by a VocaLink group company. It is confidential and 
intended for the exclusive use of the addressee only. You should not disclose 
its contents to any other person. If you are not the addressee (or responsible 
for delivery of the message to the addressee), please notify the originator 
immediately by return message and destroy the original message. The contents of 
this email will have no contractual effect unless it is otherwise agreed 
between a specific VocaLink group company and the recipient.
 
The VocaLink group companies include, among others: VocaLink Limited (Company 
No 06119048, VAT No. 907 9619 87) which is registered in England and Wales at 
registered office Drake House, Homestead Road, Rickmansworth, WD3 1FX. United 
Kingdom, Voca Limited (Company no 1023742, VAT No. 907 9619 87) which is 
registered in England and Wales at registered office Drake House, Three Rivers 
Court, Homestead Road, Rickmansworth, Hertfordshire. WD3 1FX. United Kingdom, 
LINK Interchange Network Limited (Company No 3565766, VAT No. 907 9619 87) 
which is registered in England and Wales at registered office Arundel House, 1 
Liverpool Gardens, Worthing, West Sussex, BN11 1SL and VocaLink Holdings 
Limited (Company No 06119036, VAT No. 907 9619 87) which is registered in 
England and Wales at registered office Drake House, Homestead Road, 
Rickmansworth, WD3 1FX. United Kingdom.
 
The views and opinions expressed in this email may not reflect those of any 
member of the VocaLink group. This message and any attachments have been 
scanned for viruses prior to leaving the VocaLink group network; however, 
VocaLink does not guarantee the security of this message and will not be 
responsible for any damages arising as a result of any virus being passed on or 
arising from any alteration of this message by a third party. The VocaLink 
group may monitor emails sent to and from the VocaLink group network.
 
This message has been checked for all email viruses by MessageLabs.
*************************************************************

Reply via email to