Send XML Message via HTTP and Receive Response

Hello,
We have a scenario where we need to update Currency Exchange Rates in R/3 via a 3rd party called Oanda.  I'd like to use XI for this Interface, if possible. 
Basically, we need to send XML over HTTP.  Here's the URL and the XML we need to use for our POST (I'll need to perform the look-up for about 15 currency codes - I plan on using a BPM process to loop through each currency code specified in a flat file):
http://www.oanda.com/cgi-bin/fxml/fxml?fxmlrequest=<CONVERT><CLIENT_ID>TestAccount1</CLIENT_ID><EXCH>USD</EXCH><EXPR>CAD</EXPR><DATE>03/25/2008</DATE></CONVERT>
And the reponse looks like this:
<RESPONSE>
  <EXPR>CAD</EXPR>
  <EXCH>USD</EXCH>
  <AMOUNT>1</AMOUNT>
  <NPRICES>1</NPRICES>
  <CONVERSION>
    <DATE>Mon, 24 Mar 2008 20:00:00 GMT</DATE>
    <ASK>1.0257</ASK>
    <BID>1.0251</BID>
  </CONVERSION>
</RESPONSE>
I plan on mapping each reponse to BAPI_EXCHRATE_CREATEMULTIPLE, using BPM.
So my question is this:  Should I use the HTTP adapter for the out going POST to Oanda?  If so, would the HTTP adapter be consider the sender or the receiver?  Also, how would the XML message be automatically appended to the end of the URL (i.e., after the fxmlrequest parameter)?  I guess I'm a little confused on how to use the HTTP adapter...  Are there any blogs that discuss this type of scenario?
Thanks,
Matt

Hi guys,
I have few concerns for setting up this scenario.
1). I have created a data type for request mapping, and teste the mapping.
The output looks like below:
  <?xml version="1.0" encoding="UTF-8" ?>
  <ns1:MT_CONVERT xmlns:ns1="http://test.com/ExchngRate">
   <CONVERT>
     <CLIENT_ID>test</CLIENT_ID>
     <EXPR>CAD</EXPR>
     <EXCH>USD</EXCH>
     <DATE>10/21/2009</DATE>
     <AMOUNT>1</AMOUNT>
   </CONVERT>
  </ns1:MT_CONVERT>
How to pass only
  <CONVERT>
     <CLIENT_ID>test</CLIENT_ID>
     <EXPR>CAD</EXPR>
     <EXCH>USD</EXCH>
     <DATE>10/21/2009</DATE>
     <AMOUNT>1</AMOUNT>
   </CONVERT>
to the receiver HTTP adapter.
2) I am using URL address in the receiver HTTP adapter.
Target Host: www.oanda.com
Path Prefix: cgi-bin/fxml/fxml?fxmlrequest=
What is will be Service Number?
Looking forward for you help. Your help is greatly appreciated.
Thanks,
Namadev
Edited by: Namadev Chillal on Oct 21, 2009 5:35 PM

