Re: Class based method overloading

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

 



Ammarmar wrote:
> This is a rather unusual WSDL (especially the binding section with named
> inputs etc). I assume you have no way to rewrite it.

Firstly, the getSupSet1 in the second operation of the WSDL is a typo.
It should read getSupSet for overloading to work... The I/O
specification is correct though.

And secondly, you are completely right; I have no way of changing the
WSDL. I am re-implementing a larger set of legacy interfaces (10 in all)
and am mapping them onto a single backend. This is a what you would call
a cross-my-fingers-and-hope-it-still-works-for-all project where it is
simply impossible to reimplement all bugs. Still, the benefit in
performance and maintainability is so high that it is worth it.


> PHP5 does not support overloading functions.

That is what I also thought.


> Have you tried to create multiple functions named after portType
> operations? (getSupSet, getSupSet1 etc)

The solution I have now, is to create a hacked WSDL which renames the
functions from xx, xx, xx to xx1, xx2, xx3, etc. Then I "patch" the
HTTP_RAW_POST_DATA before I create my server class based on the detected
arguments to the call. I still return the original WSDL on request, but
internally use the patched one. This is quite a dirty hack, but it
works. I was just hoping for a more clean solution.

For PHP to support overloading, I suppose there must be a "methodmap"
(similar to the classmap) which is used to remap the WSDL
operation/input/output pair to a class-function.

--
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