Enforcing adherence to WSDL bindings in JAX-WS web services
Java™ API for XML-Based Web Services (JAX-WS) Version 2.1 introduced the concept of features as a way to programmatically control specific functions and behaviors. The RespectBindingFeature is one of the supported standard features. You can use the RespectBindingFeature to control whether a JAX-WS implementation is required to respect the contents of a Web Services Description Language (WSDL) binding that is associated with an endpoint.
About this task
While WSDL documents are often used during the development process, the actual enforcement of the use of the WSDL document specifications, when they are provided, at run time has not been well defined in versions of the JAX-WS specification previous to Version 2.1. The JAX-WS Version 2.1 specification added the feature, RespectBindingFeature, to clarify the impact of the wsdl:binding in a JAX-WS runtime environment.
Enabling the feature, RespectBindingFeature, causes the JAX-WS runtime environment to inspect the wsdl:binding for an endpoint at run time to ensure that the binding of service endpoint interface (SEI) parameters and return values is respected. Additionally, this feature ensures that all required wsdl:binding extensions are either understood and used by the runtime environment, or the extensions have been explicitly disabled by the application. Your JAX-WS application can disable a specific wsdl:binding extension that has a defined WebServiceFeature interface by using the appropriate annotation that is associated with that feature, using an API that accepts the javax.xml.ws.WebServiceFeature interface, or configuring the deployment descriptors.
When the RespectBindingFeature feature is not enabled, which is the default, the runtime environment can choose whether any part of the wsdl:binding is enforced.
Procedure
Results
By implementing the feature, RespectBindingFeature, you have specified to enforce adherence of the contents of a WSDL binding that is associated with an endpoint for your JAX-WS application.