Permalink
Browse files

author tags and comments

  • Loading branch information...
1 parent 647f297 commit f19d8f785e168786f6380cf641401852ec1986d9 @markfisher markfisher committed Sep 12, 2012
@@ -2,13 +2,14 @@
import javax.xml.bind.annotation.XmlRootElement;
+/**
+ * @author Jonas Partner
+ */
@XmlRootElement(name = "Ok")
public class OkResponse {
-
public String toString(){
return "Ok";
}
-
}
@@ -8,24 +8,26 @@
import javax.xml.transform.Source;
-
+/**
+ * @author Jonas Partner
+ */
public class TripQuoteRequestProcessor {
private Log logger = LogFactory.getLog(getClass());
public Source processTripRequest(Source requestSource) throws Exception{
- logger.info("Trip request recevied");
+ logger.info("Trip request received");
StringResult res = new StringResult();
res.getWriter().append("<ok/>");
return new StringSource(res.toString());
}
public OkResponse processTripRequest(String requestSource) throws Exception{
- logger.info("Trip request recevied");
+ logger.info("Trip request received");
return new OkResponse();
}
- public OkResponse processTripRequest(LegQuoteCommand legQuoteCommand) throws Exception{
+ public OkResponse processTripRequest(LegQuoteCommand legQuoteCommand) throws Exception{
logger.info("Trip request received:" + legQuoteCommand);
return new OkResponse();
}
@@ -7,6 +7,9 @@
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 -->
+
<si-http:inbound-gateway id="httpTripInboundGateway"
request-channel="tripQuoteRequestsChannel"
reply-channel="tripQuoteResponseChannel"/>
@@ -10,7 +10,9 @@
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"
@@ -7,6 +7,9 @@
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.ws.client.core.WebServiceOperations;
+/**
+ * @author Jonas Partner
+ */
public class SoapTripTestClient {
private static final CommandBuilder builder = new CommandBuilder();
@@ -17,7 +20,6 @@ public static void main(String[] args) {
new ClassPathXmlApplicationContext("soap-client-applicationContext.xml", SoapTripTestClient.class);
WebServiceOperations webServiceOperations = (WebServiceOperations) ctx.getBean(WebServiceOperations.class);
-
LegQuoteCommand command = new LegQuoteCommand(builder.buildTestLeg());
Object result = webServiceOperations.marshalSendAndReceive(command);
System.out.println(result);
@@ -34,8 +36,6 @@ public Leg buildTestLeg() {
Location endLocation = new Location("US", "New York");
return new Leg(startOfLeg, endOfLeg, startLocation, endLocation);
}
-
-
}
}
@@ -7,7 +7,6 @@
<property name="defaultUri" value="http://localhost:8080/siia-webapp/soapquoteservice"/>
<property name="marshaller" ref="jaxbMarshaller" />
<property name="unmarshaller" ref="jaxbMarshaller" />
-
</bean>
<bean id="jaxbMarshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">

0 comments on commit f19d8f7

Please sign in to comment.