Package org.switchyard.config.model.composite.v1

Examples of org.switchyard.config.model.composite.v1.V1ComponentModel


        // A WS Consumer as Service
        SOAPBindingModel config2 = new V1SOAPBindingModel(SOAPNamespace.DEFAULT.uri()) {
            @Override
            public CompositeReferenceModel getReference() {
                return new V1CompositeReferenceModel();
            }
        };
        config2.setWsdl(_serviceURL.toExternalForm() + "?wsdl");
        config2.setServiceName(_consumerService11.getServiceName());
        config2.setName("testGateway");
        _soapOutbound11_1 = new OutboundHandler(config2);
        _soapOutbound11_1.start();
        // Hack for Test Runner. Register a service to test outbound.
        _domain.registerService(_consumerService11.getServiceName(), new HelloWebServiceInterface(), _soapOutbound11_1);

        SOAPBindingModel config3 = new V1SOAPBindingModel(SOAPNamespace.DEFAULT.uri()) {
            @Override
            public CompositeReferenceModel getReference() {
                return new V1CompositeReferenceModel();
            }
        };
        config3.setWsdl(_config.getWsdl());
        config3.setServiceName(_consumerCPWsdl.getServiceName());
        config3.setName("testGateway");
        _soapOutbound11_2 = new OutboundHandler(config3);
        _soapOutbound11_2.start();
        // Hack for Test Runner. Register a service to test outbound.
        _domain.registerService(_consumerCPWsdl.getServiceName(), new HelloWebServiceInterface(), _soapOutbound11_2);

        composite = _puller.pull("/HelloSwitchYard1.2.xml", getClass());
        composite.assertModelValid();

        compositeService = composite.getServices().get(0);
        SOAPBindingModel _config12 = (SOAPBindingModel)compositeService.getBindings().get(0);
        _config12.setSocketAddr(new SocketAddr(host, Integer.parseInt(port)));

        // Massive hack for Test Runner. Register both a service and a reference binding.
        _domain.registerService(_config12.getServiceName(), new HelloWebServiceInterface(), provider);
        _domain.registerServiceReference(_config12.getServiceName(), new HelloWebServiceInterface());

        // Service exposed as WS
        _soapInbound12 = new InboundHandler(_config12, _domain);
        _soapInbound12.start();

        // We cannot use HelloWebServiceXXX, because the context path suffix XXX is ignored by JAXWS
        URL serviceURL = new URL("http://" + host + ":" + port + "/HelloSOAP12Service");

        SOAPBindingModel config4 = new V1SOAPBindingModel(SOAPNamespace.DEFAULT.uri()) {
            @Override
            public CompositeReferenceModel getReference() {
                return new V1CompositeReferenceModel();
            }
        };
        config4.setWsdl(serviceURL.toExternalForm() + "?wsdl");
        config4.setServiceName(_consumerService12.getServiceName());
        config4.setName("testGateway");
View Full Code Here


        // A WS Consumer as Service
        SOAPBindingModel config2 = new V1SOAPBindingModel(SOAPNamespace.DEFAULT.uri()) {
            @Override
            public CompositeReferenceModel getReference() {
                return new V1CompositeReferenceModel();
            }
        };
        config2.setWsdl(_serviceURL.toExternalForm() + "?wsdl");
        config2.setServiceName(consumerService.getServiceName());
        config2.setName("testGateway");
View Full Code Here

        URL serviceURL = new URL("http://" + host + ":" + port + "/HelloWebService");

        SOAPBindingModel config = new V1SOAPBindingModel(SOAPNamespace.DEFAULT.uri()) {
            @Override
            public CompositeReferenceModel getReference() {
                return new V1CompositeReferenceModel();
            }
        };
        config.setWsdl(serviceURL.toExternalForm() + "?wsdl");
        config.setServiceName(_proxyConsumerService1.getServiceName());
        config.setName("proxy-test");
View Full Code Here

        // A WS Consumer as Service
        SOAPBindingModel config2 = new V1SOAPBindingModel(SOAPNamespace.DEFAULT.uri()) {
            @Override
            public CompositeReferenceModel getReference() {
                return new V1CompositeReferenceModel();
            }
        };
        config2.setWsdl(_serviceURL.toExternalForm() + "?wsdl");
        config2.setServiceName(consumerService.getServiceName());
        config2.setName("testGateway");
View Full Code Here

                        iface = interfaces[0];
                    } else {
                        throw BeanMessages.MESSAGES.unexpectedExceptionTheServiceAnnotationHasNoValueItCannotBeOmmittedUnlessTheBeanImplementsExactlyOneInterface();
                    }
                }
                InterfaceModel csiModel = new V1InterfaceModel(InterfaceModel.JAVA);

                if (service.name().equals(Service.EMPTY)) {
                    name = iface.getSimpleName();
                } else {
                    name = service.name();
                }
               
                serviceModel.setName(name);
                serviceModel.setInterface(csiModel);
                csiModel.setInterface(iface.getName());
               
                componentModel.addService(serviceModel);
            }
           
            // Check to see if a policy requirements have been defined
