package org.apache.camel.component.spring.ws;

import java.io.File;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;

import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.w3c.dom.Document;

/**
 * Generates static response on StockQuote webservice requests
 */
public class StockQuoteResponseProcessor implements Processor {

	@Override
	public void process(Exchange exchange) throws Exception {
		File file = new File("src/test/resources/stockquote-response.xml");
		DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
		DocumentBuilder db = dbf.newDocumentBuilder();
		Document doc = db.parse(file);
		exchange.getOut().setBody(doc);
	}

}

@@ -223,16 +223,101 @@
 cessor;%0A
+import org.apache.commons.logging.Log;%0Aimport org.apache.commons.logging.LogFactory;%0A
 import o
@@ -477,78 +477,231 @@
 r %7B%0A
-%0A%09@Override%0A%09public void process(Exchange exchange) throws Exception %7B
+%09%0A    private static final Log LOG = LogFactory.getLog(StockQuoteResponseProcessor.class);%0A%0A%09public void process(Exchange exchange) throws Exception %7B%0A%09%09LOG.info(%22Crafting standard response in StockQuoteResponseProcessor%22);
 %0A%09%09F

Switch to Java 1.5