Consultor Eletrônico



Kbase P148153: The CDATA section is parsed by the OpenEdge client before sending the SOAP Request
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   7/17/2009
Status: Unverified

SYMPTOM(s):

The CDATA section is parsed by the OpenEdge client before sending the SOAP Request

The CDATA markup is stripped from the SOAP Request

The OpenEdge client replaces the CDATA section with the escaped content

FACT(s) (Environment):

OpenEdge 10.1x
All Supported Operating Systems

CAUSE:

This is expected behavior. Complex XML values are parsed and reserialized by the OpenEdge Web Service client. This is done to facilitate the embedding of the XML value within the SOAP message.

FIX:

With the current design there is no way to force a CDATA section into a SOAP message. A CDATA section represents character data, so if you put an XML into a CDATA section the content will be escaped, thus making it character data (string). The following CDATA section:

<![CDATA[<sender>John Smith</sender>]]>

Would be interpreted in the same way as the following:

&lt;sender&gt;John Smith&lt;/sender&gt;

This is also what the OpenEdge client sends to the Web Service in case there was XML content in the CDATA section. This shouldn't cause any issues for the Web Service since it's a valid XML string. It would have been a bug if the OpenEdge client was stripping away the CDATA section and not escaping the content, thus sending the following instead:

<sender>John Smith</sender>

This would definitely cause an issue for the Web Service since you are sending an XML document instead of an XML string. Also there's no way to declare that a CDATA section is required in an XML Schema or in a DTD, so strictly speaking the OpenEdge client is following the standards here.