Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

Ticket #164 (new enhancement)

Opened 3 years ago

Last modified 2 years ago

MIME binding support (was wsdl2ruby does not handle wsdl definitions with SwA)

Reported by: emil Assigned to: nahi
Priority: normal Milestone: undefined
Component: wsdl4r Version: 1.5
Keywords: Cc:

Description (Last modified by nahi)

wsdlruby is unable to process the wsdl with the SwA (multipart definition) both --type client and --type server.

It looks wsdl2ruby is not prepared to expect the the <mime:multipartRelated> as the child of <wsdl:input.. , and expects the <wsdlsoap:body ... only.

Here is the test wsdl :

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="urn:EchoAttachmentsService" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="urn:EchoAttachmentsService" xmlns:intf="urn:EchoAttachmentsService" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns1="http://activation.javax" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <wsdl:types>
        <schema targetNamespace="urn:EchoAttachmentsService" xmlns="http://www.w3.org/2001/XMLSchema">
            <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
            <complexType name="ArrayOf_tns1_DataHandler">
                <complexContent>
                    <restriction base="soapenc:Array">
                        <attribute ref="soapenc:arrayType" wsdl:arrayType="null[]"/>
                    </restriction>
                </complexContent>
            </complexType>
            <element name="ArrayOf_tns1_DataHandler" nillable="true" type="impl:ArrayOf_tns1_DataHandler"/>
        </schema>
    </wsdl:types>
    <wsdl:message name="echoOneRequest">
        <wsdl:part name="source" type="xsd:anyType"/>
    </wsdl:message>
    <wsdl:message name="echoOneResponse">
        <wsdl:part name="returnqname" type="xsd:anyType"/>
    </wsdl:message>
    <wsdl:message name="echoTwoRequest">
        <wsdl:part name="source1" type="xsd:anyType"/>
        <wsdl:part name="source2" type="xsd:anyType"/>
    </wsdl:message>
    <wsdl:message name="echoTwoResponse">
        <wsdl:part name="returnqname" type="xsd:anyType"/>
    </wsdl:message>
    <wsdl:message name="echoDirRequest">
        <wsdl:part name="item" type="impl:ArrayOf_tns1_DataHandler"/>
    </wsdl:message>
    <wsdl:message name="echoDirResponse">
        <wsdl:part name="item" type="impl:ArrayOf_tns1_DataHandler"/>
    </wsdl:message>

    <wsdl:portType name="EchoAttachmentsService">
        <wsdl:operation name="echoOne" parameterOrder="dh">
            <wsdl:input message="impl:echoOneRequest" name="echoOneRequest"/>
            <wsdl:output message="impl:echoOndeResponse" name="echoOneResponse"/>
        </wsdl:operation>
        <wsdl:operation name="echoTwo" parameterOrder="dh">
            <wsdl:input message="impl:echoTwoRequest" name="echoTwoRequest"/>
            <wsdl:output message="impl:echoTwoResponse" name="echoTwoResponse"/>
        </wsdl:operation>
        <wsdl:operation name="echoDir" parameterOrder="attachments">
            <wsdl:input message="impl:echoDirRequest" name="echoDirRequest"/>
            <wsdl:output message="impl:echoDirResponse" name="echoDirResponse"/>
        </wsdl:operation>
    </wsdl:portType>

    <wsdl:binding name="EchoAttachmentsServiceSoapBinding1" type="impl:EchoAttachmentsService">
        <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="echoOne">
            <wsdlsoap:operation soapAction=""/>
            <wsdl:input name="echoOneRequest">
                <mime:multipartRelated>
                    <mime:part>
                        <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:EchoAttachmentsService" use="encoded"/>
                    </mime:part>
                    <mime:part>
                        <mime:content part="source" type="*/*"/>
                    </mime:part>
                </mime:multipartRelated>
            </wsdl:input>
            <wsdl:output name="echoOneResponse">
                <mime:multipartRelated>
                    <mime:part>
                        <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:EchoAttachmentsService" use="encoded"/>
                    </mime:part>
                    <mime:part>
                        <mime:content part="returnqname" type="*/*"/>
                    </mime:part>
                </mime:multipartRelated>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>

    <wsdl:binding name="EchoAttachmentsServiceSoapBinding2" type="impl:EchoAttachmentsService">
        <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="echoTwo">
            <wsdlsoap:operation soapAction=""/>
            <wsdl:input name="echoTwoRequest">
                <mime:multipartRelated>
                    <mime:part>
                        <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:EchoAttachmentsService" use="encoded"/>
                    </mime:part>
                    <mime:part>
                        <mime:content part="source1" type="*/*"/>
                    </mime:part>
                    <mime:part>
                        <mime:content part="source2" type="*/*"/>
                    </mime:part>
                </mime:multipartRelated>
            </wsdl:input>
            <wsdl:output name="echoTwoResponse">
                <mime:multipartRelated>
                    <mime:part>
                        <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:EchoAttachmentsService" use="encoded"/>
                    </mime:part>
                    <mime:part>
                        <mime:content part="returnqname" type="*/*"/>
                    </mime:part>
                </mime:multipartRelated>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="echoDir">
            <wsdlsoap:operation soapAction=""/>
            <wsdl:input name="echoDirRequest">
                <mime:multipartRelated>
                    <mime:part>
                        <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:EchoAttachmentsService" use="encoded"/>
                    </mime:part>
                    <mime:part>
                        <mime:content part="source" type="*/*"/>
                    </mime:part>
                </mime:multipartRelated>
            </wsdl:input>
            <wsdl:output name="echoDirResponse">
                <mime:multipartRelated>
                    <mime:part>
                        <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:EchoAttachmentsService" use="encoded"/>
                    </mime:part>
                    <mime:part>
                        <mime:content part="echoDirReturn" type="*/*"/>
                    </mime:part>
                </mime:multipartRelated>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>

    <wsdl:service name="EchoAttachmentsServiceService">
        <wsdl:port binding="impl:EchoAttachmentsServiceSoapBinding2" name="EchoAttachmentsService">
            <wsdlsoap:address location="http://192.168.1.162:8080/axis/services/urn:EchoAttachmentsService"/>
        </wsdl:port>
        <wsdl:port binding="impl:EchoAttachmentsServiceSoapBinding1" name="EchoAttachmentsService">
            <wsdlsoap:address location="http://192.168.1.162:8080/axis/services/urn:EchoAttachmentsService"/>
        </wsdl:port>
    </wsdl:service>

</wsdl:definitions>

Change History

01/26/06 11:23:07 changed by gilem@wsg.net

Yes, we are new to ruby, and was hoping to use it with amazon merchant services. Since it is WSDL+SWA, we have the same problem.

02/06/06 13:18:02 changed by nahi

  • description changed.

05/19/07 22:57:15 changed by nahi

  • component changed from soap4r to wsdl4r.
  • milestone changed from undefined to 1.5.6.

05/20/07 10:40:49 changed by nahi

  • type changed from defect to enhancement.

05/20/07 21:54:07 changed by nahi

  • summary changed from wsdl2ruby does not handle wsdl definitions with SwA (multipart messages) to MIME binding support (was wsdl2ruby does not handle wsdl definitions with SwA).
  • milestone changed from 1.5.6 to undefined.