Ali

Will you be able to trace the call to Amazon through TCPMon and get me a
trace of the reply.. also please post a successful request through
TCPMon and let me know how the Amazon service replies on a success (i.e.
a http 200 or 202 etc and any response if any)

asankha

ali_khan wrote:
> hi,
> below is my synapse.xml code:
>
> <definitions xmlns="http://ws.apache.org/ns/synapse";> 
>  <proxy name="AmazonProxy"> 
>         <target> 
>             <endpoint> 
>                 <address
> uri="http://webservices.amazon.com/onca/xml?Service=AWSECommerceService"/> 
>             </endpoint> 
>         <outSequence> 
>         <send/> 
>         </outSequence> 
>         </target> 
>         <publishWSDL
> uri="file:repository/conf/sample/resources/proxy/AWSECommerceService.wsdl"/> 
>     </proxy> 
>         <send/> 
> </definitions> 
>
> and the following is the client code(segment):
>
>
> String trpUrl = "http://localhost:8080/AmazonProxy";; 
>  String addUrl =
> "http://webservices.amazon.com/onca/xml?Service=AWSECommerceService";; 
>
>  Options options = new Options(); 
>  options.setTo(new EndpointReference(addUrl));           
>  options.setProperty(Constants.Configuration.TRANSPORT_URL, trpUrl); 
>
>   OMElement result = serviceClient.sendReceive(payload); 
>
> where the payload is the following xml:
>
> <m:ItemLookup
> xmlns:m="http://webservices.amazon.com/AWSECommerceService/2005-03-23";> 
> <m:Request><m:ContentType>text/html</m:ContentType><m:IdType>ASIN</m:IdType><m:ItemId>0706922611</m:ItemId><m:SubscriptionId>0525E2PQ81DD7ZTWTK82</m:SubscriptionId></m:Request></m:ItemLookup>
>  
>
>
> Also I have tested the service url i.e
> "http://webservices.amazon.com/onca/xml?Service=AWSECommerceService"; on web
> browser by passing parameters as:
>
> http://webservices.amazon.com/onca/xml?Service=AWSECommerceService&AWSAccessKeyId=0GGBQRMT1MHNNDN5BY02&Operation=ItemLookup&IdType=ASIN&ItemId=0706922611
>
> When you put the above url in web browser it will give the response as XML.
> So I think the service URL is correct.
>
> Please suggest now
>
> thanks
> faisal
>
>
>
>
>
> pzfreo wrote:
>   
>> Can you please post your client and synapse.xml?
>>
>> It looks like Amazon isn't liking the request it is sent by Synapse.
>>
>> Regards,
>> Paul
>>
>> On Dec 31, 2007 5:04 AM, ali_khan <[EMAIL PROTECTED]> wrote:
>>     
>>> hi,
>>>
>>> I changed the service url to
>>> "http://webservices.amazon.com/onca/xml?Service=AWSECommerceService"; and
>>> now
>>> I am getting a different error which is:
>>>
>>> org.apache.axis2.AxisFault: The input stream for an incoming message is
>>> null.
>>>         at
>>> org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:71)
>>>         at
>>> org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:326)
>>>         at
>>> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389)
>>>         at
>>> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
>>>         at
>>> org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
>>>         at
>>> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528)
>>>         at
>>> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:508)
>>>         at
>>> com.amazon.soap.StockClient.executeClient(StockClient.java:220)
>>>         at com.amazon.soap.StockClient.main(StockClient.java:85)
>>>
>>> Can you please let me know what could be the reason for this error.
>>>
>>> Thanks
>>> faisal
>>>
>>>
>>>
>>> asankha wrote:
>>>       
>>>> Hi Faisal
>>>>         
>>>>> Also I am sitting behind network proxy. Please suggest if this is the
>>>>> root
>>>>> of the problem. Where will I have to specify the network proxy
>>>>>           
>>> settings
>>>       
>>>>> to
>>>>> get rid of this problem.
>>>>>
>>>>>           
>>>> I will take a look at the root cause of the NPE next week.. for the
>>>>         
>>> time
>>>       
>>>> being, is there anyway you can allow direct access to the Amazon
>>>>         
>>> service
>>>       
>>>> from the node that runs Synapse?
>>>>
>>>> One more thing you could try is to follow this mail thread:
>>>>
>>>>         
>>> http://www.mail-archive.com/[EMAIL PROTECTED]/msg02153.html
>>>       
>>>> and set a "Proxy-Connection" *transport* header to point to your proxy
>>>> server.. If this fails, please raise a JIRA and we will address it as
>>>> soon as we can
>>>>
>>>> asankha
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>>
>>>>
>>>>         
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Amazon-proxy-unable-to-forward-request-to-amazon-search-service-tp14526765p14554376.html
>>> Sent from the Synapse - Dev mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>>
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>       
>>
>> -- 
>> Paul Fremantle
>> Co-Founder and VP of Technical Sales, WSO2
>> OASIS WS-RX TC Co-chair
>>
>> blog: http://pzf.fremantle.org
>> [EMAIL PROTECTED]
>>
>> "Oxygenating the Web Service Platform", www.wso2.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>>     
>
>   

Reply via email to