Reputation: 298
There are WSDL document with following:
<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>
When print_r($client->__getTypes())
I get this return: (it’s okay)
Array
(
[0] => int CurrencyTypeEnum
}
Question: How I can get word «Rubles» from SOAP answer using SOAP extension from PHP?
Already tried to find it myself, but without some results. Thanks.
Upvotes: 0
Views: 96
Reputation: 760
They are not listed, you can only get them from the XML.
For example, the 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
Upvotes: 1