Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
hi
im trying to achieve polymorphism with the native PHP5 SOAP implementation.
Im using a PHP WSDL generator to generate the WSDL, it seems to produce valid output
Abstract class, bg_module
[syntax="xml"]
<xsd:complexType name="bg_module" abstract="true">
<xsd:all>
<xsd:element name="type" type="xsd:string"/>
</xsd:all>
</xsd:complexType>
Code: Select all
<xsd:complexType name="bg_reviews_test">
<xsd:complexContent>
<xsd:extension base="tns:bg_module">
<sequence>
<xsd:element name="title" type="xsd:string"/>
<xsd:element name="type" type="xsd:string"/>
</sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType
The SOAP response returns the bg_reviews_test as the abstract bg_module type:
Code: Select all
<modules SOAP-ENC:arrayType="ns1:bg_module[1]" xsi:type="ns1:bg_moduleArray">
<item xsi:type="ns1:bg_module">
<type xsi:type="xsd:string">bg_reviews_test</type>
</item>
</modules>
am i missing something fundamental here?
cheers
dan
feyd | Please use[/syntax]
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]