cancel
Showing results for 
Search instead for 
Did you mean: 

Proxy To JSON Structure synchronous in 7.0

0 Kudos

Lakshminarayana Sadhu

Proxy To JSON Format Synchronous Communication

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

Accepted Solutions (0)

Answers (5)

Answers (5)

former_member190293
Active Contributor

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.

ajeyagv
Participant
0 Kudos

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

former_member607993
Contributor
0 Kudos

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.

https://mvnrepository.com/artifact/org.json/json

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 PS
PavanKumar
Active Contributor
0 Kudos

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

0 Kudos

Hi Pavan,

Above Blog Supports for REST For Websrvices Not for REST Adapter For JSON API Integration Format in SAP PI 7.0 Version . .

Please Any One has Any Idea Related To This Please Send link .

former_member607993
Contributor
0 Kudos

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

0 Kudos

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

former_member190293
Active Contributor
0 Kudos

Hi!

There is no need to create multiple threads for the same question.

Regards, Evgeniy.