log.info(new SourceTransformer().toString(rep));
if (rep instanceof Node) { rep = new DOMSource((Node) rep); } log.info(new SourceTransformer().toString((Source) rep));
    public void testDeploy() throws Exception {        ScaComponent component = new ScaComponent();        container.activateComponent(component, "JSR181Component");        MockServiceComponent mock = new MockServiceComponent();        mock.setService(new QName("StockQuoteService"));        mock.setEndpoint("Mock");        ByteArrayOutputStream baos = new ByteArrayOutputStream();        StockQuoteResponse r = new StockQuoteResponse();        r.setResult(8.23f);        JAXBContext.newInstance(StockQuoteResponse.class).createMarshaller().marshal(r, baos);        mock.setResponseXml(baos.toString());        ActivationSpec as = new ActivationSpec();        as.setInterfaceName(new QName("http://www.quickstockquote.com/StockQuoteService", "StockQuoteServiceJBI"));        as.setComponent(mock);        container.activateComponent(as);                // Start container        container.start();                // Deploy SU        component.getServiceUnitManager().deploy("su", getServiceUnitPath("org/apache/servicemix/sca/bigbank"));        component.getServiceUnitManager().init("su", getServiceUnitPath("org/apache/servicemix/sca/bigbank"));        component.getServiceUnitManager().start("su");                ServiceMixClient client = new DefaultServiceMixClient(container);        Source req = new StringSource("<AccountReportRequest><CustomerID>id</CustomerID></AccountReportRequest>");        Source rep = (Source) client.request(new ServiceNameEndpointResolver(        										new QName("http://www.bigbank.com/AccountService/", "AccountService")),        			   						 null, null, req);        log.info(new SourceTransformer().toString(rep));    }