Google Answers Logo
View Question
 
Q: flash remoting Amazon web service ( No Answer,   0 Comments )
Question  
Subject: flash remoting Amazon web service
Category: Computers > Programming
Asked by: plasticspoon-ga
List Price: $20.00
Posted: 12 Jul 2005 12:02 PDT
Expires: 11 Aug 2005 12:02 PDT
Question ID: 542692
I'm trying to access Amazon's web service (either AWS 3.0 or ECS 4.0)
through Flash Remoting 2.0 components and PHP/nusoap gateway.

I have simple actionscript code, which successfully calls a web
service through the wsdl file; however, when I use the same code and
try to call one of Amazon's web services, I am unsuccessful.

My question is: what is wrong with my code?  I've included below my
code (call to method ItemLookup), related links, and various other,
perhaps pertinent, information.

import mx.remoting.Service;
import mx.remoting.PendingCall;
import mx.rpc.RelayResponder;
import mx.rpc.FaultEvent;
import mx.rpc.ResultEvent;
mx.remoting.debug.NetDebug.initialize();
mx.remoting.debug.NetDebug.trace();

var flashService:Service = new Service(
  "http://[website].com/flashservices/gateway.php",
  null,
  "http://webservices.amazon.com/AWSECommerceService/AWSECommerceService.wsdl", 
  null,
  null);

var parameters = new Object();
parameters.Service = "AWSECommerceService";
parameters.SubscriptionId = "[20 digit SubscriptionId]";	
parameters.Operation = "ItemLookup";
parameters.ItemId = "0393316041";
 
var pc:PendingCall = flashService.ItemLookup(parameters);
pc.responder = new RelayResponder(this, "amazonSearch_Result",
"amazonSearch_Fault");

function amazonSearch_Result(re:ResultEvent):Void{ 
  trace (re.result.Items.ProductName);
}

function amazonSearch_Fault(fe:FaultEvent):Void{
	trace (fe.fault.faultstring);
}


Link to Amazon's ECS:
http://www.amazon.com/gp/aws/sdk/102-6126594-2444162?v=2005%2d03%2d23&s=AWSEcommerceService


Other Info:
1) there is a gateway.php file on my server in the flashservices directory
2) nusoap files are included in the flashservices\lib directory
3) the web server runs PHP 4.?
4) using Flash MX 2004 Professional and Flash Remoting 2.0
 
Additionally, this is the error I receive from the NetConnection Debugger:

DebugId: "0"
EventType: "Result"
MovieUrl: "file:///C|/AmazonWCS.swf"
Protocol: "http"
Result: (boolean) false
Source: "Client"
Time: 1121194395922
Date (object #1)
....."Tue Jul 12 14:53:15 GMT-0400 2005" 

or

Result (object #2)
.....detail: "The request contains an invalid SOAP body."
.....faultcode: "SOAP-ENV:Client"
.....faultstring: "We encountered an error at our end while processing
your request. Please try again"

Clarification of Question by plasticspoon-ga on 15 Jul 2005 19:32 PDT
All I need is a working example of any call to Amazon's Web Services
using Flash's action script 2.0 (either web services or remoting).
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy