Package org.servicemix.client

Examples of org.servicemix.client.DefaultServiceMixClient


    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);
        }
        return answer;
    }
View Full Code Here


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

        ServiceNameEndpointResolver resolver = new ServiceNameEndpointResolver(serviceName);

        ServiceMixClient client = new DefaultServiceMixClient(container);
        Object answer = client.request(resolver, null, null, content);
        return answer;
    }
View Full Code Here

                    throw new RuntimeException(e);
                }
            }
        };
        container.activateComponent(new ActivationSpec("receiver", receiver));
        ServiceMixClient client = new DefaultServiceMixClient(container);
        ServiceEndpoint[] endpoints = client.getContext().getExternalEndpoints(null);
        assertNotNull(endpoints);
        assertEquals(1, endpoints.length);
        assertNull(client.getContext().getEndpointDescriptor(endpoints[0]));
        ServiceEndpoint se = client.getContext().resolveEndpointReference(endpoints[0].getAsReference(null));
        assertNull(client.getContext().getEndpointDescriptor(se));
        InOnly me = client.createInOnlyExchange();
        me.setEndpoint(se);
        client.send(me);
        receiver.getMessageList().assertMessagesReceived(1);
    }
View Full Code Here

TOP

Related Classes of org.servicemix.client.DefaultServiceMixClient

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.