如何从 SOAP 类型中获取值?

How to get values from SOAP type?

WSDL 文档如下:

<xsd:simpleType name="CurrencyTypeEnum">
   <xsd:restriction base="xsd:int">
       <xsd:enumeration value="1" description="Rubles"/>
       <xsd:enumeration value="2" description="Dollars"/>
   </xsd:restriction>
</xsd:simpleType>

print_r($client->__getTypes())我得到这个return:(没关系)

Array
(
    [0] => int CurrencyTypeEnum
}

问题: 如何使用来自 PHP 的 SOAP 扩展从 SOAP 答案中获取词 «Rubles»?

自己已经尝试找到了,但没有结果。谢谢。

它们没有列出,您只能从 XML.

中获取它们

例如,PackageGenerator project extract them from the schema in order to generate a constants class such as https://github.com/WsdlToPhp/PackageGenerator/blob/382ebfa6e636339bdfbd1eefd10f1d24a584cca3/tests/resources/generated/ValidApiPhonebookSortOptionApi.php