Similar Messages

  • Send XML messages via Internet

    Hello,
    Just wanted to know if it is possible for SAP R3 Enterprise 470x110 to set this up.  Basically we wanted to send XML messages over the internet to our counterparts in other location.  In return they will be sending us XML messages in return that we need to process.  Is this a limitation of our SAP release?  If this can be configured in our system, does anyone has done it?  Let me know if you have references. 
    Thanks a lot.
    Tony

    Jan,
    if QoS is important to you then JMS may not be overkill. Most appservers like Borland, IONA, HP/Bluestone and BEA provide JMS facilities already. What appserver are you using? Does it support JMS?
    There are many cases of companies doing what you want to do, both internally and externally with their partners over the Net.

  • Send data via HTTP and wait 10 Seconds before sending next Message

    Hi Folks,
    I am doing an IDOC - XI - HTTP scenario.
    after sending a message via the HTTP-receiver I have to wait up to 10 Seconds, before my partner accept the next Message.
    Is there a way to configure the HTTP-receiver to wait?
    Thanks,
    Chris

    Hi Chris,
    You can use ccBPM for this scenario.
    Scenario 1 :
    1 IDOC contains multiple records, so you can convert to multiline items.
    Loop base on the multiline items (Block Step).
        Send Step for sending http request.
        wait step to wait for 10 seconds.
    Scenario 2 :
    1 IDOC contains only single record. so you need to collect the IDOC until certain time.
    Loop base on the multiline items (Block Step).
        Send Step for sending http request.
        wait step to wait for 10 seconds.
    Regards
    Fernand

  • Sending Bids from SRM to suppliers and receiving responses

    Hi Experts,
    Help me with a suggestion for sending Bids from SRM to suppliers and receiving responses - preferably through email adapter.
    Regards,
    Hemanthika
    Edited by: hemanthika patnaik on Apr 28, 2008 2:24 PM

    Sorry for the delay,
    I have worked in a similar integration with SRM - XI, but the only difference is that we used Proxy -- HTTPS for Purchase Order Request.
    In your case it would be:
    1. Create custom IDOC and Message type.
    2. Find the triggering process from the SRM side, trigger the IDOC from SRM.
    3. Generate the partner profile and ALE config.
    4. Import the custom IDOC in XI.
    5. Use a map in XI to convert the IDOC data to customer format.
    6. Use  HTTP adapter to connect.
    7. In the HTTP adapter you can use url method or the RFC destination to do the connectivity. ( I would recommend using the RFC destination to do it.)
    8. You should be receiving an acknowledgment from the customer when the document is posted at their end.
    9. The response is either 200 for successful transmission. It would be 400 or 500  for errors.
    10. Use the response message to do a message map with the mail adapter.
    11. Generate the content of the mail adapter using the message map.
    12. In the message map ideally you should use Value mapping to generate the   TO and FROM data. (This enables you to change the receipients while in development and production without changing the message mappinng program.)
    13. Use mail package in the Mail adapter to send the mail content to the business users.
    Hope this helps.
    Indranil.
    Award points if this helps

  • I have an old Mac G5 with OSX 10.5.8  After a crash of my HD, I reinstalled the CS3. At the time of recording I get a window with the message "COMPLETED REGISTRATION" and under "There was a problem sending the informasioni via internet" and still under th

    I have an old Mac G5 with OSX 10.5.8
    After a crash of my HD, I reinstalled the CS3.
    At the time of recording I get a window with the message "COMPLETED REGISTRATION" and under "There was a problem sending the informasioni via internet" and still under three choices to "send back" and "records in a second time "or" never record "and I continue to choose the latter option.
    Another problem is that in Bridge (version 2.0.0.975) I can no longer see thumbnails of RAW files from my Canon 40D that I saw before.
    Should I upgrade ACR? which is the latest version supported on my Mac?
    thank you

    Sergio Bellotto if you keep receiving the registration screen then please try accepting the screen in a different User account.

  • Whats the difference between sending messages via socket and MQs?

    Whats the difference between sending messages via socket and MQs?

    Soph wrote:
    Whats the difference between sending messages via socket and MQs?With JMS (and the like) your application uses a socket to connect to a central server called a "*Message Broker*". Over this connection it can send or receive messages.
    A Message Broker is somewhat analogous to a database server. Multiple clients connect to it to exchange messages. As with a database a client first establishes a connection, then requests specific facilities like subscriptions.
    It creates a strong decoupling between sender and receiver and handles stuff like allowing multiple receivers for the same message, queuing of messages for applications not currently running and so on.
    (And don't worry, you can get perfectly good message brokers for free such as openMQ and activeMQ.)

  • My mail can send out message but can't receive new e-mail? and some software(adobe illustrator cs) and applications(terminal) can't run ? but in another user account, terminal and illustrator can run.

    Hi,
    My Mac info:
    Machine Name:          Power Mac G5
    Machine Model:          PowerMac7,3
    CPU Type:          PowerPC G5  (3.0)
    Mail Version 2.1.3 (753.1)
    My mail application can send out message but can't receive new e-mail now ? please see attached before my capture screen
    and some software(adobe illustrator cs) and applications(terminal) can't run ? please see attached
    but in another user account, terminal and illustrator can run.
    Please kindly help to check with these problems. Thanks.

    Verify and Repair disk “Data”
    Checking HFS Plus volume.
    Checking Extents Overflow file.
    Checking Catalog file.
    Checking multi-linked files.
    Checking Catalog hierarchy.
    Checking Extended Attributes file.
    Checking volume bitmap.
    Checking volume information.
    Volume Header needs minor repair
    Repairing volume.
    Rechecking volume.
    Checking HFS Plus volume.
    Checking Extents Overflow file.
    Checking Catalog file.
    Checking multi-linked files.
    Checking Catalog hierarchy.
    Checking Extended Attributes file.
    Checking volume bitmap.
    Checking volume information.
    The volume Data was repaired successfully.
    Mounting Disk
    1 HFS volume checked
    Repair attempted on 1 volume
      1 HFS volume repaired

  • I recently updated the software on my ipad2 to 5.0.1 and when I send a message via "chat" it shows on all the iPhones associated with my account (my sisters, my husbands, etc) is there a way to stop that?

    I recently updated the software on my ipad2 to 5.0.1 and when I send a message via "chat" it shows on all the iPhones associated with my account (my sisters, my husbands, etc) is there a way to stop that?

    If you have been using your phone as recommended, you should have minimal data loss from the inability to restore from a backup.
    Contacts and calendars should be synched to a computer application like Outlook or Address Book (or a cloud service like Google Contacts or iCloud).  The update process does NOT affect these computer applications so your contacts and calendars should be safe and sound in the application ready for synching back to your phone.
    Same for photos.  It is recommended that photos be imported to your computer as soon as possible after taking them (just as you would import them from any other camera) for storage, archival and safekeeping.  Again, your photos should be safe and sound on your computer.
    If you've not been using your computer as recommended, you've learned a very hard lesson, I'm afraid.

  • Sending a dom via http Post

    Hi,
    for some reason unknown to me whenever I try to send a dom via http Post I get the following error:
    org.xml.sax.SAXParseException: The root element is required in a well-formed document.
    This is the source code:
    package com.cyberrein.payunion.transaction;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    //xml lib
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    //weblogic xml lib
    import weblogic.apache.xerces.dom.DocumentImpl;
    import weblogic.apache.xml.serialize.DOMSerializer;
    import weblogic.apache.xml.serialize.XMLSerializer;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    public class Xmltest extends HttpServlet {
    //Initialize global variables
    public void init(ServletConfig config) throws ServletException {
    super.init(config);
    //Process the HTTP Request
    public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    // Retrieve transaction data from HttpServletRequest.
    try {
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    dbf.setValidating(false);
    DocumentBuilder db = dbf.newDocumentBuilder();
    Document docIn = db.parse(request.getInputStream());
    String code = "XX";
    String tranID = "000000";
    String message = "This Card Is Invalid. Transaction Discontinued";
    //Output dom
    Document docOut = new DocumentImpl();
    Element e = (Element)docOut.createElement("TransactionResponseData");
    e.setAttribute("Code", code);
    e.setAttribute("TransactionID", tranID);
    e.setAttribute("Message", message);
    docOut.appendChild(e);
    FileOutputStream fos;
    fos = new FileOutputStream("/victory");
    DOMSerializer serX = new XMLSerializer(fos,null);
    serX.serialize(docIn);
    DOMSerializer ser = new XMLSerializer(response.getOutputStream(), null);
         ser.serialize(docOut);
         } catch (Throwable e) {e.printStackTrace();}
    //Get Servlet information
    public String getServletInfo() {
    return "com.cyberrein.payunion.transaction.Xmltest Information";
    package com.cyberrein.payunion.transaction;
    import org.w3c.dom.*;
    import org.apache.xerces.*;
    import org.apache.xerces.dom.*;
    import org.apache.xerces.parsers.*;
    import org.apache.xml.serialize.*;
    import org.xml.sax.*;
    import java.net.*;
    import java.io.*;
    public class CardClient {
    private String sURI;
    public BufferedReader in
    = new BufferedReader(new InputStreamReader(System.in));
    public CardClient(String serverURI) {
    sURI = serverURI;
    public Document test(){
    Document docIn = null;
    try
    //XML Document impl
         docIn = new DocumentImpl();
    //Create the root element
         Element t = docIn.createElement("TransactionData");
    Element k = docIn.createElement("Payunion.com");
    k.appendChild( docIn.createTextNode("North American server") );
    t.appendChild(k);
    //Set attributes
    t.setAttribute("cardnumber", "4444444444444444");
    t.setAttribute("amount", "3000.67");
    t.setAttribute("name", "tolu agbeja");
    t.setAttribute("cvv2", "001");
    t.setAttribute("pu_number", "ejs:pupk:23456");
    t.setAttribute("expirydate", "0903");
    t.setAttribute("address", "100 peachtree industrial");
    t.setAttribute("zipcode", "30329");
    docIn.appendChild(t);
    catch (Throwable te)
    te.printStackTrace();
    return docIn;
    public Document sendRequest(Document doc) {
         Document docOut = null;
         try {
         URL url = new URL("http://" + sURI);
         HttpURLConnection conn = (HttpURLConnection) url.openConnection();
    conn.setRequestMethod("POST");
         conn.setDoInput(true);
         conn.setDoOutput(true);
         OutputStream out = conn.getOutputStream();
    BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()));
    XMLSerializer ser = new XMLSerializer( out, new OutputFormat("xml", "UTF-8", false) );
    ser.serialize(doc);
    while(!br.ready()){}
         DOMParser parser = new DOMParser();
         parser.parse(new InputSource(br));
         docOut = parser.getDocument();
    catch (Throwable et)
         et.printStackTrace();
         return docOut;
    public static void main(String []args)
    CardClient c = new CardClient("cyber1:7001/xmltest");
    try
    Document doc = c.sendRequest(c.test());
    Element responseMessage = (Element)doc.getElementsByTagName("TransactionResponseData").item(0);
    String message = responseMessage.getAttribute("Message");
    String tranID = responseMessage.getAttribute("TransactionID");
    String code = responseMessage.getAttribute("Code");
    System.out.println(message);
    System.out.println("");
    System.out.println("The Response Code Is: "+code);
    System.out.println("");
    System.out.println("The Transaction ID Is: "+tranID);
    catch(Exception ex)
    ex.printStackTrace();
    All comments will be appreciated!!

    Hi, thanks for your reply i knew the FileUplaod was the way forward.
    I read topics advising to use the FileUpload and tried the following but it did not seem to work ( i get an HTTP Internal Server error when i try that):
    try
    DiskFileUpload upload = new DiskFileUpload();
    boolean isMultipart = FileUpload.isMultipartContent(request);
    if( isMultipart )
    List items = upload.parseRequest( request );
    Iterator iter = items.iterator();
    while( iter.hasNext() )
    FileItem fileItem = ( FileItem ) iter.next();
    File uploadedFile = new File("myreceivedfile.zip");
    fileItem.write( uploadedFile );
    }catch (Exception e)
    System.out.println("RECEIVER: " + e.getMessage());
    Also DiskFileUpload,isMultipartContent and parseRequest have a line going through the middle (horizontal middle).
    Edited by: Overmars08 on Jun 23, 2009 5:35 AM
    Edited by: Overmars08 on Jun 23, 2009 5:36 AM

  • I just bought an new ipad mini with wifi and cellular. Is there any way to send text messages to people and contacts that do not have iphones such as friends with blackberrys or a samsung galaxy smartphone.

    I just bought an new ipad mini with wifi and cellular. Is there any way to send text messages to people and contacts that do not have iphones such as friends with blackberrys or a samsung galaxy smartphone from this ipad. Everytime I try to send a message to a person that does not have an Apple product ( Iphone or Ipad ) it comes up saying contact is not registered for iMessage and wont send it. I can only send them a message from my iPhone 4 instead. Do I have to install a new App from the App store to send these non iMessage cell users a message?

    FYI
    Complete guide to using iOS 6
    http://howto.cnet.com/ios-6-complete-guide/
    Guide to Built-In Apps on iOS
    https://sites.google.com/site/appleclubfhs/support/advice-and-articles/guide-to- built-in-apps-ios
    You can download a complete iOS 5 iPad User Guide and iOS 6 iPad User Guide here: http://support.apple.com/manuals/ipad/
    Also, Good Instructions http://www.tcgeeks.com/how-to-use-ipad-2/
    Apple - iPad - Guided Tours
    http://www.apple.com/ipad/videos/
    Apple iPad Guided Tours - Watch the videos see all the amazing iPad apps in action. Learn how to use FaceTime, Mail, Safari, Videos, Maps, iBooks, App Store, and more.
    http://www.youtube.com/watch?v=YT2bD0-OqBM
    http://www.youtube.com/watch?v=ROY4tLyNlsg&feature=relmfu
    http://www.youtube.com/watch?v=QSPXXhmwYf4&feature=relmfu
    How to - Articles & User Guides & Tutorials
    http://www.iphone-mac.com/index.php/Index/howto/id/4/type/select
    iPad How-Tos  http://ipod.about.com/lr/ipad_how-tos/903396/1/
    You can download this guide to your iPad.
    iPad User Guide for iOS 5
    http://itunes.apple.com/us/book/ipad-user-guide-for-ios-5/id470308101?mt=11
     Cheers, Tom

  • I need to send a message via socket from a C program to a Java program

    Hi,
    I need to send a message via socket from a C program to a Java program. The message has three data: a long, an integer and a string.
    How can I put those three fields in a array of bytes in C? How can I extract those same three fields from an array of bytes in java?
    Thanks a lot!

    A few options:
    JNI
    Corba
    Using sockets directly
    take your pick.

  • TS2755 Does anyone know why: when using Messages on my iPad, a cannot send a message with only text on it? Strange though, I can send a message with text AND a photo??

    Does anyone know why, when using Messages on my iPad, a cannot send a message with only text on it? Strange though, I can send a message with text AND a photo??

    Hi Cass,
    If you are having issues with Messages on your iPad, you may find the following article helpful:
    iOS: Troubleshooting Messages
    http://support.apple.com/kb/ts2755
    Regards,
    - Brenden

  • Is there any way that I can buy an itunes card via online and receive that in my E-mail?

    Is there any way that I can buy an itunes card via online and receive that in my e-mail?

    I imagine that if you travel to the UK and take out an item you may be able
    to reclaim the VAT at exit port
    You might get some pointers here
    Google search
    http://www.dccsupplies.com/shop/export_info.htm

  • Authentication to XML DB via WebDAV and SSO

    Hi,
    Is there any way to be authentified by XML DB via WebDAV and SSO ?
    If the access to our infrastructure of database servers is controled by SSO, once I'm authentified by OID (SSO), is it possible to pass that authentification to XML DB through standard port 8080 ?
    Thank you for your help

    This is planned for a future (not 10g) release

  • After years of owning all things Mac, I am finally trying to use iChat, and can't get it to work. I see my buddy, but all I can do is send a message--the video and audio chat icons are gray, as is inviting to a video chat under Buddies.

    After years of owning all things Mac, I am finally trying to use iChat, and can't get it to work. I am using gmail, and I see my buddy (no camera icon next to her name), but all I can do is send a message--the video and audio chat icons are gray, as is inviting to a video chat under Buddies. My buddy has the same problem as I.  We are able to do video chat through gmail, but I had hoped to use iChat.  I am using OS 10.6.8, iChat v. 5.0.3.  What am I missing?

    HI,
    iChat will Video chat to another iChat in a Jabber Buddy List (Google run a Jabber server for GoogleTalk)
    However it will not Video to the Web Page login to iGoogle or the Web Mail Page login.  (where people can Google Chat as it were in a  Web Browser).
    Nor does it video to the Google Talk Stand alone app for PCs or any other Jabber apps on any platform.
    iChat uses a connection Process called SIP (Session Initiation Protocol) which is also used by other VoIP devices.
    Jabber/XMPP invited the Jingle Protocol for Jabber Applications.
    Google have included this in their Standalone app and the Plug-in for Web Browsers on both PCs and Mac (you can get this as a Standalone Plug-in or as part of Chrome)
    More on this here  This article has been changed several time in the recent months.  It now claims a greater involvement by Google in writing the Jingle Library (Although now Google's version does not work with the others)
    This tends to mean that using the web Login to Google to Chat also cannot video chat to other Jabber apps that are using Jingle.
    If your Buddy is using iChat then check the Video Menu has two items to Enable Camera/Video chat and Microphone/Audio chats are ticked.
    In the View Menu the Show Status Items should be ticked (Selecting them toggles the tick and the function On or Off)
    It could be Internet speed but at this stage I would doubt this at this stage.
    10:27 PM      Saturday; January 21, 2012
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
      iMac 2.5Ghz 5i 2011 (Lion 10.7.2)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

Maybe you are looking for