Topic
3 replies Latest Post - ‏2013-12-31T01:34:37Z by ansmyke
ansmyke
ansmyke
55 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
    55 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
      3145 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
        55 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