Examples of ServiceDefinition


Examples of com.volantis.mcs.service.ServiceDefinition

     */
    private static void configureServiceDefintion(
            MarinerServletRequestContext marinerRequestContext,
            EnvironmentContext environmentContext) {
        HttpServletRequest request = marinerRequestContext.getHttpRequest();
        ServiceDefinition service =
                ServiceDefinitionHelper.retrieveService(request);

        if (service != null) {
            // we need to store this away in the Expression context
            ExpressionContext expressionContext =
View Full Code Here

Examples of com.volantis.mcs.service.ServiceDefinition

    // javadoc inherited
    protected Value execute(ExpressionContext expressionContext, String name,
                            Value defaultValue) {

        Value result = defaultValue;
        ServiceDefinition service = getServiceDefinition(expressionContext);
        if (service != null) {
            try {
                MetaDataValue value = service.getCharacteristic(name);
                result = createValue(expressionContext.getFactory(), value);
            } catch (CharacteristicNotAvailableException e) {
                // log the error but we still return the defaultValue
                logger.warn("get-characteristics-fn-failed",
                            new String[] {getFunctionName(), name},
View Full Code Here

Examples of com.volantis.mcs.service.ServiceDefinition

     *
     * @param context the ExpressionContext
     * @return a ServiceDefinition instance
     */
    private ServiceDefinition getServiceDefinition(ExpressionContext context) {
        ServiceDefinition service = (ServiceDefinition) context.getProperty(
                ServiceDefinition.class);

        if (service == null) {
            logger.error("service-def-retrieval-failed");
        }
View Full Code Here

Examples of org.apache.tuscany.spi.model.ServiceDefinition

    @SuppressWarnings("unchecked")
    private void introspectJavaInterface(ComponentType componentType, ClassLoader cl, String serviceClass)
        throws MissingResourceException, InvalidServiceContractException {
        if (serviceClass != null) {
            ServiceDefinition service = new ServiceDefinition();
            try {
                ServiceContract<?> sc = processorRegistry.introspect(Class.forName(serviceClass));
                service.setServiceContract(sc);
                componentType.add(service);
            } catch (ClassNotFoundException e) {
                throw new MissingResourceException("Interface not found", e);
            }
        }
View Full Code Here

Examples of org.apache.tuscany.spi.model.ServiceDefinition

            portType = readWSDLPortType(wsdlNamespace, wsdlPortType, wsdlLocation, portType);
        } else {
            portType = getPortType(wsdlNamespace, wsdlPortType);
        }

        ServiceDefinition service = new ServiceDefinition();
        WSDLServiceContract wsdlSC = new WSDLServiceContract();
        wsdlSC.setPortType(portType);
        service.setServiceContract(wsdlSC);
        componentType.add(service);
    }
View Full Code Here

Examples of org.apache.tuscany.spi.model.ServiceDefinition

    @SuppressWarnings("unchecked")
    private void introspectJavaInterface(ComponentType componentType, ClassLoader cl, String serviceClass)
        throws MissingResourceException, InvalidServiceContractException {
        if (serviceClass != null) {
            ServiceDefinition service = new ServiceDefinition();
            try {
                ServiceContract<?> sc = processorRegistry.introspect(Class.forName(serviceClass));
                service.setServiceContract(sc);
                componentType.add(service);
            } catch (ClassNotFoundException e) {
                throw new MissingResourceException("Interface not found", e);
            }
        }
View Full Code Here

Examples of org.apache.tuscany.spi.model.ServiceDefinition

            portType = readWSDLPortType(wsdlNamespace, wsdlPortType, wsdlLocation, portType);
        } else {
            portType = getPortType(wsdlNamespace, wsdlPortType);
        }

        ServiceDefinition service = new ServiceDefinition();
        WSDLServiceContract wsdlSC = new WSDLServiceContract();
        wsdlSC.setPortType(portType);
        service.setServiceContract(wsdlSC);
        componentType.add(service);
    }
View Full Code Here

Examples of org.apache.tuscany.spi.model.ServiceDefinition

                            }
                           
                            return new BindlessServiceDefinition(name, serviceContract, false, targetURI);
                        } else {
                            // FIXME need a way to specify "remotable" on a service
                            return new ServiceDefinition(name, serviceContract, false);
                        }
                    }
                    break;
            }
        }
View Full Code Here

Examples of org.apache.tuscany.spi.model.ServiceDefinition

                                                                   rs.getClassLoader());
        assertNotNull(comonentType);
        Map services = comonentType.getServices();
        assertEquals(1,
                     services.size());
        ServiceDefinition serviceDefinition = (ServiceDefinition) services.values()
                                                                          .iterator()
                                                                          .next();
        ServiceContract serviceContract = serviceDefinition.getServiceContract();
        assertTrue(serviceContract instanceof JavaServiceContract);
        JavaServiceContract javaServiceContract = (JavaServiceContract) serviceContract;
        assertEquals(HelloWorldService.class,
                     javaServiceContract.getInterfaceClass());
    }
View Full Code Here

Examples of org.apache.tuscany.spi.model.ServiceDefinition

                                                                   rs.getClassLoader());
        assertNotNull(comonentType);
        Map services = comonentType.getServices();
        assertEquals(1,
                     services.size());
        ServiceDefinition serviceDefinition = (ServiceDefinition) services.values()
                                                                          .iterator()
                                                                          .next();
        ServiceContract serviceContract = serviceDefinition.getServiceContract();
        assertTrue(serviceContract instanceof WSDLServiceContract);
        WSDLServiceContract wsdlServiceContract = (WSDLServiceContract) serviceContract;
        assertEquals(new QName("http://helloworld", "HelloWorld"),
                     wsdlServiceContract.getPortType().getQName());
    }
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.