API Connect

API Connect

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
  • 1.  Arabic characters don't appear in APIC

    Posted 27 days ago

    i have an issue that Arabic characters don't appear in APIC knowing that it appears in the output of the last map policy response output but not appear at far end as below,

    but it doesn't appear at far end and not parsed successfully , as below 

    knowing that i faced this problem before and passed it by removing parse policy now i removed it and the problem persists, the yaml consumes and produces are as below 

    produces:
      - application/xml ;charset=utf-8
      - application/xml
      - application/json ;charset=utf-8
    consumes:
      - application/xml ;charset=utf-8
      - application/xml
      - application/json ;charset=utf-8


    ------------------------------
    Ahmed Elaimy
    ------------------------------


  • 2.  RE: Arabic characters don't appear in APIC

    Posted 23 days ago

    any support please ..



    ------------------------------
    Ahmed Elaimy
    ------------------------------



  • 3.  RE: Arabic characters don't appear in APIC

    Posted 22 days ago

    Hi Ahmed,

    Just to confirm - does your API request include the Content-Type header with application/json; charset=utf-8? This ensures proper handling of non-ASCII characters like Arabic in the payload.

    Can you let me know the versions of IBM API Connect and DataPower Gateway that you are currently using in your environment?



    ------------------------------
    Nirmalan
    ------------------------------



  • 4.  RE: Arabic characters don't appear in APIC

    Posted 21 days ago

    Hi Nirmalan,

               IBM API Connect ver : ibm-apiconnect.v5.2.0

               DataPower Gateway:datapower-operator.v1.11.6



    ------------------------------
    Ahmed Elaimy
    ------------------------------



  • 5.  RE: Arabic characters don't appear in APIC

    Posted 20 days ago

    Those are operator versions and so don't matter, what matters is the operand versions - what you deployed using those operators. Please find the APIC and DP versions you are using.



    ------------------------------
    Chris Dudley
    ------------------------------



  • 6.  RE: Arabic characters don't appear in APIC

    Posted 22 days ago

    Hi Ahmed,

    This has been a consistent question for some time that may have been addressed in an earlier forum post.  For XML that is parsed in message.body, the serialization to an XML string of message.body at the end of the assembly does NOT do minimal output escaping, thus your Arabic characters are being escaped as you note.  There is not a mechanism to do this automatically in the assembly and an automated mechanism would require a request for enhancement.  However, you can easily accomplish this with a GatewayScript policy at the end of your assembly that does the following.

    let xmlDOM = context.get('message.body');
    let xmlString = XML.stringify({omitXmlDeclaration: true, escaping: "minimal"}, xmlDOM);
    session.output.write(xmlString);

    See https://www.ibm.com/docs/en/datapower-gateway/10.0.1?topic=apis-xmlstringify

    Best Regards,
    Steve Linn



    ------------------------------
    Steve Linn
    Senior Consulting I/T Specialist
    IBM Retired
    ------------------------------