Browse files

adding 'rest' qualifier to avoid collision with soap gateway

  • Loading branch information...
1 parent f19d8f7 commit 2b03a0cc7620e7dd5b880e8acba0ade5638da894 @markfisher markfisher committed Sep 11, 2012
View
15 siia-examples-parent/webapp/src/main/resources/trips-applicationContext.xml
@@ -8,11 +8,24 @@
http://www.springframework.org/schema/integration/spring-integration.xsd">
<si:channel id="tripQuoteRequestsChannel"/>
- <si:channel id="tripQuoteResponseChannel" />
+ <si:channel id="tripQuoteResponseChannel"/>
<bean id="tripQuoteProcessor" class="com.manning.siia.TripQuoteRequestProcessor"/>
<si:service-activator ref="tripQuoteProcessor" method="processTripRequest" input-channel="tripQuoteRequestsChannel"
output-channel="tripQuoteResponseChannel" />
+
+ <!-- These "rest" qualified channels exist to support the REST gateway.
+ In the book, the channel names are the same for the REST and SOAP gateways,
+ but here we are adding the qualifier so that the gateways do not collide. -->
+
+ <si:channel id="restTripQuoteRequestsChannel"/>
+ <si:channel id="restTripQuoteResponseChannel"/>
+
+ <si:service-activator ref="tripQuoteProcessor"
+ method="processTripRequest"
+ input-channel="restTripQuoteRequestsChannel"
+ output-channel="restTripQuoteResponseChannel" />
+
</beans>
View
10 siia-examples-parent/webapp/src/main/webapp/WEB-INF/http-ws-servlet.xml
@@ -7,11 +7,13 @@
http://www.springframework.org/schema/integration/http
http://www.springframework.org/schema/integration/http/spring-integration-http.xsd">
- <!-- for demo purposes only; this should not share the same reply channel
- as the SOAP inbound gateway since they would both be subscribed to it -->
+ <!-- In the book, the channel names are the same for the REST and SOAP gateways
+ ('tripQuoteRequestsChannel' and 'tripQuoteResponseChannel'), but here we are
+ adding the 'rest' prefix as a qualifier so that the gateways do not collide.
+ See the trips-applicationContext.xml file for more detail. -->
<si-http:inbound-gateway id="httpTripInboundGateway"
- request-channel="tripQuoteRequestsChannel"
- reply-channel="tripQuoteResponseChannel"/>
+ request-channel="restTripQuoteRequestsChannel"
+ reply-channel="restTripQuoteResponseChannel"/>
</beans>
View
3 siia-examples-parent/webapp/src/main/webapp/WEB-INF/soap-ws-servlet.xml
@@ -10,9 +10,6 @@
http://www.springframework.org/schema/integration/ws
http://www.springframework.org/schema/integration/ws/spring-integration-ws.xsd">
- <!-- for demo purposes only; this should not share the same reply channel
- as the REST inbound gateway since they would both be subscribed to it -->
-
<si-ws:inbound-gateway id="tripInboundGateway"
request-channel="tripQuoteRequestsChannel"
reply-channel="tripQuoteResponseChannel" marshaller="jaxbMarshaller"

0 comments on commit 2b03a0c

Please sign in to comment.