on 07-04-2019 10:39 AM
Hi All,
I am new to this Proxy to JSON Synchronous concept. JSON based API integration, Which Adapter i have to use at Receiver SIDE.
I gone through some link's but i have some little bit confusions so plz guide me to how to do the settings and i need one sample scenario with
end -to-end flow in sap pi 7.0.
Please provide the solutions.
Thanks
Lakshminarayana
Hi!
In SAP PI 7.0 you could try to use plain HTTP adapter with GET/POST operations and java mappings to convert xml payload to JSON and vice versa.
Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I actually thought of that and had even created a sync interface with a REST webservice but never got to perform testing as the interface was scrapped. But I always wondered would that have worked or not. I was mostly worried that when PI gets the response from the REST webservice, it might fail due to inbound validation step. I had planned on using HTTP channel to connect to that REST webservice and I think there is no option there to disable inbound validation.
Thanks,
Ajeya G V
Hello Lakshmi,
In SAP PI 7.0, you can use HTTP Adapter and dynamically set HTTP request headers if any. For the Xml to JSON conversion you can achieve using Java mapping.
You use json library for this conversion (Xml to Json and vice versa) and import the jars under Imported Archives and use it the same in Operational Mapper.
To send the request as Json via HTTP Adapter and receive the response as Xml appropriately and acknowledge to SAP ECC via Proxy Adapter.
Stringxml_data="<student><name> Abc</name><age>45</age></student>"; //converting xml to json JSONObject obj=XML.toJSONObject(xml_data); System.out.println(obj.toString()); Thanks and Regards,Rajesh PSYou must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Did you get the chance look in to below blog
http://wiki.sdn.sap.com/wiki/display/XI/REST+Web+Services+in+XI+%28Proof+of+Concept%29
Regards
Pavan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lakshmi,
You can search for the existing and available threads already regards to this same subjected questionnaire which is well elucidate.
https://answers.sap.com/questions/12530463/proxy-to-rest-service-invocation-using-sap-pi.html
https://blogs.sap.com/2017/03/21/synchronous-post-to-external-rest-service-using-sap-po-abap-proxy/
https://blogs.sap.com/2012/03/07/integrating-rest-services-on-pi/
Thanks and Regards - Rajesh PS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rajesh,
Thanks For Sending Links But I am Looking for How to Configure Proxy To JSON Based API in Dual stack SAP Pi 7.0 version .
If you Any Idea About that Send Links or Documents. In PI 7.0 There is no Rest adapter how can i convert to JSON Format. Is there any Alternative method to create Configuration To consume JSON Format.
Thanks,
Lakshminarayana sadhu
Hi!
There is no need to create multiple threads for the same question.
Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
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.