Expand my Community achievements bar.

Amazon Web Services

Avatar

Level 1
I have a destination I named "amazon" set up in the
proxy-config.xml file but when I use it, I get an error:

" No destination with id 'amazon' is registered with any
service."



When I run it with no destination specified and use-proxy set
to false I get the following...



Here is what a <mx:TraceTarget/> produces on my LCDS ES
server on my development machine:

[the wsdl file shows here... I cut it out for brevity ].....

clientId = "DirectHTTPChannel0"

correlationId = "C8B964D7-8ABF-750B-FEAB-C7EFBD777ED7"

destination = ""

headers = (Object)#1

messageId = "6594006E-7599-73A9-99E1-C7EFC0DECC8C"

timestamp = 0

timeToLive = 0

WSDL loaded



[after I invoke the ItemSearch operation...]



Invoking SOAP operation ItemSearch

Encoding SOAP request envelope

Encoding SOAP request body

'6B2E1EB4-6B3B-6EAF-FEA0-C7EFBC4AE5D3' producer sending
message '78961635-F431-BF56-7F6F-C7F006C05876'

'direct_http_channel' channel sending message:

(mx.messaging.messages::SOAPMessage)#0

body = "<SOAP-ENV:Envelope xmlns:SOAP-ENV="
http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xs="
http://www.w3.org/2001/XMLSchema"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">

<SOAP-ENV:Body>

<tns:ItemSearch xmlns:tns="
http://webservices.amazon.com/AWSECommerceService/2008-06-26">


<tns:AWSAccessKeyId>xxxxxxxxxxxxxxxxxxxx</tns:AWSAccessKeyId>

<tns:Shared>

<tns:Count>5</tns:Count>

<tns:Keywords>C.S.%20Lewis</tns:Keywords>

<tns:SearchIndex>Books</tns:SearchIndex>

</tns:Shared>

</tns:ItemSearch>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>"

clientId = "DirectHTTPChannel0"

contentType = "text/xml; charset=utf-8"

destination = "DefaultHTTP"

headers = (Object)#1

httpHeaders = (Object)#2

SOAPAction = ""
http://soap.amazon.com""

messageId = "78961635-F431-BF56-7F6F-C7F006C05876"

method = "POST"

recordHeaders = false

timestamp = 0

timeToLive = 0

url = "
http://soap.amazon.com/onca/soap?Service=AWSECommerceService"

Warning: Domain soap.amazon.com does not specify a
meta-policy. Applying default meta-policy 'all'. This configuration
is deprecated. See
http://www.adobe.com/go/strict_policy_files
to fix this problem.



Error: Request for resource at
http://soap.amazon.com/onca/soap?Service=AWSECommerceService
by requestor from
http://localhost:8700/lcdstraining/Lcds1-debug/Lcds1.swf
is denied due to lack of policy file permissions.



*** Security Sandbox Violation ***

Connection to
http://soap.amazon.com/onca/soap?Service=AWSECommerceService
halted - not permitted from
http://localhost:8700/lcdstraining/Lcds1-debug/Lcds1.swf

'6B2E1EB4-6B3B-6EAF-FEA0-C7EFBC4AE5D3' producer acknowledge
of '78961635-F431-BF56-7F6F-C7F006C05876'.

'6B2E1EB4-6B3B-6EAF-FEA0-C7EFBC4AE5D3' producer fault for
'78961635-F431-BF56-7F6F-C7F006C05876'.



When I run this via regular HTTPService it works fine... but
I want to understant this problem. Can you help?
1 Reply

Avatar

Level 1
Ok, I am LAME.... Here is the CORRECT destination
configuration to make the webservice work from within Flex using
the WebService tag...



<destination id="amazon" adapter="soap-proxy">

<properties>

<url>
http://webservices.amazon.com/AWSECommerceService/AWSECommerceService.wsdl</url>

<soap>
http://soap.amazon.com/onca/soap?Service=AWSECommerceService</soap>

</properties>

</destination>



I was calling the <url></url> above,
<wsdl></wsdl>... and I had not inlcuded the
<soap></soap> at all since I thought Flex Framework did
that all by iteself....once I changed it to <url></url>
and added the <soap> tag, everything worked fine.