To configure an outbound Web Service Gateway, use the "outbound-gateway" element from the "ws" namespace:
<ws:outbound-gateway id="simpleGateway" request-channel="inputChannel" uri="http://example.org"/>
To set up an inbound Web Service Gateway, use the "inbound-gateway":
<ws:inbound-gateway id="simpleGateway" request-channel="inputChannel"/>
To use Spring OXM Marshallers and/or Unmarshallers, provide bean references. For outbound:
<ws:outbound-gateway id="marshallingGateway" request-channel="requestChannel" uri="http://example.org" marshaller="someMarshaller" unmarshaller="someUnmarshaller"/>
And for inbound:
<ws:inbound-gateway id="marshallingGateway" request-channel="requestChannel" marshaller="someMarshaller" unmarshaller="someUnmarshaller"/>
![]() | Note |
---|---|
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" on the outbound gateways.
|
For either outbound gateway type, the "message-factory" attribute can also be configured with a reference to any
Spring Web Services WebServiceMessageFactory
implementation.
For the simple inbound gateway type, the "extract-payload" attribute can set to false to forward the entire
WebServiceMessage
, instead of just its payload as a Message
to the request channel.