SOAP Authentication for amazon

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am trying to implement a SOAP client for Amazon but haven't been successful for a week already. I have used both PEAR and NuSoap without success.

For NuSoap, I am having this problem by simply implementing a getproxy call:

Parse error: parse error, unexpected T_STRING in ....../nusoap.php(6983) : eval()'d code on line 1

Fatal error: Cannot instantiate non-existent class: soap_proxy_1665726584 in ......nusoap.php(6985) : eval()'d code on line 1

Here's the very short and simple code:

// include class
include("nusoap.php");

// create a instance of the SOAP client object
$client = new soapclient("https://merchant-api-qa.amazon.com/gateway/merchant-interface-mime",true);
$proxy = $client->getProxy();
$proxy->setCredentials($username, $password);

I should have at least got a Authentication error not the error I mentioned above.

#############
Similarly, using Pear::Soap, am getting an empty response from the server with the following code:

include("SOAP/Client.php");
$proxy = array('user'=>$username,'pass'=>$password);
$soapclient = new SOAP_Client("$url", true, false, $proxy);
$v =  new SOAP_Attachment('SWA','text/xml','attachment.xml');
$params = array('merchant'=>$merchantName,'messageType'=> '_POST_PRODUCT_DATA_','doc' => $v); #$options = array('namespace' => 'urn:http://www.amazon.com/merchants/merchant-interface','trace' => 1);
$ret = $soapclient->call('postDocument',$params);
print_r($ret);echo "<br>\n";


Thanks in advance.

--
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux