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 <[EMAIL PROTECTED]> 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:[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-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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Paul Fremantle Co-Founder and VP of Technical Sales, WSO2 OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] "Oxygenating the Web Service Platform", www.wso2.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
