[ http://issues.apache.org/jira/browse/AXIS2-952?page=comments#action_12424838 ] Francisco Fernandez commented on AXIS2-952: -------------------------------------------
In axis2.xml file, I have <parameter name="enableMTOM" locked="false">true</parameter> > MTOM databinding NOT send raw binary data > ----------------------------------------- > > Key: AXIS2-952 > URL: http://issues.apache.org/jira/browse/AXIS2-952 > Project: Apache Axis 2.0 (Axis2) > Issue Type: Bug > Affects Versions: 1.0 > Environment: WindosXP, tomcat 5.5, jdk1.5, Axis2 1.0 > Reporter: Francisco Fernandez > Attachments: MTOMSample.wsdl > > > With the next WSDL: > <?xml version="1.0" encoding="UTF-8"?> > <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:tns="http://foo.com/types/" > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" > xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" > targetNamespace="http://foo.com/types/"> > <types> > <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:xmime="http://www.w3.org/2005/05/xmlmime" > elementFormDefault="qualified" targetNamespace="http://foo.com/types/"> > <xsd:import > namespace="http://www.w3.org/2005/05/xmlmime" > schemaLocation="http://www.w3.org/2005/05/xmlmime"/> > <xsd:element name="image-attachment" > xmime:expectedContentTypes='image/tiff'> > <xsd:complexType> > <xsd:simpleContent> > <xsd:extension > base="xsd:base64Binary"> > <xsd:attribute > ref="xmime:contentType" use="required"/> > </xsd:extension> > </xsd:simpleContent> > </xsd:complexType> > </xsd:element> > <xsd:element name="emptyResponse"> > <xsd:complexType/> > </xsd:element> > <xsd:element name="enqueue-image"> > <xsd:complexType> > <xsd:sequence> > <xsd:element > name="meta-info" type="xsd:string"/> > <xsd:element > ref="tns:image-attachment" minOccurs="1" maxOccurs="1" /> > </xsd:sequence> > </xsd:complexType> > </xsd:element> > </xsd:schema> > </types> > <message name="enqueueImageRequest"> > <part name="image" element="tns:enqueue-image"/> > </message> > <message name="emptyResponse"/> > <portType name="XXXPortType"> > <operation name="enqueue_image"> > <input name="image" > message="tns:enqueueImageRequest"/> > <output name="empty" message="tns:emptyResponse"/> > </operation> > </portType> > <binding name="XXXSoapBinding" type="tns:XXXPortType"> > <soap:binding style="document" > transport="http://schemas.xmlsoap.org/soap/http"/> > <operation name="enqueue_image"> > <soap:operation > soapAction="http://foo.com/XXX/enqueueImage"/> > <input> > <soap:body use="literal"/> > </input> > <output> > <soap:body use="literal"/> > </output> > </operation> > </binding> > <service name="XXXServiceMTOM"> > <port name="XXXPortType" binding="tns:XXXSoapBinding"> > <soap:address location="http://"/> > </port> > </service> > </definitions> > Using xmlbeans databinding: > <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true"> > <classpath refid="axis.classpath"/> > <arg value="-d"/> > <arg value="xmlbeans"/> > <arg value="-ss"/> > <arg value="-ssi"/> > <arg value="-sd"/> > <arg value="-g"/> > <arg value="-o"/> > <arg file="${generated.dir}"/> > <arg value="-p"/> > <arg value="com.foo"/> > <arg value="-uri"/> > <arg file="${file.wsdl}"/> > </java> > Using the stub client WSDL2Java generated, the SOAP sent (SOAPMonitor trace) > is as follows: > <?xml version="1.0" encoding="utf-8"?> > <soapenv:Envelope > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> > <soapenv:Header/> > <soapenv:Body> > <enqueue-image> > <meta-info>foo</meta-info> > > <image-ttachment>//zU8Guvrtr7aXm14hR7GyI42QkWK+KgyEQRY0yI9wyI9rBgt4URERERER > ERHyutByKM1IzUrqgEECBdCyBxqAg4ROyGeTHUtw2U5Yk+9PQ5QY/LGGHevw3/t6Jjv7f+30 > ERHyutByKM1IzUrqgEECBdCyBxqAg4ROyGeTHUtw2U5Yk+3kGA > P/IMdb0ryY//9vSfQ/8sZb9v/17ehf0v9vT5BrCX+xomjsjhwTy4ICKeXVlwlkcUj6ulePiCQi44 > i96blvCEq5lQZ0zPZnuHpqIiIiIiIiP//5bqp097om4egwyku2vbXt8Em0qsNLhtLtpdtLTa9tLt > hLsQuyMf0....../k4krqa//0g==</image-attachment> > </enqueue-image> > </soapenv:Body> > </soapenv:Envelope> > I think this is not the correct way for MTOM to send binary data. > Thanks -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
