Handling multiple portType definitions with the same method name with built-in SOAP

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • webslider

    #1

    Handling multiple portType definitions with the same method name with built-in SOAP

    I am trying to communicate with a WSDL that defines to portTypes:

    - <portType name="General">
    - <portType name="Session">

    And their exists 2 operations with the same name but in 2 different
    porttypes (the general "GetList" returns a default list of items, the
    session "GetList" requires a session ID to be passed in the header and
    returns a list based on the session ID):

    - <operation name="GetList">
    <soap:operati on soapAction="urn :XXX-General#GetList " style="rpc" />
    - <input message="tns:Ge tListRequest">
    <soap:body use="encoded"
    encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
    namespace="urn: XXX-General" />
    </input>

    - <operation name="GetList">
    <soap:operati on soapAction="urn :XXX-Session#GetList " style="rpc" />
    - <input message="tns:Ge tListRequest">
    <soap:body use="encoded"
    encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
    namespace="urn: XXX-Session" />
    </input>

    When I try to create a client using the build-in SOAP (PHP 5.1 beta 3),
    like this:

    $client = new SoapClient('htt p://localhost:8095/soap',
    array("trace"=> 1, "exceptions"=>0 ));

    I get the message:

    Fatal error: SOAP-ERROR: Parsing WSDL: 'GetListRequest ' already defined
    in d:\Inetpub\PHP\ soaptest.php on line 12

    Is there a way to handle this situation so that I can specify the
    portType, service name, or port name so that the available methods
    won't be duplicates?

    Thanks.

Working...