on 01-06-2014 5:28 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Hi Aravind,
Did you see these links :
http://scn.sap.com/thread/3211533
https://github.com/tobrien/sample-json-parsing
As I understand you must do a module adapter.
Kind regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.