使用SoapClient,是否可以将元素名称(而不是类型)映射到php类?
在php手册中:
在php手册中:
http://www.php.net/manual/en/soapclient.soapclient.php
classmap是这样定义的:
classmap选项可用于将某些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
(
...
)
)
这几乎使类映射功能失去了意义。
任何帮助将不胜感激。
谢谢。