Web Services Support
Outbound Web Service Gateways To invoke a Web Service upon sending a message to a channel, there are two options - both of which build upon the Spring Web Services project: SimpleWebServiceOutboundGateway and MarshallingWebServiceOutboundGateway. The former will accept either a String or javax.xml.transform.Source as the message payload. The latter provides support for any implementation of the Marshaller and Unmarshaller interfaces. Both require the URI of the Web Service to be called. simpleGateway = new SimpleWebServiceOutboundGateway(uri); marshallingGateway = new MarshallingWebServiceOutboundGateway(uri, marshaller); For more detail on the inner workings, see the Spring Web Services reference guide's chapter covering client access as well as the chapter covering Object/XML mapping.
Web Service Namespace Support To configure an outbound Web Service Gateway, use the "outbound-gateway" element from the "ws" namespace: ]]> To use Spring OXM Marshallers and/or Unmarshallers, provide bean references: ]]> Most Marshaller implementations also implement the Unmarshaller interface. When using such a Marshaller, only the "marshaller" attribute is necessary. Even when using a Marshaller, you may also provide a reference for the "request-callback". For either gateway type, the "message-factory" attribute can also be configured with a reference to any Spring Web Services WebServiceMessageFactory implementation.