cancel
Showing results for 
Search instead for 
Did you mean: 

Add string to XML Message - HTTP Post

robert_warde4
Active Participant
0 Kudos

Hi experts,

I have a requirement to modify a XML payload and add a test string to the start. The usual XML payload is below

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

<Request version="1.0">

<Verification>123</Verification>

</Request>

What I want to do is add a test string to the start of the XML payload as shown below.

load=<?xml version="1.0" encoding="UTF-8"?>

<Request version="1.0">

<Verification>123</Verification>

</Request>

Does anyone have any ideas how this can be done?

Accepted Solutions (0)

Answers (3)

Answers (3)

robert_warde4
Active Participant
0 Kudos

FYI - We are using PI 7.3. I can see the prolog on a 7.11 HTTP adapter but not on the 7.31 Adapter

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Robert,

We do not have PI 7.3 at the moment, but the prolog I was referring to is the one you see on the 7.11 adapter. As far as I know, you can still use the 7.11 adapter metadata even if you have 7.3.

Regards,

Mark

robert_warde4
Active Participant
0 Kudos

Hi MArk,

I checked and we can't, as the adapter is on the Java stack it only supports the latest meta data. I will investigate further

markangelo_dihiansan
Active Contributor
0 Kudos

Upon checking the documentation, it seems this can be achieved by checking the Set Form option in the channel.

Can you try &load= and load= as your entry in the MainPayload Parameter Name?

Regards,

Mark

markangelo_dihiansan
Active Contributor
0 Kudos

Hi,


load=<?xml version="1.0" encoding="UTF-8"?>

<Request version="1.0">

<Verification>123</Verification>

</Request>

Does anyone have any ideas how this can be done?

Yes, this can be done. If your communication channel is:

a.) Plain HTTP Adapter - you can add this in the communication channel via the prolog section. Value is load=

b.) SOAP Adapter - Do Not Use SOAP Envelope needs to be checked and the load= has to be added via Java mapping.

Hope this helps,

Mark

robert_warde4
Active Participant
0 Kudos

Hi Mark,

We are using the HTTP adapter. When you say the 'prolog section' what do you actually mean?

Thanks

Rob

vishal1889
Active Participant
0 Kudos

Hi Robert,

Can you provide more details about underlying requirement for addition of this test string to the payload? This will help in providing the feasible solution.

Regards

VJ

robert_warde4
Active Participant
0 Kudos

The vendor we are working with required a parameter to be added to the inbound XML payload. We are stuck with this requirement.

former_member472138
Active Contributor
0 Kudos

Robert,

This might help you to address the requirement.

Regards

Pothana