You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by callagc4 <ca...@fineos.com> on 2008/02/29 12:27:16 UTC

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:4FD166D21C85599ED51204282413560@apache.org";
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....@apache.org>

<?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-wssecurity-secext-1.0.xsd"
soapenv:mustUnderstand="true"><wsse:UsernameToken
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
wsu:Id="UsernameToken-22589165"><wsse:Username>OASIS</wsse:Username><wsse:Password
Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-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/operationtypes"><encodedFile>0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAABAAAAIgAAAAAAAAAAEAAAJAAAAAEAAAD+////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/operationtypes" 
  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/documentproduction/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/operationtypes">
	     <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: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: MTOM with HTTP??

Posted by Thilina Gunarathne <cs...@gmail.com>.
BTW are you using Rampart... I'm not sure about the MTOM behavior with
Rampart.  There were known issues with MTOM+Rampart, which I'm not
aware anybody fixing them:(..

Please test without WSSec and report a JIRA to Rampart if it works
without security..

Thilina

On Fri, Feb 29, 2008 at 10:52 AM, Thilina Gunarathne <cs...@gmail.com> wrote:
> Hi,
>  Try using the xmime schema as mentioned in
>  http://ws.apache.org/axis2/1_3/mtom-guide.html#25..
>
>  thanks,
>  Thilina
>
>
>
>  On Fri, Feb 29, 2008 at 6:51 AM, Paul Fremantle <pz...@gmail.com> wrote:
>  > I'm guessing that when the data is being set into the OMText element
>  >  its not set as "optimize=true".
>  >
>  >  Paul
>  >
>  >
>  >
>  >  On Fri, Feb 29, 2008 at 11:27 AM, callagc4 <ca...@fineos.com> wrote:
>  >  >
>  >  >
>  >  >  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:4FD166D21C85599ED51204282413560@apache.org";
>  >  >  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....@apache.org>
>  >  >
>  >  >  <?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-wssecurity-secext-1.0.xsd"
>  >  >  soapenv:mustUnderstand="true"><wsse:UsernameToken
>  >  >  xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
>  >  >  wsu:Id="UsernameToken-22589165"><wsse:Username>OASIS</wsse:Username><wsse:Password
>  >  >  Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-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/operationtypes"><encodedFile>0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAABAAAAIgAAAAAAAAAAEAAAJAAAAAEAAAD+////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/operationtypes"
>  >  >   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/documentproduction/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/operationtypes">
>  >  >              <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: axis-user-unsubscribe@ws.apache.org
>  >  >  For additional commands, e-mail: axis-user-help@ws.apache.org
>  >  >
>  >  >
>  >
>  >
>  >
>  >  --
>  >  Paul Fremantle
>  >  Co-Founder and VP of Technical Sales, WSO2
>  >  OASIS WS-RX TC Co-chair
>  >
>  >  blog: http://pzf.fremantle.org
>  >  paul@wso2.com
>  >
>  >  "Oxygenating the Web Service Platform", www.wso2.com
>  >
>  >
>  >
>  >  ---------------------------------------------------------------------
>  >  To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>  >  For additional commands, e-mail: axis-user-help@ws.apache.org
>  >
>  >
>
>
>
>  --
>  Thilina Gunarathne  - http://thilinag.blogspot.com
>



-- 
Thilina Gunarathne  - http://thilinag.blogspot.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: MTOM with HTTP??

Posted by Thilina Gunarathne <cs...@gmail.com>.
Hi,
Try using the xmime schema as mentioned in
http://ws.apache.org/axis2/1_3/mtom-guide.html#25..

thanks,
Thilina

On Fri, Feb 29, 2008 at 6:51 AM, Paul Fremantle <pz...@gmail.com> wrote:
> I'm guessing that when the data is being set into the OMText element
>  its not set as "optimize=true".
>
>  Paul
>
>
>
>  On Fri, Feb 29, 2008 at 11:27 AM, callagc4 <ca...@fineos.com> wrote:
>  >
>  >
>  >  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:4FD166D21C85599ED51204282413560@apache.org";
>  >  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....@apache.org>
>  >
>  >  <?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-wssecurity-secext-1.0.xsd"
>  >  soapenv:mustUnderstand="true"><wsse:UsernameToken
>  >  xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
>  >  wsu:Id="UsernameToken-22589165"><wsse:Username>OASIS</wsse:Username><wsse:Password
>  >  Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-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/operationtypes"><encodedFile>0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAABAAAAIgAAAAAAAAAAEAAAJAAAAAEAAAD+////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/operationtypes"
>  >   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/documentproduction/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/operationtypes">
>  >              <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: axis-user-unsubscribe@ws.apache.org
>  >  For additional commands, e-mail: axis-user-help@ws.apache.org
>  >
>  >
>
>
>
>  --
>  Paul Fremantle
>  Co-Founder and VP of Technical Sales, WSO2
>  OASIS WS-RX TC Co-chair
>
>  blog: http://pzf.fremantle.org
>  paul@wso2.com
>
>  "Oxygenating the Web Service Platform", www.wso2.com
>
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>  For additional commands, e-mail: axis-user-help@ws.apache.org
>
>



-- 
Thilina Gunarathne  - http://thilinag.blogspot.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: MTOM with HTTP??

Posted by callagc4 <ca...@fineos.com>.

Hi Paul,

At what point is the OMText node created? I have debugged the code to the
oint where the toEnvelope() method is called on the stub, the
optimizeContent() method does return true. Should this not mean that the
attachment is sent outside of the envelope?

Thanks,
Cathal


pzfreo wrote:
> 
> I'm guessing that when the data is being set into the OMText element
> its not set as "optimize=true".
> 
> Paul
> 
> On Fri, Feb 29, 2008 at 11:27 AM, callagc4 <ca...@fineos.com>
> wrote:
>>
>>
>>  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:4FD166D21C85599ED51204282413560@apache.org";
>>  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....@apache.org>
>>
>>  <?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-wssecurity-secext-1.0.xsd"
>>  soapenv:mustUnderstand="true"><wsse:UsernameToken
>> 
>> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
>> 
>> wsu:Id="UsernameToken-22589165"><wsse:Username>OASIS</wsse:Username><wsse:Password
>> 
>> Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-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/operationtypes"><encodedFile>0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAABAAAAIgAAAAAAAAAAEAAAJAAAAAEAAAD+////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/operationtypes"
>>   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/documentproduction/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/operationtypes">
>>              <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: axis-user-unsubscribe@ws.apache.org
>>  For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
> 
> 
> 
> -- 
> Paul Fremantle
> Co-Founder and VP of Technical Sales, WSO2
> OASIS WS-RX TC Co-chair
> 
> blog: http://pzf.fremantle.org
> paul@wso2.com
> 
> "Oxygenating the Web Service Platform", www.wso2.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 
> 

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: MTOM with HTTP??

Posted by Paul Fremantle <pz...@gmail.com>.
I'm guessing that when the data is being set into the OMText element
its not set as "optimize=true".

Paul

On Fri, Feb 29, 2008 at 11:27 AM, callagc4 <ca...@fineos.com> wrote:
>
>
>  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:4FD166D21C85599ED51204282413560@apache.org";
>  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....@apache.org>
>
>  <?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-wssecurity-secext-1.0.xsd"
>  soapenv:mustUnderstand="true"><wsse:UsernameToken
>  xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
>  wsu:Id="UsernameToken-22589165"><wsse:Username>OASIS</wsse:Username><wsse:Password
>  Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-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/operationtypes"><encodedFile>0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAABAAAAIgAAAAAAAAAAEAAAJAAAAAEAAAD+////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/operationtypes"
>   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/documentproduction/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/operationtypes">
>              <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: axis-user-unsubscribe@ws.apache.org
>  For additional commands, e-mail: axis-user-help@ws.apache.org
>
>



-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: MTOM with HTTP??

Posted by callagc4 <ca...@fineos.com>.

Hi Narayan,

Thanks a million fro your help, setting this property worked for me and it
is now sending the data correctly, i.e via reference.

Agains thanks to all for your replys

Cathal



Narayan Dhillon wrote:
> 
> 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:cathal.callaghan@fineos.com] 
> Sent: 29 February 2008 11:27
> To: axis-user@ws.apache.org
> 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:4FD166D21C85599ED51204282413560@apache.org";
> 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....@apache.org>
> 
> <?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: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 
> *****************************************************
> 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: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 
> 

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org