Da budem precizniji, napisao sam sledeći test script da bih uradio isto:
Code:
<?php
require("nusoap.php");
$wsdl_client = new wsdl("http://soap.amazon.com/schemas2/AmazonWebServices.wsdl");
$operations = $wsdl_client->getOperations();
foreach ($operations as $key => $value)
{
echo "$key<br>";
$operations_data_array = $wsdl_client->getOperationData($key);
echo "INPUT:<br>";
echo "<pre>";
var_dump($operations_data_array['input']);
echo "</pre>";
echo "OUTPUT<br>";
echo "<pre>";
var_dump($operations_data_array['output']);
echo "</pre>";
}
?>
<?php
require("nusoap.php");
$wsdl_client = new wsdl("http://soap.amazon.com/schemas2/AmazonWebServices.wsdl");
$operations = $wsdl_client->getOperations();
foreach ($operations as $key => $value)
{
echo "$key<br>";
$operations_data_array = $wsdl_client->getOperationData($key);
echo "INPUT:<br>";
echo "<pre>";
var_dump($operations_data_array['input']);
echo "</pre>";
echo "OUTPUT<br>";
echo "<pre>";
var_dump($operations_data_array['output']);
echo "</pre>";
}
?>
Na ovaj način dobijem recimo za KeywordSearchRequest sledeće:
Code:
KeywordSearchRequest
INPUT:
array(5) {
["use"]=>
string(7) "encoded"
["encodingStyle"]=>
string(41) "http://schemas.xmlsoap.org/soap/encoding/"
["namespace"]=>
string(22) "http://soap.amazon.com"
["message"]=>
string(20) "KeywordSearchRequest"
["parts"]=>
array(1) {
["KeywordSearchRequest"]=>
string(37) "http://soap.amazon.com:KeywordRequest"
}
}
OUTPUT
array(5) {
["use"]=>
string(7) "encoded"
["encodingStyle"]=>
string(41) "http://schemas.xmlsoap.org/soap/encoding/"
["namespace"]=>
string(22) "http://soap.amazon.com"
["message"]=>
string(21) "KeywordSearchResponse"
["parts"]=>
array(1) {
["return"]=>
string(34) "http://soap.amazon.com:ProductInfo"
}
}
KeywordSearchRequest
INPUT:
array(5) {
["use"]=>
string(7) "encoded"
["encodingStyle"]=>
string(41) "http://schemas.xmlsoap.org/soap/encoding/"
["namespace"]=>
string(22) "http://soap.amazon.com"
["message"]=>
string(20) "KeywordSearchRequest"
["parts"]=>
array(1) {
["KeywordSearchRequest"]=>
string(37) "http://soap.amazon.com:KeywordRequest"
}
}
OUTPUT
array(5) {
["use"]=>
string(7) "encoded"
["encodingStyle"]=>
string(41) "http://schemas.xmlsoap.org/soap/encoding/"
["namespace"]=>
string(22) "http://soap.amazon.com"
["message"]=>
string(21) "KeywordSearchResponse"
["parts"]=>
array(1) {
["return"]=>
string(34) "http://soap.amazon.com:ProductInfo"
}
}
Ali u AWS dokumentaciji lista argumenata za metod je potpuno drugačija, što mogu i videti ako ručno pogledam u wsdl fajl. Dakle za pomenuti metod:
Code:
<xsd:all>
<xsd:element name="keyword" type="xsd:string"/>
<xsd:element name="page" type="xsd:string"/>
<xsd:element name="mode" type="xsd:string"/>
<xsd:element name="tag" type="xsd:string"/>
<xsd:element name="type" type="xsd:string"/>
<xsd:element name="devtag" type="xsd:string"/>
<xsd:element name="sort" type="xsd:string" minOccurs="0"/>
<xsd:element name="variations" type="xsd:string" minOccurs="0"/>
<xsd:element name="locale" type="xsd:string" minOccurs="0"/>
</xsd:all>
<xsd:all>
<xsd:element name="keyword" type="xsd:string"/>
<xsd:element name="page" type="xsd:string"/>
<xsd:element name="mode" type="xsd:string"/>
<xsd:element name="tag" type="xsd:string"/>
<xsd:element name="type" type="xsd:string"/>
<xsd:element name="devtag" type="xsd:string"/>
<xsd:element name="sort" type="xsd:string" minOccurs="0"/>
<xsd:element name="variations" type="xsd:string" minOccurs="0"/>
<xsd:element name="locale" type="xsd:string" minOccurs="0"/>
</xsd:all>
Da li neko zna kako mogu izvući pravu listu argumenata za određeni metod pomoću nosap-a ?
Hvala na pomoći :)