With the XML Schema Validation Policy, the part of the incoming message specified with XPath is validated.

If the part of the incoming message specified with XPath does not conform to the schema, the message is blocked from being sent to the Backend API. Thus, the Backend API is prevented from processing such erroneous or malicious messages, ensuring that it remains stable or does not perform unnecessary operations.

The use of this policy makes sense if the message body from the client is XML.

The picture below shows the policy settings:

The policy fields are shown in the table below.

Field

Description

Description

An optional description of the policy that may be useful for usage and management activities.
XPath

It specifies which part of the request message will undergo the validation process.

A XPath expression is entered as the value. If left blank, it processes the entire message body. The default value is set to retrieve the "body" part of the message body.

Schema

The XML schema is entered. Since the XML Schema may contain another XML schema, if there are schemas that reference each other, they must all be included here.

Test XPath

XPath can be tested with an example XML data.

You can visit the Policies page for the details of the Conditions and Error Message Customization panels.