Skip to Content
author's profile photo Former Member
Former Member

Send HTTP request as JSON format from PI to 3rd party system

Hello Experts,

I would like to know if we can send the HTTP request ( Idoc to HTTP scenario) from PI to 3rd party system using the JSON format.

Please see the sample request below that needs to be sent

curl https://URL\ ?access_token=JH5vpYs13XH7yfY7mCQ6emVa7wA=0gI1aW6Nac9b66d65475a2595d047d6962de2c789c3545a6d401c2c121692a11ce1af0c1cda654c7ebb9986a3f2485a0a9293ef7d5f09aa22b1b4b2943c10cad80cf079923cc5f25ac327cce43e3e5fdc78991102e39a503e41593013e3a13f3f94b240a \ -H "Content-Type: application/json" \ -d '{ "supplierId": "521cf822bd6d550000000021", "productId": "521cf822bd6d550000000008", "quantity": { "cases": 12 } }'

Is this achievable from PI using standard HTTP adapter or do we need custom adapter development?.

Thanks

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Jan 06, 2014 at 05:38 PM
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 06, 2014 at 06:53 PM

    Hello Aravind,

    Yes it is possible . In my case it is working. you can handle json in PI using gson google API's and can use http adapter.

    Regards

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Rajesh PS!

      And what's wrong with HTTP? :-) Actually, REST is architecture based on HTTP commutication.

      I have a number of interfaces sending data to REST services using HTTP adapter. In this case you just should take care of converting your payload from XML to JSON using java mapping for example. Further, in simple cases, you just set GET/PUT operation for HTTP adapter, set required headers and pass your JSON content as message body.

      Regards, Evgeniy.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.