Try following in your client to force MTOM with WS-Securty...
stub._getServiceClient().getOptions().setProperty(WSSHandlerConstants.US
E_DOOM, Constants.VALUE_TRUE);

-----Original Message-----
From: callagc4 [mailto:[EMAIL PROTECTED] 
Sent: 29 February 2008 11:27
To: [email protected]
Subject: MTOM with HTTP??



Hi,

I have created a sample service for uploading a binary document. This is
defined using the appropriate xsd:base64Binary type. I am using Axis2
version 1.3. I am using ADB data binding. I have enabled MTOM on the
client
by setting the Constants.Configuration.ENABLE_MTOM property to true.
When
the request is sent the mime boundaries and content type are present but
the
binary data is sent in the soap envolope instead of ouside as an
attachment.
Why is this happening? has anyone seen this behaviour? Example output
and
WSDL is below.

Thanks,
Cathal

Request output:

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

20f1
--MIMEBoundaryurn_uuid_4FD166D21C85599ED51204282413559
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";><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-22589165"><wsse:Username>OASIS</wsse:Username><wss
e:Password
Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-t
oken-profile-1.0#PasswordText">OASIS</wsse:Password></wsse:UsernameToken
></wsse:Security></soapenv:Header><soapenv:Body><ns1:uploadFile
xmlns:ns1="http://www.fineos.com/frontoffice/documentproduction/operatio
ntypes"><encodedFile>0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAA
AAAAAAAABAAAAIgAAAAAAAAAAEAAAJAAAAAEAAAD+////AAAAACEAAAD</encodedFile></
ns1:uploadFile></soapenv:Body></soapenv:Envelope>
3a

--MIMEBoundaryurn_uuid_4FD166D21C85599ED51204282413559--
0

Example WSDL:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
targetNamespace="http://www.fineos.com/frontoffice/documentproduction/op
erationtypes" 
  xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"; 
  xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"; 
  xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"; 
  xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"; 
  xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
 
xmlns:operationtypes="http://www.fineos.com/frontoffice/documentproducti
on/operationtypes" 
  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";>
  <wsdl:types>
    <xs:schema
targetNamespace="http://www.fineos.com/frontoffice/documentproduction/op
erationtypes">
             <xs:element name="uploadFile">
                 <xs:complexType>
                     <xs:sequence>
                         <xs:element minOccurs="0" name="encodedFile"
nillable="true" type="xs:base64Binary"/>
                         <xs:element minOccurs="0" name="parentDirName"
nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="uploadFileResponse">
                 <xs:complexType>
                     <xs:sequence>
                         <xs:element minOccurs="0" name="return"
nillable="true"
type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
         </xs:schema>
  </wsdl:types>
  
  <wsdl:message name="uploadFileRequest">
    <wsdl:part name="parameters" element="operationtypes:uploadFile">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="uploadFileResponse">
    <wsdl:part name="parameters"
element="operationtypes:uploadFileResponse">
    </wsdl:part>
  </wsdl:message>
  
  <wsdl:portType name="DocProdServicesPortType">
    <wsdl:operation name="uploadFile">
      <wsdl:input message="operationtypes:uploadFileRequest"
wsaw:Action="urn:uploadFile">
    </wsdl:input>
      <wsdl:output message="operationtypes:uploadFileResponse"
wsaw:Action="urn:uploadFileResponse">
    </wsdl:output>
    </wsdl:operation>
  </wsdl:portType>
  
  <wsdl:binding name="DocProdServicesSOAP12Binding"
type="operationtypes:DocProdServicesPortType">
    <wsdl:operation name="uploadFile">
      <soap12:operation soapAction="urn:uploadFile" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:binding name="DocProdServicesSOAP11Binding"
type="operationtypes:DocProdServicesPortType">
    <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="uploadFile">
      <soap:operation soapAction="urn:uploadFile" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation> 
  </wsdl:binding>
  <wsdl:binding name="DocProdServicesHttpBinding"
type="operationtypes:DocProdServicesPortType">
    <http:binding verb="POST"/>
    <wsdl:operation name="uploadFile">
      <http:operation location="DocProdServices/uploadFile"/>
      <wsdl:input>
        <mime:content part="uploadFile" type="text/xml"/>
      </wsdl:input>
      <wsdl:output>
        <mime:content part="uploadFile" type="text/xml"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  
  <wsdl:service name="DocProdServices">
    <wsdl:port name="DocProdServicesSOAP11port_http"
binding="operationtypes:DocProdServicesSOAP11Binding">
      <soap:address
location="http://localhost:8080/axis2/service/DocProdServices"/>
    </wsdl:port>
    <wsdl:port name="DocProdServicesSOAP12port_http"
binding="operationtypes:DocProdServicesSOAP12Binding">
      <soap12:address
location="http://localhost:8080/axis2/service/DocProdServices"/>
    </wsdl:port>
    <wsdl:port name="DocProdServicesHttpport"
binding="operationtypes:DocProdServicesHttpBinding">
      <http:address
location="http://localhost:8080/axis2/service/DocProdServices"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>


-- 
View this message in context:
http://www.nabble.com/MTOM-with-HTTP---tp15756660p15756660.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


*****************************************************
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.
*************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to