Layer7 API Management

Expand all | Collapse all

How to handle special or junk characters

Jump to Best Answer
  • 1.  How to handle special or junk characters

    Posted 07-03-2017 03:17 AM

    Hi All,

     

    I was tried to check on assertions , how to restrict special characters or junk characters in xml body element by using layer 7 assertion in rest service.

    Do we have any assertion in ca layer 7 to restrict below special characters in xml body.

    <author>

    <name>维护工作的 согласования é</name>

    <text>notebook</text>

    </author>

     

    Thanks,

    Suneel



  • 2.  Re: How to handle special or junk characters
    Best Answer

    Posted 07-04-2017 08:17 PM

    Hello Suneel,

    Commonly, you need to generate a xml schema file (.xsd), to restrict the value of an element, (for example, XML Schema Restrictions/Facets ) and then you can use Validate xml schema assertion (Validate XML Schema Assertion (Message Validation/Transformation) - CA API Gateway - 9.2 - CA Technologies Documentation )

     

    Alternately, you can use Evaluate regular expression assertion to scan the request (Evaluate Regular Expression Assertion - CA API Gateway - 9.2 - CA Technologies Documentation )

     

    Regards,

    Mark