Connecting Tech Pros Worldwide Forums | Help | Site Map

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

webslider
Guest
 
Posts: n/a
#1: Aug 24 '05
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:operation soapAction="urn:XXX-General#GetList" style="rpc" />
- <input message="tns:GetListRequest">
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:XXX-General" />
</input>

- <operation name="GetList">
<soap:operation soapAction="urn:XXX-Session#GetList" style="rpc" />
- <input message="tns:GetListRequest">
<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('http://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.


Closed Thread