Skip to Content

                    

This web blog describes a simple scenario which illustrates synchronous
message flow between http sender and http receiver by performing ‘CSV File’
Lookup in the mapping.

The http sender sends  an item name and quantity
as request; a lookup is performed to fetch the price of the item. These are
sent to J2ee application using http receiver. The j2ee application calculates
total sum (price*quantity) and sends it as response.

Since the Message Flow is synchronous,response is maapped and shown at http client.

h3. Request Mapping

                         image

                    

h3. CSV File Lookup:

I have referred Sundar’s blog for
Making CSV File Lookup Possible In SAP XI !!! .

public String findprice(String itemno, Container container){

   try

   {

     Class.forname(“Driver”);

     Connection con=DriverManager.getConnection(“jdbc:driver:””/””/”+”pciib04530/users”);

     Statement stmt=con.createStatement();

     Resultset rs=stmt.executeQuery(“select itemno,price from price where itemno=”itemno”’”);

     String price=0;

     While(rs.next())

     {

          Price=rs.getString(“price”);

     }

     Con.close();

     return price;

  }

  Catch (Exception exp){return “-1”;}

}

                    

This function fetches price of the specified item from
corresponding CSV File.

h3. Response mapping:

                         image                    

h3. Receiver Communication channel:

image

                    

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply