on 08-10-2017 2:59 PM
Hi Experts,
I have a scenario where I have to send a JSON message from PI to 3rd party system.
But the JSON message appears very different to me.
I am unaware how to fit this type JSON structure.
XML structure:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Payment_Order_SubmissionRequest xmlns:ns0="http://booking.com/Payments/Payoneer">
<mname>PerformPayoutPayment</mname>
<auth>
<p1>TEST</p1>
<p2>TEST1</p2>
</auth>
<PaymentDetails>
<p3>ABC</p3>
<p4>a1234</p4>
<p5>XYZ</p5>
<p6>a</p6>
<p7>234</p7>
<p8>TEST2</p8>
<p9/>
<p11>34</p11>
<Currency>EUR</Currency>
</PaymentDetails>
</ns0:Payment_Order_SubmissionRequest>
JASON Structure:
'mname=PerformPayoutPayment&p1=TEST&p2=TEST1&p3=ABC&p4=a1234&p5=XYZ&p6=a&p7=234&p8=TEST2&p11=34&Currency=EUR'
can anyone please help me!
Not sure if I can write JAVA mapping or can be adjusted in REST receiver adapter.
Best Regards,
Aarti
Hello Aarti,
The XML structure in your question is not valid, so this is the first what you have to revise.
Regarding the XML -> JSON conversion, I strongly recommend to revise these blogs:
https://blogs.sap.com/2016/01/13/rest-adapter-in-sap-pipo-enhanced-xmljson-conversion/
https://blogs.sap.com/2015/03/18/jsontransformbean-part-2-converting-xml-to-json-content/
I believe these will be helpful.
Best regards,
Vadym
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raghu,
Using POST method.
Regards,
Aarti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think here XML values are appended in REST URL.Are you going to use get method?
Check if the below link helps
https://blogs.sap.com/2014/12/18/pi-rest-adapter-consuming-synchronous-restful-service/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.