Hi,

i have solve my problem. I am using the inline script like sample 352. I
manipulate the url with the inline script.

phuong

-----Ursprüngliche Nachricht-----
Von: Phuong Doan [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 19. November 2008 13:31
An: [email protected]
Betreff: Amazon Webservice via REST and get

Hi,

I want to use awsecommerceservice via rest and get.

If I send the request in the webbrowser
(http://ecs.amazonaws.com/onca/xml?Service=AWSECommerceService&AWSAccessKeyI
d=13G6TZDKA1QJMYDX9VR2&Operation=ItemSearch&SearchIndex=Books&Title=Axis2) I
get a response.

In synapse I tried with a proxy

<proxy name="AmazonProxy">
        <target>
                <endpoint>
                        <address
uri="http://ecs.amazonaws.com/onca/xml?Service=AWSECommerceService";
format="get"/>
                </endpoint>
                <outSequence>
                        <send/>
                </outSequence>
        </target>
</proxy>

my client has the rest-option
(options.setProperty(Constants.Configuration.ENABLE_REST,
Constants.VALUE_TRUE);) I don' know how to give synapse the rest of
parameter ( AWSAccessKeyId=13G6TZDKA1QJMYDX9VR2&Operation=....). I have
tried with sendreceive(payload). But it doesn't' work.

my payload-data: 

<ItemSearch
xmlns="http://webservices.amazon.com/AWSECommerceService/2008-08-19";>
   <Request>
      <AWSAccessKeyId>13G6TZDKA1QJMYDX9VR2</AWSAccessKeyId>
      <ResponseGroup>Medium</ResponseGroup>
      <SearchIndex>Books</SearchIndex>
      <Title>Axis2</Title>
   </Request>
</ItemSearch>

And here is the error:
org.apache.axis2.AxisFault: The input stream for an incoming message is
null.
        at
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.j
ava:72)
        at
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAx
isOperation.java:353)
        at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperatio
n.java:416)
        at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisO
peration.java:228
....

With soap it works fine. Can anybody help me with amazon/rest/get?

phuong

Reply via email to