Activating JAXB Validation of SOAP requests and responses - 8.0

Talend ESB Service Developer Guide

Version
8.0
Language
English
Product
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
Module
Talend ESB
Talend Runtime
Content
Design and Development
Installation and Upgrade
Last publication date
2023-11-06

For the client side

<jaxws:client name="{http://apache.org/hello_world_soap_http}SoapPort"
   createdFromAPI="true">
   <jaxws:properties>
      <entry key="schema-validation-enabled" value="true" />
   </jaxws:properties>
</jaxws:client>

You may also do this programmatically:

((BindingProvider)port).getRequestContext().put(
   "schema-validation-enabled", "true");

For the server side

<jaxws:endpoint name="{http://apache.org/hello_world_soap_http}SoapPort"
   wsdlLocation="wsdl/hello_world.wsdl" createdFromAPI="true">
   <jaxws:properties>
      <entry key="schema-validation-enabled" value="true" />
   </jaxws:properties>
</jaxws:endpoint>

You can also use the org.apache.cxf.annotations.SchemaValidation annotation.