Package org.servicemix.jbi.resolver

Examples of org.servicemix.jbi.resolver.ServiceNameEndpointResolver


    }

    public void testSendUsingMessageContentAndExpressionName() throws Exception {

        QName service = new QName("http://servicemix.org/cheese/", "ftpSenderWithExpression");
        ServiceNameEndpointResolver resolver = new ServiceNameEndpointResolver(service);

        InOnly exchange = client.createInOnlyExchange(resolver);
        NormalizedMessage message = exchange.getInMessage();

        message.setContent(new StringSource("<order id='abc123'><customer>Duff Beer</customer><value>599.99</value></order>"));
View Full Code Here


    public void testUsingXPathExpressionsInEmail() throws Exception {

        // START SNIPPET: xpath
        QName xpathSender = new QName("http://servicemix.org/cheese/", "emailSenderWithExpressions");
        ServiceNameEndpointResolver resolver = new ServiceNameEndpointResolver(xpathSender);

        InOnly exchange = client.createInOnlyExchange(resolver);

        Source source = getSourceFromClassPath("request.xml");
        exchange.getInMessage().setContent(source);
View Full Code Here

    public void testUsingXPathExpressionsInSimpleEmail() throws Exception {

        // START SNIPPET: xpathSimple
        QName xpathSender = new QName("http://servicemix.org/cheese/", "simpleMailSenderWithExpressions");
        ServiceNameEndpointResolver resolver = new ServiceNameEndpointResolver(xpathSender);

        InOnly exchange = client.createInOnlyExchange(resolver);

        Source source = getSourceFromClassPath("request.xml");
        exchange.getInMessage().setContent(source);
View Full Code Here

    }

    public void testUsingPropertyExpressionsInSimpleEmail() throws Exception {
        // START SNIPPET: xpathSimple
        QName xpathSender = new QName("http://servicemix.org/cheese/", "simpleMailSenderWithPropertyExpressions");
        ServiceNameEndpointResolver resolver = new ServiceNameEndpointResolver(xpathSender);

        InOnly exchange = client.createInOnlyExchange(resolver);
        NormalizedMessage message = exchange.getInMessage();

        message.setProperty("to", "scm@servicemix.org");
View Full Code Here

    }

    protected void sendFile(QName serviceName, String fileOnClassPath) throws JBIException {
        Source content = getSourceFromClassPath(fileOnClassPath);

        ServiceNameEndpointResolver resolver = new ServiceNameEndpointResolver(serviceName);

        client.send(resolver, null, null, content);
    }
View Full Code Here

   
    protected void runSimpleTest(final boolean syncSend, final boolean syncReceive) throws Exception {
        //final int numMessages = 1;
        final int numMessages = NUM_MESSAGES;
        final SenderComponent sender = new SenderComponent();
        sender.setResolver(new ServiceNameEndpointResolver(ReceiverComponent.SERVICE));
        final Receiver receiver;
        final Map delivered = new ConcurrentHashMap();
        if (syncReceive) {
          receiver = new ReceiverComponent() {
              public void onMessageExchange(MessageExchange exchange) throws MessagingException {
View Full Code Here

    }

    protected Object requestServiceWithFileRequest(QName serviceName, String fileOnClassPath) throws JBIException, TransformerException, ParserConfigurationException, IOException, SAXException {
        Source content = getSourceFromClassPath(fileOnClassPath);

        ServiceNameEndpointResolver resolver = new ServiceNameEndpointResolver(serviceName);

        ServiceMixClient client = new DefaultServiceMixClient(container);
        Object answer = client.request(resolver, null, null, content);
        if (answer instanceof Source) {
            answer = transformer.toDOMNode((Source) answer);
View Full Code Here

     * @throws TransformerException
     */
    protected Object requestServiceWithFileRequest(QName serviceName, String fileOnClassPath) throws JBIException, TransformerException, ParserConfigurationException, IOException, SAXException {
        Source content = getSourceFromClassPath(fileOnClassPath);

        ServiceNameEndpointResolver resolver = new ServiceNameEndpointResolver(serviceName);

        Object answer = client.request(resolver, null, null, content);
        if (answer instanceof Source) {
            answer = transformer.toDOMNode((Source) answer);
        }
View Full Code Here

        }
        return getMarshaler().unmarshal(exchange, outMessage);
    }

    public EndpointResolver createResolverForService(QName service) {
        return new ServiceNameEndpointResolver(service);
    }
View Full Code Here

        if (destinationService != null) {
            if (destinationEndpoint != null) {
                return new ServiceAndEndpointNameResolver(destinationService, destinationEndpoint);
            }
            else {
                return new ServiceNameEndpointResolver(destinationService);
            }
        }
        else {
            if (destinationInterface != null) {
                return new InterfaceNameEndpointResolver(destinationInterface);
View Full Code Here

TOP

Related Classes of org.servicemix.jbi.resolver.ServiceNameEndpointResolver

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.