Layer7 API Management

 View Only

Expand all | Collapse all

Json Document Structure Assertion Misinterpreting Content As Xml

  • 1.  Json Document Structure Assertion Misinterpreting Content As Xml

    Posted May 14, 2025 04:55 AM

    Hey everyone!

    I encountered a weird issue with the Layer 7 Gateway where the JSON Document Structure assertion is unexpectedly treating my JSON input as XML. Here's the situation:

    • The request comes in with the Content-Type set to application/json and the content type validation passes successfully.
    • But right after that, the JSON Document Structure assertion throws the error:
      Unable to get request XML: Unable to read stream: the specified maximum data size limit would be exceeded
    • It also flags a JSON document structure threat detected error.

    Anyone else faced this issue? Any insights on why this is happening and how to resolve it? Thanks in advance! 😊



    ------------------------------
    Balaji
    ------------------------------


  • 2.  RE: Json Document Structure Assertion Misinterpreting Content As Xml

    Broadcom Employee
    Posted May 16, 2025 02:00 AM

    @Balaji Prasanth S

    • Unable to get request XML: Unable to read stream: the specified maximum data size limit would be exceeded

    I guess, error text might be misleading. It is just calling out the threat in the view of size of the document. Above error is not from the JSON Document Structure assertion. Message size restrictions are enforced via cluster properties or through Limit Message Size assertion.

    Thanks.