SoapClient::__getTypes
PHP function
Edit on GitHub ✎
(PHP 5, PHP 7, PHP 8)
Returns a list of SOAP types
Description
SoapClient::__getTypes(): array|null
Returns an array of types described in the WSDL for the Web service.
Only
Parameters Parameters
Return Values
The array of SOAP types, detailing all structures and types.
A type restricted to a set of enumerated values is listed with those values in braces, for example string enumItem {test1, test2}.
Changelog
| Version | Description |
|---|---|
| 8.5.0 | Enumerated values are now included in the description of the types that define them. |
Examples
SoapClient::__getTypes() example
php
<?php
$client = new SoapClient('http://soap.amazon.com/schemas3/AmazonWebServices.wsdl');
var_dump($client->__getTypes());
?>The above example will output:
output
array(88) {
[0]=>
string(30) "ProductLine ProductLineArray[]"
[1]=>
string(85) "struct ProductLine {
string Mode;
string RelevanceRank;
ProductInfo ProductInfo;
}"
[2]=>
string(105) "struct ProductInfo {
string TotalResults;
string TotalPages;
string ListName;
DetailsArray Details;
}"
...
[85]=>
string(32) "ShortSummary ShortSummaryArray[]"
[86]=>
string(121) "struct GetTransactionDetailsRequest {
string tag;
string devtag;
string key;
OrderIdArray OrderIds;
string locale;
}"
[87]=>
string(75) "struct GetTransactionDetailsResponse {
ShortSummaryArray ShortSummaries;
}"
}See Also
SoapClient::__construct