Package org.apache.camel.builder.xml

Examples of org.apache.camel.builder.xml.Namespaces.xpath()


                Namespaces ns = new Namespaces("c", "http://acme.com/cheese")
                        .add("xsd", "http://www.w3.org/2001/XMLSchema");

                // now lets create an xpath based Message Filter
                from("direct:start").
                        filter(ns.xpath("/c:person[@name='James']")).
                        to("mock:result");
                // END SNIPPET: example
            }
        };
    }
View Full Code Here


        context.getRouteDefinition("encrypt")
            .adviceWith(context, new AdviceWithRouteBuilder() {
                @Override
                public void configure() throws Exception {
                    interceptSendToEndpoint("direct:decrypt")
                        .when(namespaces.xpath(cityExistsXPath))
                            .to("mock:incorrectlyEncrypted");
                }
            });
        context.getRouteDefinition("decrypt")
            .adviceWith(context, new AdviceWithRouteBuilder() {
View Full Code Here

        context.getRouteDefinition("decrypt")
            .adviceWith(context, new AdviceWithRouteBuilder() {
                @Override
                public void configure() throws Exception {
                    interceptSendToEndpoint("mock:out")
                        .when(namespaces.xpath(cityExistsXPath))
                            .to("mock:correctlyDecrypted");
                }
            });
        context.start();
View Full Code Here

        context.getRouteDefinition("encrypt")
            .adviceWith(context, new AdviceWithRouteBuilder() {
                @Override
                public void configure() throws Exception {
                    interceptSendToEndpoint("direct:decrypt")
                        .when(namespaces.xpath(cityExistsXPath))
                            .to("mock:incorrectlyEncrypted");
                }
            });
        context.getRouteDefinition("decrypt")
            .adviceWith(context, new AdviceWithRouteBuilder() {
View Full Code Here

        context.getRouteDefinition("decrypt")
            .adviceWith(context, new AdviceWithRouteBuilder() {
                @Override
                public void configure() throws Exception {
                    interceptSendToEndpoint("mock:out")
                        .when(namespaces.xpath(cityExistsXPath))
                            .to("mock:correctlyDecrypted");
                }
            });
        context.start();
View Full Code Here

    public void configure() throws Exception {
        Namespaces namespaces = new Namespaces("c", "http://camelcookbook.org/schema/books")
            .add("se", "http://camelcookbook.org/schema/somethingElse");

        from("direct:in")
            .split(namespaces.xpath("/c:books/c:book[@category='Tech']/c:authors/c:author/text()"))
                .to("mock:out")
            .end();
    }
}
View Full Code Here

    String notifyUrl = XPathBuilder.xpath("//To", String.class).evaluate(exchange, String.class);
   
    if(notifyUrl.isEmpty()) {
      Namespaces ns = new Namespaces("wsa", "http://www.w3.org/2005/08/addressing");
      notifyUrl = ns.xpath("//wsa:To", String.class).evaluate(exchange, String.class);
    }

    injectUriAndQueryString(notifyUrl, exchange);
  }
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.