cancel
Showing results for 
Search instead for 
Did you mean: 

XML Character Escaping Issue

Former Member
0 Kudos

Hello all,

At my current project we are interfacing between SAP and PeopleSoft.

The target system peoplesoft expects an xml exactly formed as follows.

So within the CDATA area "<" and ">" are expected. NOT "&lt ;" and "&gt ;" AND NOT "&#60 ;" and "&#62 ;"

<?xml version="1.0"?>

<IBRequest>

<ContentSections>

<ContentSection>

<Data>

<![CDATA <?xml version="1.0"?><SNS_UPDATE_DEB><MsgData><Transaction>

<EXTERNAL_SYSTEM class="R"><EMPLID IsChanged="Y">500000005</EMPLID>

<EFFDT IsChanged="Y">2008-01-22</EFFDT><EXTERNAL_SYSTEM_ID>SAP99003</EXTERNAL_SYSTEM_ID>

</EXTERNAL_SYSTEM></Transaction></MsgData></SNS_UPDATE_DEB>]>

</Data>

</ContentSection>

</ContentSections>

</IBRequest>

However the sending system does send the "<" and ">" within the CDATA are in 'escaped mode'.

Like below.

<?xml version="1.0"?>

<IBRequest>

<ContentSections>

<ContentSection>

<Data>

<!CDATA &lt ;SNS_UPDATE_DEB&gt ;&lt ;MsgData&gt ;&lt ;Transaction&gt ;>

</Data>

</ContentSection>

</ContentSections>

</IBRequest>

Trying an XSLT with: disable-output-escaping="yes" gave no results. Furthermore a UDF with a FindAndReplace function also doesn't work.

Does anyone have an idea how to fix this problem?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello,

Can you paste your XSLT code here?

BR,

Diptee

Former Member
0 Kudos

Hi Ramon,

I assume that the UDF is no help because XI escapes the XML after it's passed through the mapping again. Have you tried a Module in the adapter engine that reverts the escaping right at the end of processing? This at least should make sure that no further modifications are done by anybody afterwards.

On the other hand, this is technically more challenging and a bit harder to monitor.

What adapter are you using to commnunicate with your target system?

regards,

Peter

Former Member
0 Kudos

Hi Peter,

I am using the Plain HTTP adapter.

However i don't have any experience in building adapter modules.

Kind regards,

Ramon Boekel

Former Member
0 Kudos

Hi Ramon, what was your solution, did you try XSLT?