cancel
Showing results for 
Search instead for 
Did you mean: 

Need to call a WebService URL from PI for currency conversion

0 Kudos

Hi Folks,

I Have a requirement.I have to call the Oanda webservice for currency conversion. I need to call the URL.This URL opens well in browser and gives me the response.

I just need to call this URL. I will not pass any payload to it. Just calling this URL will return me result .

What adapter should I use for this purpose (HTTP or SOAP).I am planning to go for PROXY-PI-HTTP

I get a msg from ABAP PROXY, but I just need to call the URL http://ABC.com/request/request?string=getResult (without sending any payload) and will get a response, which I need to send back to ABAP PROXY.

1.Sender : ECC 6.0 Proxy XML.Request will be in the form.

<CONVERT>

<CLIENT_ID></CLIENT_ID>

<EXCH></EXCH>

<EXPR></EXPR>

</CONVERT>

2.Receiver : WEBSITE for currency exchange

           It provides services through FXML which is a scriptable,XML-based markup language for constructing Java object graphs.

           Clients can access receiver FXML service using a POST option to a particular URL.Response structure would contain the below fields.

  <RESPONSE>

  <EXPR> <EXPR />

  <EXCH> <EXCH />

  <AMOUNT> <AMOUNT />

  <NPRICES>  <NPRICES />

  <CONVERSION>  <CONVERSION/>

  </RESPONSE>


I checked michal krawczyk blog http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/01/05/michals-pi-tips-exchange-rates-fr.....but here i am using proxy at sender side . I cannot use the approach of calling the URL from SOAP AXIS adapter.

What is the best approach to follow this?It is good if anyone sents step by step procedure.

Accepted Solutions (0)

Answers (2)

Answers (2)

Harish
Active Contributor
0 Kudos

Hi Kalyan,

you can call the webservice with empty payload. the suitable approach is to use SOAP adapter.

The best approach is to call webservice with empty payload (only with soap header) using soap adapter.

Regards,

Harish

0 Kudos

Thanks for the reply..

Here to make the HTTP connection with Oanda , in the conversions parameters of SOAP adapters i have checked the options:-

Do Not use SOAP envelope

Use Query String

Once the scenario is initiated i am getting the following error .

<SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: No SOAP Envelope but 1 {}ERROR; HTTP 200 OK</SAP:AdditionalText>

Please guide :-

What configuration i am missing in the Reciever side in SOAP adapter?

Whether to use HTTP adapter in place of SOAP adapter at the reciever side? If HTTP is used please guide the steps to configure the same to have the synchronous communication possible .

Harish
Active Contributor
0 Kudos

Hi Kalyan,

you need to use SOAP enevelop. you just need to pass empty payload or request message to web service.

Regards,

Harish

0 Kudos

I have unchecked the use SOAP enevelop..but same message.

i think any issue with mapping???

MM_ProxyRequest to Soap req i have mapped with field

URL-->URL

MM_soapresp to MM_proxyresp

RESPONSE>

  <EXPR> <EXPR />

  <EXCH> <EXCH />

  <AMOUNT> <AMOUNT />

  <NPRICES>  <NPRICES />

  <CONVERSION>  <CONVERSION/>

  </RESPONSE>

Can any one help me on this?




Harish
Active Contributor
0 Kudos

Hi,

can you test the message in mapping and give me exact error. I can help you to solve that error.

Regards,

Harish

Shabarish_Nair
Active Contributor
0 Kudos

Is the Oanda service you have subscribed to a webservice or a REST service? Confirm this first.

If it is a webservice, then a SOAP call should be more than enough.

But from what you have mentioned above, it seem more like a HTTP get call as you are not passing any payload.

So try with the plain HTTP adpater also to connect to the service.

Best approach is, test the service URL with SOAP UI and you should get a good idea of how to invoke the service.