Consultor Eletrônico



Kbase P42324: XML predefined entities passed as content are being translat
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   17/02/2004
Status: Unverified

FACT(s) (Environment):

Progress 9.1D

FACT(s) (Environment):

SonicMQ 5.0

SYMPTOM(s):

Publishing an XML message to a topic in UTF-8 Format, passing markers as content.

Published XML string <content> &gt; &lt; &amp; &quot; &apos; </content>

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

"&lt;" is not replaced, "&amp;" is not replaced, "&quot;" is not replaced.

RUN createXMLMessage IN pubsubsession (OUTPUT mesgH).

"&gt;" is replaced by ">" and "&apos;" is replaced by '.

XML markup characters are being translated.

Predefined entities are being translated.

CAUSE:

The 4GL client's code-page, (ISO8859) is different than the code-page of the XML document, (UTF-8).

FIX:

If the 4GL client cannot be started up with -cpinternal UTF-8, but still wants to use 4GL-JMS to pass that UTF-8 document, it can use a BytesMessage or bytes elements in a StreamMessage. When sent as bytes, the XML data will get to the receiver uninterpreted and unconverted. Example12.p and example13.p demonstrate producing and consuming a BytesMessage containing an XML document.

References to Written Documentation:

Progress External Program Interfaces Guide, section 14.6.1 Publishing, Subscribing, and Receiving an XML Document In a BytesMessage.