AnsweredAssumed Answered

How to Create Web service server for JSON by using two different Data bases

Question asked by nreddy926458 on Dec 19, 2016
Latest reply on Dec 21, 2016 by Sjaak Overgaauw

1) SKU and the list of store ids (no limit on the number of store id’s passed) will be passed in the request, and the below AS400 database (as400 is a custom database and the attached jar is needed) needs to be connected to retrieve the inventory allocation.  Along with the inventory allocation, price needs to be retrieved by querying against the Vendor  database.

2) Vendor database is a SQL database and this database needs to be queried to retrieve the price by passing the Item number and the SKU .And records needs to be fetched from Vendor database whose company field value (bjcomp) is equal to 001 and status field value (bjmpcd) is not equal to “X”.

How to Connect Custom Database and How to do error handling for this ?

Sample  JSON Request with product id “001E”:

 

{

  "StoreAVRequest": {

    "Sku": "001X________XX___14H__32__",

    "StoreId": [

      "1234",

    ]

  }

}

 

 

Sample JSON Response with product id “001E”:

 

{

"StoreAVResponse": {

      "StoreAV": [

      {

        "Sku": "001X________XX___14H__32__",

        "StoreId": "1234",

        "Allocation": "5",

                                "Price":"92.00"

      }


 

Outcomes