Package org.apache.cxf.service.model

Examples of org.apache.cxf.service.model.ServiceInfo


        CorbaStaxObject corbaStaxObject = new CorbaStaxObject();
        Message msg = new MessageImpl();
        CorbaMessage message = new CorbaMessage(msg);
        List<CorbaTypeMap> typeMaps = new ArrayList<CorbaTypeMap>();
        CorbaDestination destination = testUtils.getExceptionTypesTestDestination();
        ServiceInfo service = destination.getBindingInfo().getService();       
        List<TypeMappingType> corbaTypes = service.getDescription().getExtensors(TypeMappingType.class);
        if (corbaTypes != null) {
            CorbaUtils.createCorbaTypeMap(typeMaps, corbaTypes);
            corbaStaxObject.setTypeMaps(typeMaps);
        }
       
View Full Code Here


       
        List<CorbaTypeMap> typeMaps;      
        typeMaps = new ArrayList<CorbaTypeMap>();       
       
        CorbaDestination destination = testUtils.getStaxTypesTestDestination();
        ServiceInfo service = destination.getBindingInfo().getService();       
        List<TypeMappingType> corbaTypes = service.getDescription().getExtensors(TypeMappingType.class);
        if (corbaTypes != null) {
            CorbaUtils.createCorbaTypeMap(typeMaps, corbaTypes);
            staxObject.setTypeMaps(typeMaps);
            staxObject.setServiceInfo(service);
        }
View Full Code Here

    }
       
    protected void buildRequest(CorbaMessage message, OperationType opType) throws Exception {       
        List<CorbaTypeMap> typeMaps = new ArrayList<CorbaTypeMap>();

        ServiceInfo service = message.getExchange().get(ServiceInfo.class);
        List<TypeMappingType> corbaTypes = service.getDescription().getExtensors(TypeMappingType.class);
        if (corbaTypes != null) {
            CorbaUtils.createCorbaTypeMap(typeMaps, corbaTypes);
        }
       
        NVList nvlist = getArguments(message);
View Full Code Here

        for (Definition def : defList) {

            for (Iterator<?> ite = def.getPortTypes().entrySet().iterator(); ite.hasNext();) {
                Entry<?, ?> entry = (Entry<?, ?>)ite.next();
                PortType portType = def.getPortType((QName)entry.getKey());
                ServiceInfo serviceInfo = this.buildMockService(def, portType);
                serviceList.add(serviceInfo);

                for (Iterator<?> it2 = d.getAllBindings().values().iterator(); it2.hasNext();) {
                    Binding b = (Binding)it2.next();
                    if (b.getPortType() == portType) {
                        this.buildBinding(serviceInfo, b);
                        break;
                    }
                }
            }

            if (def.getPortTypes().size() == 0) {

                DescriptionInfo description = new DescriptionInfo();
                if (recordOriginal) {
                    description.setProperty(WSDL_DEFINITION, def);
                }
                description.setName(def.getQName());
                description.setBaseURI(def.getDocumentBaseURI());
                copyExtensors(description, def.getExtensibilityElements());
                copyExtensionAttributes(description, def);

                ServiceInfo service = new ServiceInfo();
                service.setDescription(description);
                if (recordOriginal) {
                    service.setProperty(WSDL_DEFINITION, def);
                }
                getSchemas(def, service);

                service.setProperty(WSDL_SCHEMA_ELEMENT_LIST, this.schemaList);
                serviceList.add(service);
            }
        }
        return serviceList;
    }
View Full Code Here

        description.setName(def.getQName());
        description.setBaseURI(def.getDocumentBaseURI());
        copyExtensors(description, def.getExtensibilityElements());
        copyExtensionAttributes(description, def);

        ServiceInfo service = new ServiceInfo();
        service.setDescription(description);
        if (recordOriginal) {
            service.setProperty(WSDL_DEFINITION, def);
        }
        getSchemas(def, service);

        service.setProperty(WSDL_SCHEMA_ELEMENT_LIST, this.schemaList);

        buildInterface(service, p);

        return service;
    }
