Spring payloadvalidatinginterceptor schemas

NOTE: As of 0.2.3 the Spring WS plugin does not come packaged with the Functional Test plugin.

spring payloadvalidatinginterceptor schemas-18spring payloadvalidatinginterceptor schemas-75

First, the name of the endpoint is important when it comes to which XML document payloads will be routed to this endpoint.

The Holiday endpoint will, by default, be invoked for incoming service invocations that contain an element called 'Holiday Request' as the root element in the payload.

Secondly, the static namespace property is used to classify the root payload element, so this endpoint will respond to 'Holiday Request' elements in the root of the incoming document payload, as long as it is in the specified namespace as indicated by the URI in the namespace property.

Inspired by the Spring Web Services project (see Spring WS), the Spring Web Services (WS) plugin support the provision and consumption of best practice, contract-first web services in your Grails applications.

For more on why contract-first web services are considered a best practice, see in why contract first .

Unfortunately, contract first web services have a, largely undeserved, reputation for being a touch tricky to implement, however this plugin intends to make it as easy as possible to employ these best practices.On the service provision side, a first-class endpoint artefact is introduced including functional tests for endpoints.When consuming services, a Web Service Template is provided, in much the same vein as the Spring Web Service Template, that integrates more naturally with the rest of your Groovy code.The plugin contains all of the Spring WS libraries it requires.In addition, the Spring WS plugin also has a dependency on the 'functional-test' plugin when conducting web service functional tests, and the Spring Security Grails plugin if you want to use that option for securing your endpoints.The second step, after you've actually defined your contract in XML, is to create an endpoint that will respond to service invocations as defined in that contract.

Tags: , ,