Package org.apache.camel

Examples of org.apache.camel.StringSource


        return new StringSource(result);
    }
    @Converter
    public StreamSource toStreamSourceFromStAX(StAXSource source, Exchange exchange) throws TransformerException {
        String result = toString(source, exchange);
        return new StringSource(result);
    }
View Full Code Here


        assertTrue(result instanceof Source);
    }

    @Test
    public void consumeStockQuoteWebserviceWithCamelStringSourceInput() throws Exception {
        Object result = template.requestBody("direct:stockQuoteWebservice", new StringSource(xmlRequestForGoogleStockQuote));

        assertNotNull(result);
        assertTrue(result instanceof Source);
    }
View Full Code Here

            + "<user xmlns=\"http://foo.com/bar\">"
            + "  <id>1</id>"
            + "  <username>davsclaus</username>"
            + "</user>";

        template.sendBody("direct:start", new StringSource(xml));

        assertMockEndpointsSatisfied();
    }
View Full Code Here

        File file = new File("src/test/resources/org/apache/camel/processor/ValidatingProcessor.xsd");
        String body = context.getTypeConverter().convertTo(String.class, file);

        validating = new ValidatingProcessor();
        validating.setSchemaSource(new StringSource(body));

        // loading scheme can be forced so lets try it
        validating.loadSchema();
    }
View Full Code Here

    public Object evaluateAsStringSource(Exchange exchange) throws Exception {
        LOG.debug("evaluateAsString: {} for exchange: {}", expression, exchange);
        initialize(exchange);

        String text = evaluateAsString(exchange);
        return new StringSource(text);
    }
View Full Code Here

    /**
     * Converts the given String to a Source
     */
    @Converter
    public StringSource toStringSource(String data) {
        return new StringSource(data);
    }
View Full Code Here

    /**
     * Converts the given String to a Source
     */
    @Converter
    public Source toSource(String data) {
        return new StringSource(data);
    }
View Full Code Here

            if (inputSource.getByteStream() != null) {
                return new StreamSource(inputSource.getByteStream());
            }
        }
        String result = toString(source, exchange);
        return new StringSource(result);
    }
View Full Code Here

    }
   
    @Converter
    public StreamSource toStreamSourceFromDOM(DOMSource source, Exchange exchange) throws TransformerException {
        String result = toString(source, exchange);
        return new StringSource(result);
    }
View Full Code Here

        return new StringSource(result);
    }
    @Converter
    public StreamSource toStreamSourceFromStAX(StAXSource source, Exchange exchange) throws TransformerException {
        String result = toString(source, exchange);
        return new StringSource(result);
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.StringSource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.