2011-12-22 65 views
0

嗨,我想使用肥皂從亞馬遜獲得結果,我還沒有嘗試過,所以我想嘗試一些示例代碼。問題是我得到一個錯誤。 的代碼是這樣的:亞馬遜肥皂接口使用PHP

<?php 
#Use the NuSOAP php library 
//require_once('lib/nusoap.php'); 

$params->AWSAccessKeyId = AMAZON_API_KEY; 
$params->Request->SearchIndex = 'Books'; 
$params->Request->Keywords = 'php5'; 

$amazon = new SoapClient('http://webservices.amazon.com/AWSECommerceService  /AWSECommerceService.wsdl'); 
$result = $amazon->itemSearch($params); 


echo $result; 
?> 

,這是錯誤當我運行它,我得到。 thanx你的時間

Fatal error: Uncaught SoapFault exception: [aws:Client.MissingParameter] The request must contain the parameter Signature. in C:\wamp\www\amasearch.php:11 Stack trace: #0 [internal function]: SoapClient->__call('itemSearch', Array) #1 C:\wamp\www\amasearch.php(11): SoapClient->itemSearch(Object(stdClass)) #2 {main} thrown in C:\wamp\www\amasearch.php on line 11 

回答

1

奇怪。 WSDL沒有任何類型的簽名參數。但是,我在亞馬遜開發論壇中發現了這一點。建議你檢查出來(也,如果你開發使用亞馬遜的服務,保持該資源在手

https://forums.aws.amazon.com/ann.jspa?annID=483

貌似安全門的服務現在更高,更大,交配

編輯:這問題鏈接,在C#中的一些例子,也許它可以幫助你Amazon (AWS) - The request must contain the parameter Signature

而且這是在AWS論壇與PHP https://forums.aws.amazon.com/message.jspa?messageID=149715

+0

I C,thanx的來源爲例。 – Evan 2011-12-22 23:29:52