cancel
Showing results for 
Search instead for 
Did you mean: 

XML declaration not coming in output using REST adapter

0 Kudos

Hi Experts,

I have Rest to proxy sync scenario, issue i am facing is when PO sends back a response to 3rd party or even when I test it using SOAP UI, the default XML declaration is not going out, which is causing issues as a response is failing on 3rd party as they expect XML declaration which is "<?xml version="1.0" encoding="utf-8"?>".

i have even used XSLT mapping which i can confirm is working as I can see changes in reflected in message monitor payloads, even in payload i can see XML declaration exists but when a message gets delivered to 3rd party/SOAP UI it gets truncated automatically.

Can you please help and let me know if some setting needs to be done on PO server, we are on PO 7.5. I even checked other system all are having the same behavior.

My output is :

<ServiceResponse>

<Record/>

</ServiceResponse>

Expected output is:

<?xml version="1.0" encoding="utf-8"?>

<ServiceResponse>

<Record/>

</ServiceResponse>

0 Kudos

Hello Ankush,

do you already have a solution for your issue?

We just tried to implement it, like Bhaskar mentioned it below, but it doesn't work for us.

Thank you!

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member857993
Discoverer
0 Kudos

Falto esta imagen

former_member857993
Discoverer
0 Kudos

Change the Sender Channel output Message format to Binary or JSON in General

Add Content-Type - text/xml;charset=utf-8 in Result HTTP Header in Sender adapter.

Imagen:

2023-05-26-08-46-52-configuration-integration-buil.png

0 Kudos

Solution to this problem -

Change the Sender Channel output Message format to Binary or JSON in General

Add Content-Type - text/xml;charset=utf-8 in Result HTTP Header in Sender adapter.

former_member306381
Participant
0 Kudos

Hi Ankush,

Have you tried to use the Adapter module in your reciever channel?

i guess you can give a try like below,

In your channel Proxy Channel use the MessageTransformBean module.

Module name: AF_Modules/MessageTransformBean

Parameter: Transform.ContentType

Value: text/xml;charset=utf-8

Regards,

Bhaskar.