cancel
Showing results for 
Search instead for 
Did you mean: 

XML data into element

silentbull
Participant
0 Kudos

Hello

I am converting the entire xml of orders05 using the function 'Return as XML' and putting it into an external definition element which is of type xml to accept xml tags.

But it is not posting due to the reason that when it converts it converts in form of CDATA.

The external provider mentioned that using SOAPUI it worked only without CDATA.

How do i remove this in PI.

I tried multi mapping by using repace string, but still didn't work.

This is how the output comes from mapping.

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

<ns0:getXMLString xmlns:ns0="http://schemas.wesupplywcfservice.hovis.biz/2015/">

   <ns0:WeSupplyData><![CDATA[<?xml version="1.0" encoding="UTF-8"?><ORDERS05>

   <IDOC BEGIN="">

      <EDI_DC40 SEGMENT="">

         <TABNAM/>

         <MANDT/>

         <DOCNUM/>

Regards

Sam

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member186851
Active Contributor
0 Kudos

Sam,

Your requirement is to have the entire XML in the single node of External definition?

silentbull
Participant
0 Kudos

Yes, and it works with all data fine.

But when i tried to post the external definition via soap to them, it errors out.

And the external vendor investigated and told that the CDATA should not be present.

Former Member
0 Kudos

Hi Sam,

in the mapping, after the source node use trim function from text functions. then pass it to target node. and make the source node as "Return as XML.
try testing it with SOAP and see whether it creates with out  [CDATA .

Regards,

Santhi

silentbull
Participant
0 Kudos

Hello Santhi

I have exactly done the same only.

I have set return as xml and trim option and the target as node.

Only things is the source is an idoc type, but tried using external definition, still the same.

silentbull
Participant
0 Kudos

Hello

I did use like the one you said.

Although cdata is not coming, the payload is full of escape sequence character like &. Due to this again the file validation load was in error.

former_member182412
Active Contributor
0 Kudos

Hi Sam,

Just map ORDERS05(return as XML) to WeSupplyData field in the target.

Regards,

Praveen.