Package org.apache.cxf.service.model

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


                                                   
        CorbaMessage msg = control.createMock(CorbaMessage.class);
        CorbaDestination destination = control.createMock(CorbaDestination.class);
        BindingInfo bInfo = control.createMock(BindingInfo.class);
        ServiceInfo sInfo = control.createMock(ServiceInfo.class);
        DescriptionInfo dInfo = control.createMock(DescriptionInfo.class)
        EasyMock.expect(msg.getDestination()).andReturn(destination).times(2);       
        EasyMock.expect(destination.getBindingInfo()).andReturn(bInfo);
        EasyMock.expect(bInfo.getService()).andReturn(sInfo);
        EasyMock.expect(dInfo.getExtensors(TypeMappingType.class)).andReturn(null);
        EasyMock.expect(sInfo.getDescription()).andReturn(dInfo);
       
        inInterceptor.handleNotRequestMessage(msg, destination);
        EasyMock.expectLastCall();
       
View Full Code Here


                                                   
        CorbaMessage msg = control.createMock(CorbaMessage.class);
        CorbaDestination destination = control.createMock(CorbaDestination.class);
        BindingInfo bInfo = control.createMock(BindingInfo.class);
        ServiceInfo sInfo = control.createMock(ServiceInfo.class);
        DescriptionInfo dInfo = control.createMock(DescriptionInfo.class);  
        EasyMock.expect(msg.getDestination()).andReturn(destination).times(2);       
        EasyMock.expect(destination.getBindingInfo()).andReturn(bInfo);
        EasyMock.expect(bInfo.getService()).andReturn(sInfo);
        EasyMock.expect(dInfo.getExtensors(TypeMappingType.class)).andReturn(null);
        EasyMock.expect(sInfo.getDescription()).andReturn(dInfo);
        EasyMock.expect(msg.containsKey(Message.REQUESTOR_ROLE)).andReturn(true);
       
        inInterceptor.handleRequestMessage(msg, destination);
        EasyMock.expectLastCall();
View Full Code Here

                                                   
        CorbaMessage msg = control.createMock(CorbaMessage.class);
        CorbaDestination destination = control.createMock(CorbaDestination.class);
        BindingInfo bInfo = control.createMock(BindingInfo.class);
        ServiceInfo sInfo = control.createMock(ServiceInfo.class);
        DescriptionInfo dInfo = control.createMock(DescriptionInfo.class)
        EasyMock.expect(msg.getDestination()).andReturn(null);
        Exchange exchange = control.createMock(Exchange.class);
        EasyMock.expect(msg.getExchange()).andReturn(exchange);
        EasyMock.expect(exchange.getDestination()).andReturn(destination);       
        EasyMock.expect(destination.getBindingInfo()).andReturn(bInfo);
        EasyMock.expect(bInfo.getService()).andReturn(sInfo);
        EasyMock.expect(dInfo.getExtensors(TypeMappingType.class)).andReturn(null);
        EasyMock.expect(sInfo.getDescription()).andReturn(dInfo);
        EasyMock.expect(msg.containsKey(Message.REQUESTOR_ROLE)).andReturn(true);
       
        inInterceptor.handleRequestMessage(msg, destination);
        EasyMock.expectLastCall();
View Full Code Here

            info.setDocumentation(doc);
        }
    }

    public List<ServiceInfo> buildServices(Definition d) {
        DescriptionInfo description = new DescriptionInfo();
        if (recordOriginal) {
            description.setProperty(WSDL_DEFINITION, d);
        }
        description.setName(d.getQName());
        description.setBaseURI(d.getDocumentBaseURI());
        copyExtensors(description, d.getExtensibilityElements());
        copyExtensionAttributes(description, d);

        List<ServiceInfo> serviceList = new ArrayList<ServiceInfo>();
        for (java.util.Iterator<QName> ite = CastUtils.cast(d.getServices().keySet().iterator()); ite
View Full Code Here

                }
            }

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

        }
        return serviceList;
    }

    public ServiceInfo buildMockService(Definition def, PortType p) {
        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);
View Full Code Here

                                            Service serv,
                                            QName endpointName,
                                            DescriptionInfo d) {
        Map<QName, ServiceInfo> services = new LinkedHashMap<QName, ServiceInfo>();

        DescriptionInfo description = d;
        if (null == description) {
            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);

            Set<Definition> done = new HashSet<Definition>();
            done.add(def);
            Collection<List<Import>> values = CastUtils.cast(def.getImports().values());
            for (List<Import> imports : values) {
                for (Import imp : imports) {
                    if (!done.contains(imp.getDefinition())) {
                        done.add(imp.getDefinition());
                        copyExtensors(description, imp.getExtensibilityElements());
                        copyExtensionAttributes(description, imp);
                        copyExtensors(description, imp.getDefinition().getExtensibilityElements());
                        copyExtensionAttributes(description, imp.getDefinition());
                    }
                }
            }
        }
        for (Port port : cast(serv.getPorts().values(), Port.class)) {
            if (endpointName != null
                && !endpointName.getLocalPart().equals(port.getName())) {
                continue;
            }
            Binding binding = port.getBinding();
            PortType bindingPt = binding.getPortType();
            if (bindingPt == null) {
                org.apache.cxf.common.i18n.Message msg = new
                org.apache.cxf.common.i18n.Message("BINDING_MISSING_TYPE",
                                                   LOG,
                                                   binding.getQName());
                throw new WSDLRuntimeException(msg);
            }

            //TODO: wsdl4j's bug. if there is recursive import,
            //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);
View Full Code Here

        ei.setBinding(bi);
        copyExtensors(ei, port.getExtensibilityElements());
        copyExtensionAttributes(ei, port);

        service.addEndpoint(ei);
        DescriptionInfo d = service.getDescription();
        if (null != d) {
            d.getDescribed().add(ei);
        }
        return ei;
    }
View Full Code Here

            }
        }

        service.addBinding(bi);
        DescriptionInfo d = service.getDescription();
        if (null != d) {
            d.getDescribed().add(bi);
        }
        return bi;
    }
View Full Code Here

        // }
    }

    public void buildInterface(ServiceInfo si, PortType p) {
        InterfaceInfo inf = si.createInterface(p.getQName());
        DescriptionInfo d = si.getDescription();
        if (null != d) {
            d.getDescribed().add(inf);
        }
        copyDocumentation(inf, p);
        this.copyExtensors(inf, p.getExtensibilityElements());
        this.copyExtensionAttributes(inf, p);
        if (recordOriginal) {
View Full Code Here

TOP

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

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.