cancel
Showing results for 
Search instead for 
Did you mean: 

Adapter Engine handling for CDATA in XML

Former Member
0 Kudos

Gurus:

I had a question on the Dapter Engines behavious, specifically the SOAP Sender.

The Source is sending something like:

<Data><![CDATA[<?xml version="1.0" encoding="ISO-8859-1" ?><response><forms><form ObjectId="4070" Form_Name="P40 Action"><EMP_NAME>Howard Roark</EMP_NAME><PERNR>P1111111</PERNR><WORKAUTH></WORKAUTH><HR_NAME>Scott Manager</HR_NAME><HR_PNUM>P1234567</HR_PNUM><ESIG>Scott Manager</ESIG><ELECTRONIC_SIGNATURE>Scott Manager (electronically signed)</ELECTRONIC_SIGNATURE><ESIG_VERIFICATION>Scott.Manager [Tue Jun 2 12:03:56 EDT 2009]</ESIG_VERIFICATION><ESIG_DATE>06/02/2009</ESIG_DATE></form></forms></response>]]></Data>

</GetFormXMLResult>

What the Integration Engine sees is the Data elelment with the CDATA section trimmed, i.e., it sees:

<Data> <?xml version="1.0" encoding="ISO-8859-1" ?><response><forms><form ObjectId="4070" Form_Name="P40 Action"><EMP_NAME>Howard Roark</EMP_NAME><PERNR>P1111111</PERNR><WORKAUTH></WORKAUTH><HR_NAME>Scott Manager</HR_NAME><HR_PNUM>P1234567</HR_PNUM><ESIG>Scott Manager</ESIG><ELECTRONIC_SIGNATURE>Scott Manager (electronically signed)</ELECTRONIC_SIGNATURE><ESIG_VERIFICATION>Scott.Manager [Tue Jun 2 12:03:56 EDT 2009]</ESIG_VERIFICATION><ESIG_DATE>06/02/2009</ESIG_DATE></form></forms></response> </Data>

Is this an issue with the Aapter Engine, or has anyone come accross this before? This is on PI7.0 SPS 13.

Thanks

Feroz

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Feroz,

What you see is correct. You dont see CDATA in the adapter log. But when you look at the output you will have all the data in one xml field which is your <DATA>. To test this you need to run the whole scenario and can give a try. Else copy the xml data in a notepad and open it up in alotva and see.

Regards,

---Satish

Former Member
0 Kudos

Thanks Satish,

But the response I was referring to was what I see on the Integration Engine. The CDATA section is not definitly passed on to the integration engine.

-Feroz

Former Member
0 Kudos

Hi,

the CDATA section should not be a problem. It's mostly used to include information / XML in one tag and to include special characters that should not be changed or ignored by the system. All informaiton within a CDATA element is ignored by PI and handled as "blackbox" string. PI just receives it and passes it out without really looking what's inside the tag.

If you want to extract what's inside the CDATA element, you need to use an XSLT in your mapping (see: )

Regards,

Kai

Former Member
0 Kudos

Thanks Kai,

I have already solved the problem of parsing the CDATA section. However, unless I see the XML enclosed by CDATA, the XML is not a valid XML, and consequently, the Integration engine does not accept it.

My problem is:

The CDATA that wraps the XML as a string is being stripped when it comes into the Integration engine.

-Feroz

Former Member
0 Kudos

Okay - so do you use an XSLT step to extract the CDATA within your mapping? If not you may need to do so...

If yes you need to check it - it may be incorrect.

Regards,

Kai

Answers (1)

Answers (1)

Former Member
0 Kudos

Hey

I m not so sure about CDATA specifically but i see the same behaviour in CXML and it seems to work fine without any issues.

Thanks

Aamir