cancel
Showing results for 
Search instead for 
Did you mean: 

Read the payload which is coming in one of the fields from the source

Former Member
0 Kudos

Hi

I have a requirement like I need to read the payload which is coming in one of the fields from the source and return that payload.

For Example I have the source xml as below

<root node>

  <field1>

  <field2>

  <field3>

<root node>

Now I am getting the payload from field 3, which I need to reed it and mat it to target structure accordingly.

I think this can be done by using java mapping. Can anybody please provide the java code to read that payload from field 3 and return that payload as an output to java mapping so that I can use that output of java mapping to input of actual mapping.

Any inputs are highly appreciated.

Regards,

Raju.

Accepted Solutions (1)

Accepted Solutions (1)

iaki_vila
Active Contributor
0 Kudos

Hi Raju,

You can do it with java development or with XSLT. Check this examples:

Amit example in this thread with XSL:

With java:

Regards.

Answers (2)

Answers (2)

anupam_ghosh2
Active Contributor
0 Kudos

Hi Raju,

              Need a sample input/output to answer your question.

Regards

Anupam

bhavesh_kantilal
Active Contributor
0 Kudos

Do you have a sample on how the Input XML looks like?

Would the standard function Return As XML not to what you require? Check this blog for a example and how to use the same -

SAP PI 7.1 Mapping Enhancements Series: Copy XML Subtree

Regards,

Bhavesh