Unable to retrieve a document attached in a SOAP MTOM/XOP message sended by 
WSO2 library
----------------------------------------------------------------------------------------

                 Key: AXIS2-5112
                 URL: https://issues.apache.org/jira/browse/AXIS2-5112
             Project: Axis2
          Issue Type: Bug
          Components: Integration, mtompolicy, transports
    Affects Versions: 1.6.0, 1.5.5, 1.5.4, 1.5.3
         Environment: Linux Ubuntu 9.04 / 9.10 / 10.04 / 10.10 (32bit)
            Reporter: Alberto Bovo


Using a axis2 Web Service, when trying to retrieve a document attached in a 
SOAP MTOM/XOP message builded using WSO2 php library get  this error:

org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException: Expected 
xop:Include as the sole child of an element information item (see section 3.2 
of http://www.w3.org/TR/xop10/)

This is due to the fact that the  element (<xdsb:Document id="Document01">   
</xdsb:Document>)  (OMElement obtained after axis2 processing)  that should 
contains the base64 value of document, is empty. But observing the same message 
sniffed from wireshark it seems that the Document is present.

I am worried about which library is the guilt for this problem: "WSO2" or 
"axis2"?






WebService Class




######Sniffed Message from the network using WIRESHARK:

POST /axis2/services/Repository HTTP/1.1
User-Agent: Axis2/C
Content-Length: 16132
Content-Type: multipart/related; 
boundary=MIMEBoundary11a26594-bf65-1e01-28a8-000c29c7ee2b; 
type="application/xop+xml"; 
start="<[email protected]>"; 
start-info="application/soap+xml"; 
charset="UTF-8";action="urn:ihe:iti:2007:ProvideAndRegisterDocumentSet-b"
Host: 192.168.1.13:9090

--MIMEBoundary11a26594-bf65-1e01-28a8-000c29c7ee2b
content-transfer-encoding: binary
content-id: <[email protected]>
content-type: application/xop+xml; charset=UTF-8; type="application/soap+xml";

<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";>
    <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing";>
        <wsa:To>http://192.168.1.13:9090/axis2/services/Repository</wsa:To>
        
<wsa:Action>urn:ihe:iti:2007:ProvideAndRegisterDocumentSet-b</wsa:Action>
        <wsa:MessageID>11a188fe-bf65-1e01-28a6-000c29c7ee2b</wsa:MessageID>
    </soapenv:Header>
    <soapenv:Body>
        <xdsb:ProvideAndRegisterDocumentSetRequest 
xmlns:xdsb="urn:ihe:iti:xds-b:2007">
             <lcm:SubmitObjectsRequest 
...........varius..xml........</lcm:SubmitObjectsRequest>
            <xdsb:Document id="Document01">
                <xop:Include 
href="cid:[email protected]" 
xmlns:xop="http://www.w3.org/2004/08/xop/include"/>
            </xdsb:Document>
        </xdsb:ProvideAndRegisterDocumentSetRequest>
    </soapenv:Body>
</soapenv:Envelope>
--MIMEBoundary11a26594-bf65-1e01-28a8-000c29c7ee2b
content-transfer-encoding: binary
content-id: <[email protected]>
content-type: application/octet-stream

This is my document.

It is great!


--MIMEBoundary11a26594-bf65-1e01-28a8-000c29c7ee2b--




######OMElement retrieved inside the web-service axis2code:

<xdsb:ProvideAndRegisterDocumentSetRequest xmlns:xdsb="urn:ihe:iti:xds-b:2007">
     <lcm:SubmitObjectsRequest 
...........varius..xml........</lcm:SubmitObjectsRequest>
    <xdsb:Document id="Document01">

    </xdsb:Document>
</xdsb:ProvideAndRegisterDocumentSetRequest>




I try to send (in SOAP MTOM/XOP) a similar message with another client using 
AXIS2 library and I retrieve CORRECTLY the document attached.
 

######Sniffed Message from the network using WIRESHARK:

POST /axis2/services/Repository HTTP/1.1
Content-Type: multipart/related; 
boundary=MIMEBoundaryurn_uuid_DE91A0BD9A7540ADAE1312549954960; 
type="application/xop+xml"; 
start="<0.urn:uuid:[email protected]>"; 
start-info="application/soap+xml"; 
action="urn:ihe:iti:2007:ProvideAndRegisterDocumentSet-b"
User-Agent: Axis2
Host: 192.168.1.13:9090
Transfer-Encoding: chunked

20f1
--MIMEBoundaryurn_uuid_DE91A0BD9A7540ADAE1312549954960
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 xmlns:wsa="http://www.w3.org/2005/08/addressing";>
        <wsa:To 
soapenv:mustUnderstand="true">http://192.168.1.13:9090/axis2/services/Repository</wsa:To>
        <wsa:MessageID 
soapenv:mustUnderstand="true">urn:uuid:DE91A0BD9A7540ADAE1312549954954</wsa:MessageID>
        <wsa:Action 
soapenv:mustUnderstand="true">urn:ihe:iti:2007:ProvideAndRegisterDocumentSet-b</wsa:Action>
    </soapenv:Header>
    <soapenv:Body>
        <xdsb:ProvideAndRegisterDocumentSetRequest 
xmlns:xdsb="urn:ihe:iti:xds-b:2007">
             <lcm:SubmitObjectsRequest 
...........varius..xml........</lcm:SubmitObjectsRequest>
            <xdsb:Document id="Document01">
                <xop:Include 
href="cid:1.urn:uuid:[email protected]" 
xmlns:xop="http://www.w3.org/2004/08/xop/include"; />
            </xdsb:Document>
        </xdsb:ProvideAndRegisterDocumentSetRequest>
    </soapenv:Body>
</soapenv:Envelope>
11c

--MIMEBoundaryurn_uuid_DE91A0BD9A7540ADAE1312549954960
Content-Type: text/plain
Content-Transfer-Encoding: binary
Content-ID: <1.urn:uuid:[email protected]>

This is my document.

It is great!


--MIMEBoundaryurn_uuid_DE91A0BD9A7540ADAE1312549954960--
0


######OMElement retrieved inside the web-service axis2code:

<xdsb:ProvideAndRegisterDocumentSetRequest xmlns:xdsb="urn:ihe:iti:xds-b:2007">
    <lcm:SubmitObjectsRequest 
...........varius..xml........</lcm:SubmitObjectsRequest>
    <xdsb:Document 
id="Document01">VGhpcyBpcyBteSBkb2N1bWVudC4KCkl0IGlzIGdyZWF0IQoK</xdsb:Document>
</xdsb:ProvideAndRegisterDocumentSetRequest>




This is the simple WSDL of the axis2 web service:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
xmlns:axis2="http://service/ws/xds/iti/a_thon/it/"; 
xmlns:ns1="http://org.apache.axis2/xsd";
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl";
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/";
xmlns:ns0="http://service/ws/xds/iti/a_thon/it/xsd";
xmlns:xs="http://www.w3.org/2001/XMLSchema";
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/";
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/";
xmlns:ihe="urn:ihe:iti:xds-b:2007"
xmlns:rs="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0"
xmlns:lcm="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0"
xmlns:query="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0"
name="DocumentRepository"
targetNamespace="http://service/ws/xds/iti/a_thon/it/";>
    <wsdl:types>
        <xs:schema xmlns:ns="http://service/ws/xds/iti/a_thon/it/xsd"; 
attributeFormDefault="qualified" elementFormDefault="qualified" 
targetNamespace="http://service/ws/xds/iti/a_thon/it/xsd";>
            <xs:element name="ProvideAndRegisterDocumentSet" type="xs:string">
            </xs:element>
            <xs:element name="ProvideAndRegisterDocumentSetResponse" 
type="xs:string">
            </xs:element>
        </xs:schema>
    </wsdl:types>
    <wsdl:message name="ProvideAndRegisterDocumentSetRequest">
        <wsdl:part name="parameters" 
element="ns0:ProvideAndRegisterDocumentSet"/>
    </wsdl:message>
    <wsdl:message name="ProvideAndRegisterDocumentSetResponse">
        <wsdl:part name="parameters" 
element="ns0:ProvideAndRegisterDocumentSetResponse"/>
    </wsdl:message>
    <wsdl:portType name="RepositoryPortType">
        <wsdl:operation name="ProvideAndRegisterDocumentSet">
            <wsdl:input message="axis2:ProvideAndRegisterDocumentSetRequest" 
            wsaw:Action="urn:ihe:iti:2007:ProvideAndRegisterDocumentSet-b"/>
            <wsdl:output message="axis2:ProvideAndRegisterDocumentSetResponse" 
            
wsaw:Action="urn:ihe:iti:2007:ProvideAndRegisterDocumentSet-bResponse"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="RepositorySOAP12Binding" 
type="axis2:RepositoryPortType">
        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"; 
style="document"/>
        <wsdl:operation name="ProvideAndRegisterDocumentSet">
            <soap12:operation 
soapAction="urn:ihe:iti:2007:ProvideAndRegisterDocumentSet-b" style="document"/>
            <wsdl:input>
                <soap12:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap12:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="Repository">
        <wsdl:port name="RepositorySOAP12port_http" 
binding="axis2:RepositorySOAP12Binding">
            <soap12:address 
location="http://localhost:8080/axis2/services/Repository"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>


--
This message is automatically generated by JIRA.
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]

Reply via email to