DataPower

DataPower

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

In production environment we're seeing parsing errors from 1 MPGW. In the MPGW, we have URL-Open call to backend from where we expect XML data. But in 1 of the XML field there is Latin character coming- "ö"

  • 1.  In production environment we're seeing parsing errors from 1 MPGW. In the MPGW, we have URL-Open call to backend from where we expect XML data. But in 1 of the XML field there is Latin character coming- "ö"

    Posted Wed September 21, 2022 09:52 AM
    Hi Team,

    Problem: In production environment we're seeing parsing errors from 1 MPGW.
    In the MPGW, we have URL-Open call to backend from where we expect XML data.
    But in 1 of the XML field there is Latin character coming- "ö"

    XML field which is causing parsing issue is-
    <DESCRIPTION>Mövenpick</DESCRIPTION>

    Error log:
    1:03:45 PM xmlparse error 520742565 request x.x.x.x 0x80e003aa mpgw (MPG-XXX-XXX-SERVICE): illegal character 'v' at offset 2904 of dpmq://XXXDATAQM/?RequestQueue=XXX.OUT_QUEUE;ReplyQueue=XXX.IN_QUEUE;SetReplyTo=true;TimeOut=90000

    Below is the URL-Open call in xslt-
    <dp:url-open target="{$mqURL}" response="xml" http-headers="$Requestmqmdheader" >
    <xsl:copy-of select="$InputMsg"/>
    </dp:url-open>

    Kindly advise on this issue as we need to put a fix in MPGW to accept
    latin characters in the XML response from backend.

    Let me know if you any further information from my end.

    ------------------------------
    Sudheer Puvvada
    ------------------------------


  • 2.  RE: In production environment we're seeing parsing errors from 1 MPGW. In the MPGW, we have URL-Open call to backend from where we expect XML data. But in 1 of the XML field there is Latin character coming- "ö"

    Posted Wed September 21, 2022 12:08 PM
    What is in the "$Requestmqmdheader" value?

    That is, have you included an "Accept-Charset" header?


    ------------------------------
    Joseph Morgan
    ------------------------------



  • 3.  RE: In production environment we're seeing parsing errors from 1 MPGW. In the MPGW, we have URL-Open call to backend from where we expect XML data. But in 1 of the XML field there is Latin character coming- "ö"

    Posted Thu September 22, 2022 02:03 AM
    Hi Joseph,

    Below are the MQMD headers passing in the MQ Request

    <MQMD>

    <Version>2</Version>
    <MsgId>xxxxx<MsgId>
    <CodedCharSetId>819</CodedCharSetId>
    <Format>MQSTR</Format>
    <MsgType>70002</MsgType>
    <Expiry>-1</Expiry>
    <ReplyToQ>xxxx</ReplyToQ>
    <ReplyToQmgr>xxxx</ReplyToQmgr>

    </MQMD>

    ------------------------------
    Sudheer Puvvada
    ------------------------------



  • 4.  RE: In production environment we're seeing parsing errors from 1 MPGW. In the MPGW, we have URL-Open call to backend from where we expect XML data. But in 1 of the XML field there is Latin character coming- "ö"

    Posted Thu September 22, 2022 07:05 AM
    Hi since this is MQ i don't think the accept-encoding would change things.
    By default datapower assumes xml to be utf8; but that can change based on the xml dclaration in the document.
    Is the data uft8?
    can you attach the full xml & raw binary so we can determine if the ö is encoded correctly ?

    ------------------------------
    Matthias Siebler
    MA
    ------------------------------



  • 5.  RE: In production environment we're seeing parsing errors from 1 MPGW. In the MPGW, we have URL-Open call to backend from where we expect XML data. But in 1 of the XML field there is Latin character coming- "ö"

    Posted Thu September 22, 2022 07:06 AM
    You might need to take a pcap for the url-open to see exactly what is returned (probe will not work as it may also parse the data)

    ------------------------------
    Matthias Siebler
    MA
    ------------------------------



  • 6.  RE: In production environment we're seeing parsing errors from 1 MPGW. In the MPGW, we have URL-Open call to backend from where we expect XML data. But in 1 of the XML field there is Latin character coming- "ö"

    Posted Sun October 16, 2022 11:25 AM
    RESOLVED

    changing the CodedCharSetId to 1208 has fixed the issue.
    Thanks all for your inputs.


    ------------------------------
    Sudheer Puvvada
    ------------------------------



  • 7.  RE: In production environment we're seeing parsing errors from 1 MPGW. In the MPGW, we have URL-Open call to backend from where we expect XML data. But in 1 of the XML field there is Latin character coming- "ö"

    Posted Wed October 19, 2022 05:10 AM

    > <CodedCharSetId>819</CodedCharSetId>

    >

    > changing the CodedCharSetId to 1208 has fixed the issue.

    >

    That makes sense since you seem to get UTF-8 encoded data.

    1208 is UTF-8 with 2-byte encoding of 'ö' (0xC3 0xB6) :

    https://www.sql-und-xml.de/unicode-database/latin-1-supplement.html

    819 is ISO8859-1 with 1-byte encoding of 'ö' (0xF6):

    https://en.wikipedia.org/wiki/ISO/IEC_8859-1#Code_page_layout



    ------------------------------
    Hermann Stamm-Wilbrandt
    Compiler Level 3 support & Fixpack team lead
    IBM DataPower Gateways (⬚ᵈᵃᵗᵃ / ⣏⠆⡮⡆⢹⠁⡮⡆⡯⠂⢎⠆⡧⡇⣟⡃⡿⡃)
    https://stamm-wilbrandt.de/en/blog/
    ------------------------------