Hi,
I have a question about WSDL addComplexType() method on 'extension'.
First let me show you what I understood:
I have no problem to generate PHP to adding following schema:
--------------------------------------------
For example, for using following WSDL schema:
<xs:complexType name="UserAuthentication">
<xs:sequence>
<xs:element name="UserId" type="xs:string"/>
<xs:element name="Password" type="xs:string"/>
</xs:sequence>
</xs:complexType>
--------------------------------------------
I have following PHP which works fine:
--------------------------------------------
$server->wsdl->addComplexType(
'UserAuthentication',
'complexType',
'struct',
'sequence',
'', )
array(
'UserId' => array('name' => 'UserId', 'type' => 'xsd:string'),
'Password' => array('name' => 'Password', 'type' => 'xsd:string')
)
);
--------------------------------------------
But,
Here is my question, if I have to use extension in WSDL as following(base of 'MySession' was added with addComplexType() previously and correctly):
--------------------------------------------
<xs:complexType name="UserAuthentication">
<xs:complexContent>
<xs:extension base="tns:MySession">
<xs:sequence>
<xs:element name="UserId" type="xs:string"/>
<xs:element name="Password" type="xs:string"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
--------------------------------------------
How should I write my PHP code with using addComplexType() method?
Thanks in advance!
Lei Li
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I have a question about WSDL addComplexType() method on 'extension'.
First let me show you what I understood:
I have no problem to generate PHP to adding following schema:
--------------------------------------------
For example, for using following WSDL schema:
<xs:complexType name="UserAuthentication">
<xs:sequence>
<xs:element name="UserId" type="xs:string"/>
<xs:element name="Password" type="xs:string"/>
</xs:sequence>
</xs:complexType>
--------------------------------------------
I have following PHP which works fine:
--------------------------------------------
$server->wsdl->addComplexType(
'UserAuthentication',
'complexType',
'struct',
'sequence',
'', )
array(
'UserId' => array('name' => 'UserId', 'type' => 'xsd:string'),
'Password' => array('name' => 'Password', 'type' => 'xsd:string')
)
);
--------------------------------------------
But,
Here is my question, if I have to use extension in WSDL as following(base of 'MySession' was added with addComplexType() previously and correctly):
--------------------------------------------
<xs:complexType name="UserAuthentication">
<xs:complexContent>
<xs:extension base="tns:MySession">
<xs:sequence>
<xs:element name="UserId" type="xs:string"/>
<xs:element name="Password" type="xs:string"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
--------------------------------------------
How should I write my PHP code with using addComplexType() method?
Thanks in advance!
Lei Li