WSDL Schema Validation Policy - 8.0

Talend ESB Infrastructure Services Configuration Guide

Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
Talend ESB
Talend Runtime
Design and Development
Installation and Upgrade
Last publication date

From Talend ESB, you can use policies in the Service Registry to validate WSDL schemas. This validation will be performed using the service schema defined in the WSDL.

Talend ESB provides a template policy called wspolicy_schema_validation.policy and available in the /add-ons/registry/policies folder of the Talend ESB product. This default policy for schema validation is as follows:

<wsp:Policy xmlns:wsp="" Name="wspolicy_schema_validation">
            <tpa:SchemaValidation xmlns:tpa="" type="WSDLSchema" appliesTo="provider" message="request"/>


  • type - WSDLSchema (if not specified, assumed as WSDLSchema),

  • appliesTo - consumer/provider/always/none,

  • message - request/response/all/none.

To enable WSDL Schema Validation via policy:

  1. Make sure the Talend Runtime is running, and the Service Registry service has been started. For more information, see Service Ristry.

  2. Import the WDSL schema validation policy to use, either directly from the Talend Runtime. For more information, see Using the Service Registry with Talend ESB or via the Talend Administration Center, for more information, see Managing policies.

    This wspolicy_schema_validation.policy policy is by default applicable for provider's request, but you can modify it according to your need. For more information about the customization or creation of your own validation policy, refer to the Custom Schema Validation Policy.

  3. Assign the policy to the service you want to validate the schema of.

This way, if the WSDL of the service is using a specific restriction in its xsd:schema, for example:
<xsd:restriction base="xsd:string">
  <xsd:minLength value="20"></xsd:minLength>
  <xsd:maxLength value="30"></xsd:maxLength>

If this restriction is defined in the <xsd:element> of the request, then it will be used to validate the request message on the consumer, provider (or both) side. If this restriction is defined in the <xsd:element> of the response, then it will be used to validate the response message on the consumer, provider, or always.

In case the restriction is defined in the <xsd:element> of the request but you set your schema validation on the response element (the message="response" parameter in the schema validation policy), then the validation will not be taken into account.

In case the restriction is taken into account, the validity of the consumer, provider or both, request or response messages sent to the service will be checked at runtime when they will be deployed into the Talend Runtime Container. For example, if you send an invalid request to the service, for example a message of less than 20 characters, you will get a Fault response with validation failed information.