Class based method overloading

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have a WSDL that uses method overloading, but it seems not possible to
distinguish in a class. The WSDL targets functions like:

  getSupSet(userClass)
  getSupSet(userClass, typeClass)
  getSupSet(userClass, deviceClass)
  getSupSet(userClass, typeClass, deviceClass)

The WSDL used distinct input and output targets for the same operation
name per specification (only 2 methods shown):
....
<wsdl:portType name="MyServer">
 <wsdl:operation name="getSupSet" parameterOrder="user">
  <wsdl:input message="impl:getSupSetReq" name="getSupSetReq"/>
  <wsdl:output message="impl:getSupSetResp" name="getSupSetResp"/>
 </wsdl:operation>
  <wsdl:operation name="getSupSet1" parameterOrder="user device">
  <wsdl:input message="impl:getSupSetReq1" name="getSupSetReq1"/>
  <wsdl:output message="impl:getSupSetResp1" name="getSupSetResp1"/>
 </wsdl:operation>
 ...
</wsdl:portType>
<wsdl:binding name="MySoapBinding" type="impl:MyServer">
 <wsdl:operation name="getSupSet">
  <wsdlsoap:operation soapAction=""/>
  <wsdl:input name="getSupSetReq">
   <wsdlsoap:body encodingStyle="..." namespace="..." use="encoded"/>
  </wsdl:input>
  <wsdl:output name="getSupSetResp">
   <wsdlsoap:body encodingStyle="..." namespace="..." use="encoded"/>
  </wsdl:output>
 </wsdl:operation>
 <wsdl:operation name="getSupSet">
  <wsdlsoap:operation soapAction=""/>
  <wsdl:input name="getSupSetReq1">
   <wsdlsoap:body encodingStyle="..." namespace="..." use="encoded"/>
  </wsdl:input>
  <wsdl:output name="getSupSetResp1">
   <wsdlsoap:body encodingStyle="..." namespace="..." use="encoded"/>
  </wsdl:output>
 </wsdl:operation>
 ...
</wsdl:binding>
....

The following class spec gives an error that the function is redefined
(PHP 5.1.6):
class MyServer {
 function getSupportedSettings($userClass) {}
 function getSupportedSettings($userClass, $typeClass) {}
 function getSupportedSettings($userClass, $deviceClass) {}
 function getSupportedSettings($userClass, $typeClass, $deviceClass) {}
 ...
}

I tried to define only one function with three (complexType) arguments
(the last) because I can tell the calls apart from the argument content,
but calling the server resulted in missing arguments. The second and
third argument never were set to anything, regardless of the client-call.


Is it possible to build a PHP class that can distinguish these
method-calls/functions, or any other way (besides hacking the request
content at runtime)?


--
Greetings Bertho

(disclaimers are disclaimed)

-- 
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux