package com.manning.siia;

import siia.booking.domain.trip.LegQuoteCommand;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.xml.transform.StringResult;
import org.springframework.xml.transform.StringSource;

import javax.xml.transform.Source;


public class TripQuoteRequestProcessor {

    private Log logger = LogFactory.getLog(getClass());

    public Source processTripRequest(Source requestSource) throws Exception{
        logger.info("Trip request recevied");
        StringResult res = new StringResult();
        res.getWriter().append("<ok/>");
        return new StringSource(res.toString());
    }

     public OkResponse processTripRequest(LegQuoteCommand legQuoteCommand) throws Exception{
        logger.info("Trip request received:" + legQuoteCommand);
        StringResult res = new StringResult();
        return new OkResponse();
    }

}

@@ -668,16 +668,183 @@
 %0A    %7D%0A%0A
+    public OkResponse processTripRequest(String requestSource) throws Exception%7B%0A        logger.info(%22Trip request recevied%22);%0A        return new OkResponse();%0A    %7D%0A%0A
      pub
@@ -997,55 +997,8 @@
 d);%0A
-        StringResult res = new StringResult();%0A
     

Fix for handling HTTP requests properly