View Full Code Here

                continue;
            }
           
            Class<?> reference = field.getType();
            ComponentReferenceModel referenceModel = new V1ComponentReferenceModel(switchyardNamespace.uri());
            InterfaceModel interfaceModel = new V1InterfaceModel(InterfaceModel.JAVA);
                 
            if (field.getAnnotation(Reference.class) != null) {
                Reference ref = field.getAnnotation(Reference.class);
                if (ref.value() == null || "".equals(ref.value())) {
                    referenceModel.setName(reference.getSimpleName());
                } else {
                    QName qname = QName.valueOf(ref.value());
                    referenceModel.setName(qname.getLocalPart());
                }
            } else {
                referenceModel.setName(reference.getSimpleName());
            }
           
            referenceModel.setInterface(interfaceModel);
            interfaceModel.setInterface(reference.getCanonicalName());
            // Add policy requirements to reference if specified
            Requires refRequires = field.getAnnotation(Requires.class);
            if (refRequires != null) {
                for (SecurityPolicy secPolicy : refRequires.security()) {
                    if (!secPolicy.supports(PolicyType.INTERACTION)) {
View Full Code Here

                channelModel.setReference(reference);
                ComponentReferenceModel componentReferenceModel = new V1ComponentReferenceModel(switchyardNamespace.uri());
                componentReferenceModel.setName(reference);
                Class<?> interfaze = channelAnnotation.interfaze();
                if (!Channel.UndefinedInterface.class.isAssignableFrom(interfaze)) {
                    InterfaceModel interfaceModel = new V1InterfaceModel(InterfaceModel.JAVA);
                    interfaceModel.setInterface(interfaze.getName());
                    componentReferenceModel.setInterface(interfaceModel);
                    componentModel.addReference(componentReferenceModel);
                }
            }
            channelsModel.addChannel(channelModel);
View Full Code Here

        componentImplementationModel.setProperties(toPropertiesModel(bpm.properties(), bpmNamespace));
        componentImplementationModel.setUserGroupCallback(toUserGroupCallbackModel(bpm.userGroupCallback(), bpmNamespace));
        componentImplementationModel.setWorkItemHandlers(toWorkItemHandlersModel(bpm.workItemHandlers(), bpmNamespace));
        componentModel.setImplementation(componentImplementationModel);
        ComponentServiceModel componentServiceModel = new V1ComponentServiceModel(switchyardNamespace.uri());
        InterfaceModel interfaceModel = new V1InterfaceModel(InterfaceModel.JAVA);
        interfaceModel.setInterface(bpmInterface.getName());
        componentServiceModel.setInterface(interfaceModel);
        componentServiceModel.setName(bpmName);
        componentModel.addService(componentServiceModel);
        return componentModel;
    }
View Full Code Here

        componentImplementationModel.setLoggers(toLoggersModel(rules.loggers(), rulesNamespace));
        componentImplementationModel.setManifest(toManifestModel(rules.manifest(), rulesNamespace));
        componentImplementationModel.setProperties(toPropertiesModel(rules.properties(), rulesNamespace));
        componentModel.setImplementation(componentImplementationModel);
        ComponentServiceModel componentServiceModel = new V1ComponentServiceModel(switchyardNamespace.uri());
        InterfaceModel interfaceModel = new V1InterfaceModel(InterfaceModel.JAVA);
        interfaceModel.setInterface(rulesInterface.getName());
        componentServiceModel.setInterface(interfaceModel);
        componentServiceModel.setName(rulesName);
        componentModel.addService(componentServiceModel);
        return componentModel;
    }
View Full Code Here

            componentModel.setImplementation(camelModel);
            compositeModel.addComponent(componentModel);

            // Component service definition
            ComponentServiceModel serviceModel = new V1ComponentServiceModel(switchyardNamespace.uri());
            InterfaceModel csiModel = new V1InterfaceModel(InterfaceModel.JAVA);
            Class<?> serviceInterface = routeClass.getAnnotation(Route.class).value();
            serviceModel.setName(getServiceName(routeClass));
            csiModel.setInterface(serviceInterface.getName());
            serviceModel.setInterface(csiModel);
            componentModel.addService(serviceModel);

            // Component reference definition(s)
            // Need to add these!
View Full Code Here

TOP

Related Classes of org.switchyard.config.model.composite.v1.V1ComponentModel

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.