Package org.apache.servicemix.client

Examples of org.apache.servicemix.client.ServiceMixClientFacade


        client.setMarshaler(new JAXBMarshaler(JAXBContext.newInstance(Subscribe.class, RegisterPublisher.class)));
        return client;
    }

    public static ServiceMixClient createJaxbClient(ComponentContext context) throws JAXBException {
        ServiceMixClientFacade client = new ServiceMixClientFacade(context);
        client.setMarshaler(new JAXBMarshaler(JAXBContext.newInstance(Subscribe.class, RegisterPublisher.class)));
        return client;
    }
View Full Code Here


    private ComponentContext context;
    public String greetMe(String me) {
        try {
           
            // here use client api to test the injected context to invoke another endpoint
            ServiceMixClient client = new ServiceMixClientFacade(this.context);
            InOut exchange = client.createInOutExchange();
            NormalizedMessage message = exchange.getInMessage();
           
            message.setContent(new StringSource(
                    "<message xmlns='http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper'>"
                    + "  <part>"
                    + "    <add xmlns='http://apache.org/cxf/calculator/types'>"
                    + "      <arg0>1</arg0>"
                    + "      <arg1>2</arg1>"
                    + "    </add>"
                    + "  </part>"
                    + "</message>"));
     
            exchange.setService(new QName("http://apache.org/cxf/calculator", "CalculatorService"));
            exchange.setInterfaceName(new QName("http://apache.org/cxf/calculator", "CalculatorPortType"));
            exchange.setOperation(new QName("http://apache.org/cxf/calculator", "add"));
            client.sendSync(exchange);
           
        } catch (JBIException e) {
            //
        }
        return "Hello " + me  + " " + context.getComponentName();
View Full Code Here

    public static final String WSN_SERVICE = "CreatePullPoint";

    public static final QName NOTIFICATION_BROKER = new QName(WSN_URI, WSN_SERVICE);

    public CreatePullPoint(ComponentContext context) throws JAXBException {
        ServiceMixClientFacade client = new ServiceMixClientFacade(context);
        client.setMarshaler(new JAXBMarshaler(JAXBContext.newInstance(Subscribe.class, RegisterPublisher.class)));
        setClient(client);
        setResolver(new ServiceNameEndpointResolver(NOTIFICATION_BROKER));
    }
View Full Code Here

    public static final String WSN_SERVICE = "NotificationBroker";

    public static final QName NOTIFICATION_BROKER = new QName(WSN_URI, WSN_SERVICE);

    public NotificationBroker(ComponentContext context) throws JAXBException {
        ServiceMixClientFacade client = new ServiceMixClientFacade(context);
        client.setMarshaler(new JAXBMarshaler(JAXBContext.newInstance(Subscribe.class, RegisterPublisher.class)));
        setClient(client);
        setResolver(new ServiceNameEndpointResolver(NOTIFICATION_BROKER));
    }
View Full Code Here

    public DeliveryChannel getChannel() throws MessagingException {
        return getContext().getDeliveryChannel();
    }

    public ServiceMixClient getClient() {
        return new ServiceMixClientFacade(getContext());
    }
View Full Code Here

        if (context == null) {
            if (factory == null) {
                if (context != null) {
                    factory = new ClientFactory() {
                        public ServiceMixClient createClient() throws JBIException {
                            return new ServiceMixClientFacade(context);
                        }
                    };
                } else if (container != null) {
                    factory = container.getClientFactory();
                } else {
View Full Code Here

    public DeliveryChannel getChannel() throws MessagingException {
        return getContext().getDeliveryChannel();
    }

    public ServiceMixClient getClient() {
        return new ServiceMixClientFacade(getContext());
    }
View Full Code Here

    public DeliveryChannel getChannel() throws MessagingException {
        return getContext().getDeliveryChannel();
    }

    public ServiceMixClient getClient() {
        return new ServiceMixClientFacade(getContext());
    }
View Full Code Here

    public DeliveryChannel getChannel() throws MessagingException {
        return getContext().getDeliveryChannel();
    }

    public ServiceMixClient getClient() {
        return new ServiceMixClientFacade(getContext());
    }
View Full Code Here

        client.setMarshaler(new JAXBMarshaler(JAXBContext.newInstance(Subscribe.class, RegisterPublisher.class)));
        return client;
    }
   
    public static ServiceMixClient createJaxbClient(ComponentContext context) throws JAXBException {
        ServiceMixClientFacade client = new ServiceMixClientFacade(context);
        client.setMarshaler(new JAXBMarshaler(JAXBContext.newInstance(Subscribe.class, RegisterPublisher.class)));
        return client;
    }
View Full Code Here

TOP

Related Classes of org.apache.servicemix.client.ServiceMixClientFacade

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.