View Full Code Here

            //wsdl4j can not get operation input message
            PortType pt = def.getPortType(bindingPt.getQName());
            if (pt == null) {
                pt = bindingPt;
            }
            ServiceInfo service = services.get(pt.getQName());
            if (service == null) {
                service = new ServiceInfo();
                service.setDescription(description);
                description.getDescribed().add(service);
                if (recordOriginal) {
                    service.setProperty(WSDL_DEFINITION, def);
                    service.setProperty(WSDL_SERVICE, serv);
                }
                getSchemas(def, service);
                copyDocumentation(service, serv);
                service.setProperty(WSDL_SCHEMA_ELEMENT_LIST, this.schemaList);
                service.setTargetNamespace(def.getTargetNamespace());
                service.setName(serv.getQName());
                copyExtensors(service, serv.getExtensibilityElements());
                copyExtensionAttributes(service, serv);

                buildInterface(service, pt);

                services.put(pt.getQName(), service);
            }

            BindingInfo bi = service.getBinding(binding.getQName());
            if (bi == null) {
                bi = buildBinding(service, binding);
            }
            buildEndpoint(service, bi, port);
        }
View Full Code Here

            }
            if (type.getContentModel().getContent() instanceof XmlSchemaComplexContentExtension) {
                XmlSchemaComplexContentExtension extension = (XmlSchemaComplexContentExtension)type
                    .getContentModel().getContent();
                QName baseTypeName = extension.getBaseTypeName();
                ServiceInfo serviceInfo = wrapper.getOperation().getInterface().getService();
                XmlSchemaType schemaType = serviceInfo.getXmlSchemaCollection().getTypeByQName(baseTypeName);
                if (!(schemaType instanceof XmlSchemaComplexType)
                    || !isWrappableSequence((XmlSchemaComplexType)schemaType, namespaceURI, wrapper,
                                            allowRefs)) {
                    return false;
                }
View Full Code Here

   
    @Test
    public void testRandomPortAllocation() throws Exception {
        transportFactory = new HTTPTransportFactory();
        transportFactory.setBus(BusFactory.getDefaultBus());
        ServiceInfo serviceInfo = new ServiceInfo();
        serviceInfo.setName(new QName("bla", "Service"));
        EndpointInfo ei = new EndpointInfo(serviceInfo, "");
        ei.setName(new QName("bla", "Port"));
       
        Destination d1 = transportFactory.getDestination(ei);
        URL url = new URL(d1.getAddress().getAddress().getValue());
View Full Code Here

    @Test
    public void testContinuationsIgnored() throws Exception {
       
        HttpServletRequest httpRequest = EasyMock.createMock(HttpServletRequest.class);
       
        ServiceInfo serviceInfo = new ServiceInfo();
        serviceInfo.setName(new QName("bla", "Service"));
        EndpointInfo ei = new EndpointInfo(serviceInfo, "");
        ei.setName(new QName("bla", "Port"));
       
        final JettyHTTPServerEngine httpEngine = new JettyHTTPServerEngine();
        httpEngine.setContinuationsEnabled(false);
View Full Code Here

    @Test
    public void testGetMultiple() throws Exception {
        transportFactory = new HTTPTransportFactory();
        transportFactory.setBus(BusFactory.getDefaultBus(true));
       
        ServiceInfo serviceInfo = new ServiceInfo();
        serviceInfo.setName(new QName("bla", "Service"));       
        EndpointInfo ei = new EndpointInfo(serviceInfo, "");
        ei.setName(new QName("bla", "Port"));
        ei.setAddress("http://foo");
        Destination d1 = transportFactory.getDestination(ei);
       
View Full Code Here

TOP

Related Classes of org.apache.cxf.service.model.ServiceInfo

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.