Amazon Web Services Continued

Ok, I am LAME…. Here is the CORRECT destination configuration ( in the proxy-config.xml ) to make the webservice work from within Flex using the WebService tag plus LiveCyle Data Services ES…


<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.

I hope this helps other flex developers, as I found almost zilch online.

If you enjoyed this post, make sure you subscribe to my RSS feed!

8 Responses to “Amazon Web Services Continued”

  1. Nell says:

    Hi there,

    Could you tell me where i have to put that code to take care of the security issue?

    Thanks in advance

  2. admin says:

    Hi Nell,

    It goes in the proxy-config.xml file in your LCDS server. If you use the standard set up, you’ll find it at:

    [your drive]\[your LCDS folder]\jrun4\servers\default[or your project folder]\flex\WEB-INF\flex

    Hope that helped.

    Kev

  3. This helps if you’re using the proxy, but what if you’re simply using the WebService MXML tag directly, as opposed to using the Import Web Service option? For example:

    {amazonDeveloperId}

    {itemId}
    {idType}
    {searchIndex}
    ItemAttributes,Images,Tracks,EditorialReview

    Amazon has a crossdomain.xml file, so this should simply work. In fact, it DID work until Flash 9,0,124,0. Any ideas?

  4. [...] wall. Unless I’m totally mistaken, and there’s a workaround that doesn’t involve using a proxy? « US Border Laptop Search Policies Are [...]

  5. admin says:

    Brendon,

    What url are you using to access the AWS?

    Kev

  6. admin says:

    I just wrote a quick HTTP Service that works fine without the Proxy:


    <mx:HTTPService id="AmazonSearch"
    showBusyCursor="true"
    url="http://ecs.amazonaws.com/onca/xml" method="POST"
    resultFormat="e4x"
    result="itemSearchResult(event)">

    <mx:request >

    <Version>2008-06-26</Version>
    <Service>AWSECommerceService</Service>
    <Operation>ItemSearch</Operation>
    <AWSAccessKeyId>[ your aws access key id here ]</AWSAccessKeyId>
    <Keywords>hunting</Keywords>
    <SearchIndex>Books</SearchIndex>
    <Count>20</Count>
    <ResponseGroup>Medium</ResponseGroup>
    <ItemPage>5</ItemPage>

    </mx:request>

    </mx:HTTPService>

  7. I’m using “http://webservices.amazon.com/AWSECommerceService/AWSECommerceService.wsdl”. However, it appears my problem is caused by the lack of the in the crossdomain.xml file on AWS. As a result, you can’t use SOAP to access AWS.

  8. admin says:

    Brendon,

    I believe you are right about that. You cannot (as far as I know) pull from the wsdl file without using the proxy of BlazeDS or LCDS, however you can still get almost all the same info via the HTTP Service as I did above. If your host server will allow, you can load LCDS or BlazeDS yourself and use the proxy or you can just use the HTTPService…

    Or you could write your own proxy if you have another domain you do have access to.

    I know it’s frustrating, but there are lots of ways to skin a cow.

    Kevin

Leave a Reply

You must be logged in to post a comment.