Topic
8 replies Latest Post - ‏2015-03-02T05:46:50Z by NILAY97
ansmyke
ansmyke
77 Posts
ACCEPTED ANSWER

Pinned topic Spanish characters from broker response fails to parse in Datapower

‏2013-12-29T22:33:53Z |

Hi Developers,

The issue is  the backend broker response contains some Spanish character  which fails in datapower  if response  type is selected as SOAP orXML. We changed the CodedCharSetId in broker from 819 to 1208 to prevent the processing exception in  broker which went well as planned.

When response type on DP is selected as non XML the header of  broker response message can be seen in DP probe.

broker is sending the soap response message with  <Encoding>546</Encoding><CodedCharSetId>1208</CodedCharSetId>

but datapower receives and replaces it with <Encoding>546</Encoding><CodedCharSetId>819</CodedCharSetId>.

 

With XML /SOAP response type on ws-proxy the message fails in DP on response rule.The error message we are getting in DP is;

illegal character 'N' at offset 1148 of WS-Proxy

Parse error

 

Example of spanish character from response message;

SEGÚN INDICACIÓN 

 

I have followed the technote;

http://www-01.ibm.com/support/docview.wss?uid=swg21409699 and tried the below code in response but got the same failure results;

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:dp="http://www.datapower.com/extensions"
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:dpconfig="http://www.datapower.com/param/config"
extension-element-prefixes="dp"
exclude-result-prefixes="dp dpconfig">
<xsl:output  encoding="ISO-8859-1"  version="1.0" method="xml"/>
<xsl:template match="/">
<xsl:copy-of select="." />
</xsl:template>
</xsl:stylesheet>

 

Thanks,

Mayank

  • ansmyke
    ansmyke
    77 Posts
    ACCEPTED ANSWER

    Re: Spanish characters from broker response fails to parse in Datapower

    ‏2013-12-29T22:37:39Z  in response to ansmyke

    For more clarification;

    The transaction type is  MQ request-response. The encoding and CodeCharSetId are set by  broker in MQMD header.

    • HermannSW
      HermannSW
      4230 Posts
      ACCEPTED ANSWER

      Re: Spanish characters from broker response fails to parse in Datapower

      ‏2013-12-30T18:52:26Z  in response to ansmyke

      Hi,

      it seems that DataPower cannot parse the backend response.

      Typical reason for this is response being broken XML (XML without xml declaration has default encoding UTF-8, so sending XML without an xml declaration in any encoding other than UTF-8 is likely to result in parse errors).

      Best is if you fix your backend to not send Non-XML response.
      If that is not possible, then slide 6 of this WSTE webcast shows how DataPower can deal with that:
      http://www-01.ibm.com/support/docview.wss?uid=swg27019119


      Hermann<myXsltBlog/> <myXsltTweets/> <myCE/> <myFrameless/>

       

      • ansmyke
        ansmyke
        77 Posts
        ACCEPTED ANSWER

        Re: Spanish characters from broker response fails to parse in Datapower

        ‏2013-12-31T01:34:37Z  in response to HermannSW

        Hi ,

         

        Thanks for your input. I found a setting in DP which was messing with the Broker set  CodedCharSetId(CCSI). By default DP overwrites  CCSI value sent by backend by 819 this was causing the Spanish characters to be transformed into some symbols which was causing Parse error in datapower. I  turned off the particular setting under CCSI  option in QM and it is  passing through successfully now .

         

        Mayank

        • MNM_Feb2015
          MNM_Feb2015
          2 Posts
          ACCEPTED ANSWER

          Re: Spanish characters from broker response fails to parse in Datapower

          ‏2015-02-25T13:46:40Z  in response to ansmyke

          Hi Mayank,

          What change you made in QM under CCSI ? This change is in MQ QM or DP QM object ?

          Hermann,

          You can also help me on this.

           

          Thanks,

          MNM

          • NILAY97
            NILAY97
            173 Posts
            ACCEPTED ANSWER

            Re: Spanish characters from broker response fails to parse in Datapower

            ‏2015-02-26T10:41:36Z  in response to MNM_Feb2015

            The change Mayank made was in the Queue Manager object within DataPower. There is a tab called CCSI under QM in which a text box dentoes the value of CCSID.

            I guess that's where a change was made from 819 to 1208. By default when creating MQ Queue Manager Objects on DataPower, the CCSID in DataPower MQ OM object settings defaults to value '819'.

            Thanks,

            Nilay

            • cbaja
              cbaja
              35 Posts
              ACCEPTED ANSWER

              Re: Spanish characters from broker response fails to parse in Datapower

              ‏2015-02-27T09:30:58Z  in response to NILAY97

              Hi Nilay,

              Can you please let me know how to achieve the desired output if I intend to handle the character via my xslt. Also my backend service is over HTTP.

              Thanks.

              • NILAY97
                NILAY97
                173 Posts
                ACCEPTED ANSWER

                Re: Spanish characters from broker response fails to parse in Datapower

                ‏2015-03-02T05:46:50Z  in response to cbaja

                Cbaja,

                What is the desired output you want to achieve? What error do you get when you run your xform?

                Thanks,

                Nilay

            • MNM_Feb2015
              MNM_Feb2015
              2 Posts
              ACCEPTED ANSWER

              Re: Spanish characters from broker response fails to parse in Datapower

              ‏2015-02-28T07:10:33Z  in response to NILAY97

              It worked for me... Thanks Nilay.