cancel
Showing results for 
Search instead for 
Did you mean: 

Convert XML to JSON format

Former Member
0 Kudos

Hi all,

I need to do a POC on converting XML format to JSON format,i found that there is rest adapter which we can achieve this  ,

but i couldn't find the adapter in the list of adapters ,how to download this adapter from sap market place and also is there any alternative way of achieving this.


Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Vidya Sagar,

REST Adapter is not available for free like SOAP, FTP, SFTP etc Adapters. You need to purchase it from third party vendors like Advantco. You can visit the link below for more information:

REST Adapter for SAP NW PI | Advantco SAP NetWeaver Solutions

https://www.advantco.com/misc/Gateway%20or%20Progress%20Integration.pdf

Alternate way to convert XML to JSON and viceversa is use of open source technology - Apache Camel. You can download the Apache Camel from the link below:

Apache Camel: Camel 2.13.2 Release

Also you can refer to tutorials and examples available on the site - Apache Camel: Tutorials for the implementation.

Regards,

Shreyansh Shah

Former Member
0 Kudos

hi Shah,

So thankful for the reply,but how can we achieve this using Rest adapter ,i am not able to find

any sample scenarios for the requirement ,please help me on this.

Former Member
0 Kudos

Hi Vidya Sagar,

I guess your question is how to achieve this WITHOUT using Rest Adapter (Rest adapter already has XML to/from JSON conversion capability).

You can use SOAP/HTTP Adapter if your requirement is full-fledged Rest implementation. Once XML is received with SOAP/HTTP Adapter, you can use Java Mapping with Apache Camel APIs to achieve conversion between XML and JSON.

Some samples are available here:

Regards,

Shreyansh Shah

Former Member
0 Kudos

Hi Shah,

Is it possible to built a custom adapter for the specific requirement from XML to JSON format.

instead of using Rest adapter ,pls provide your inputs on this .

Answers (2)

Answers (2)

0 Kudos

From where we can get Advantco REST adapterguide

stefan_bosshard2
Explorer
0 Kudos

Hi Vidya Sagar,

now REST Adapter is available with newest SAP PI version.

For example with 7.31 SP16

Regards

Stefan