cancel
Showing results for 
Search instead for 
Did you mean: 

Adapter module to escape forward slash in REST adapter

Former Member
0 Kudos

I have a REST - ECC synchronous scenario.

I am using REST sender adapter. when i sent response messages from PI to websrvice, I am converting the xml message to JSON.

I am also sending a url in the payload. when xml is converted to JSON the forward slashes in my payload are attached with a preceding backword slash.

is there any module to prevent this as it cannot be handled in the mapping

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

This issue was solved by using a second java mapping after the message mapping for response!

I used a java mapping to transform xml to json. I imported the mapping jar and also the json.org jar to themessage mapping namespace and it is working fine without using adapter module

iaki_vila
Active Contributor
0 Kudos

Hi Midhun,

If you have a mapping in your scenario you can omit the escaping there.

Also, there is a feature ( 2083009 - NF: JSON to XML conversion enhancements ) that lets to deal with determinated patterns. I don't know if this can work and i can't try it right now but you can have a look about this feature, it has been thought to deal with invalid XML characters and may be it can't help you.

Regards.

Former Member
0 Kudos

Inaki

I have a request and response mapping.

It's a synchronous scenario. REST adapter uses get method to get inputs from ECC through proxy

The response flow is from ECC  --- PI ---- REST

there is a response mapping in PI. The url is dynamic and I create that in message mapping of response payload

after the mapping the payload is given to the communication channel where the xml to json conversion takjes place. so handling over to cc takes place after mapping and the url get escaped in the communication channel only

not sure how mapping can help