ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Using Standard Input When Being A Provider Web Service

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using Standard Input When Being A Provider Web Service

    This is my first jump into using our IBMi as a web service provider. We have been able to consume via web services for a while now. This is a new animal.

    I have created an IWS server on our IBMi system and am providing some item master data based on three entries in the URL:
    • Customer ID
    • Product Code
    • Item Number
    The url looks like this:

    Code:
    http://<systemdomain>:10032/web/services/iteminq/12345/31/D700SCXH504
    I return a JSON string using the outputs based on my deployed service setup:
    ====================

    Click image for larger version

Name:	Web Service 01.PNG
Views:	103
Size:	23.9 KB
ID:	157419
    ​​​​​​​====================

    This works great but now the requesting company wants to send a JSON string that will have multiple product codes and item numbers. Something like this:

    Code:
    {
    "itemRequestHeader": {
    "customerNumber": "12345",
    "itemsRequested": [
    {
    "productCode": "01",
    "itemNumber": "20275"
    },
    {
    "productCode": "04",
    "itemNumber": "1000451"
    }
    ]
    }
    }
    Can that be done using the setup above or will I have to go the HTTP server route on this? If so, I have a TON more questions on that one! :-)

    Thanks!

  • #2
    I see where this exact question was already asked in the RPG forum. I'll follow up there.

    Comment

    Working...
    X