2
使用SoapClient,是否可以将元素名称(而不是类型)映射到php类?是否可以将元素名称映射到php类(SoapClient)
PHP手册:
http://www.php.net/manual/en/soapclient.soapclient.php
类映射被这样定义:
的类映射选项可用于一些WSDL类型映射到PHP类。这个选项必须是一个WSDL类型作为键值和PHP类名称的数组。
是否有可能映射元素,如果它没有类型?
例如。
<xsd:element name="M1Response">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="N1Response" type="bons0:R1Out"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
即,我想元素M1Response
映射到PHP类
我可以映射到N1Response
PHP类,但反应是像这样:
stdClass Object
(
[N1Response] => MyPHPClassResponse Object
(
...
)
)
几乎失败的类映射功能的目的。
任何帮助,将不胜感激。
感谢