You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Francisco Fernandez (JIRA)" <ji...@apache.org> on 2006/08/01 13:52:17 UTC

[jira] Created: (AXIS2-952) MTOM databinding NOT send raw binary data

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


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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-952) MTOM databinding NOT send raw binary data

Posted by "Francisco Fernandez (JIRA)" <ji...@apache.org>.
    [ 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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Reopened: (AXIS2-952) MTOM databinding NOT send raw binary data

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-952?page=all ]

Davanum Srinivas reopened AXIS2-952:
------------------------------------

      Assignee: Thilina Gunarathne
             

> 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
>         Assigned To: Thilina Gunarathne
>         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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Resolved: (AXIS2-952) MTOM databinding NOT send raw binary data

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-952?page=all ]

Davanum Srinivas resolved AXIS2-952.
------------------------------------

    Resolution: Fixed

you need to get the service client and set the following option Constants.Configuration.ENABLE_MTOM to true.

-- dims

> 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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-952) MTOM databinding NOT send raw binary data

Posted by "Francisco Fernandez (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-952?page=comments#action_12431249 ] 
            
Francisco Fernandez commented on AXIS2-952:
-------------------------------------------

Davanum,

I have the next code:

...
EndpointReference targetEPR = new EndpointReference("http://foo.com/XXXServiceMTOM");
XXXServiceMTOMStub stub = new XXXServiceMTOMStub(
					 null,
					 "http://foo.com/XXXServiceMTOM");
Options options = new Options();
options.setTo( targetEPR );
options.setProperty(Constants.Configuration.ENABLE_MTOM ,Constants.VALUE_TRUE);
stub._getServiceClient().setOptions( options );
...

And with the SOAPMonitor, I see the same SOAP message, which I think is not "MTOM compliant":

<?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>


> 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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Resolved: (AXIS2-952) MTOM databinding NOT send raw binary data

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-952?page=all ]

Davanum Srinivas resolved AXIS2-952.
------------------------------------

    Resolution: Fixed

Has been fixed in latest SVN.

thanks,
dims

> 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
>         Assigned To: Thilina Gunarathne
>         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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-952) MTOM databinding NOT send raw binary data

Posted by "Francisco Fernandez (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-952?page=all ]

Francisco Fernandez updated AXIS2-952:
--------------------------------------

    Attachment: MTOMSample.wsdl

> 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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org