Re: Generating PHP from WSDL

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

 



On 12 May 2010 11:53, Gary . <php-general@xxxxxxxxxxxxxxx> wrote:
> Let's if anyone can come up with a non-brittle solution to this.
>
> In order to create the framework code for a webservice client I
> have generated it from the server's wsdl. Unfortunately the wsdl
> (which is out of my control) tries to use "extension base=..."
> to say that 'B' "extends"/"inherits from " 'A', and the tool I
> use doesn't understand it, with the result that the generated
> code doesn't include that relatonship, and so sending a 'B' to
> the webservice doesn't work because it doesn't also include the
> expected properties of 'A'.
>
> Possible solutions I have thought of are:
>
> * create 'C', inheriting from 'A' and 'B' and send one of those
>  instead, but of course php doesn't support multiple-inheritance;
>
> * manually change 'B' so that it does inherit from 'A'. I don't
>  like this because if the wsdl changes then that client-side
>  code needs to again be changed manually.
>
> * use composition instead. Doesn't seem it will work because the
>  marshalling of the objects seems to want to use the properties
>  directly (i.e. instead of using getters as it "should" do).
>
> Does anyone have any other ideas?
>
> Are there any generators out there that handle something like:
> <s:complexType name="B">
>  <s:complexContent mixed="false">
>  <s:extension base="tns:A">
> ...
> </s:complexType>
> and produce nusoap client code?

Can you provide a URL for the wsdl file please?

-- 
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

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



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux