Package org.apache.cxf.binding.corba.wsdl

Examples of org.apache.cxf.binding.corba.wsdl.BindingType


        incomingObserver = observer;
        typeMap = map;
      
        // Get the list of interfaces that this servant will support
        try {               
            BindingType bindType = destination.getBindingInfo().getExtensor(BindingType.class);           
            if (bindType == null) {
                throw new CorbaBindingException("Unable to determine corba binding information");
            }

            List<String> bases = bindType.getBases();
            interfaces = new ArrayList<String>();
            interfaces.add(bindType.getRepositoryID());
            for (Iterator<String> iter = bases.iterator(); iter.hasNext();) {
                interfaces.add(iter.next());
            }
        } catch (java.lang.Exception ex) {
            LOG.log(Level.SEVERE, "Couldn't initialize the corba DSI servant");
View Full Code Here


        assertEquals(1, binding.getExtensibilityElements().size());
        assertEquals(1, binding.getBindingOperations().size());
       
        for (ExtensibilityElement extElement : getExtensibilityElements(binding)) {
            if (extElement.getElementType().getLocalPart().equals("binding")) {
                BindingType bindingType = (BindingType)extElement;
                assertEquals(bindingType.getRepositoryID(), "IDL:TestException/ExceptionTest:1.0");
            }
        }       
        Iterator<?> j = binding.getBindingOperations().iterator();
        while (j.hasNext()) {           
            BindingOperation bindingOperation = (BindingOperation)j.next();
View Full Code Here

        assertEquals(1, binding.getExtensibilityElements().size());
        assertEquals(1, binding.getBindingOperations().size());
       
        for (ExtensibilityElement extElement : getExtensibilityElements(binding)) {
            if (extElement.getElementType().getLocalPart().equals("binding")) {
                BindingType bindingType = (BindingType)extElement;
                assertEquals(bindingType.getRepositoryID(), "IDL:BasePortType:1.0");
            }
        }
       
        Iterator<?> j = binding.getBindingOperations().iterator();
        while (j.hasNext()) {           
View Full Code Here

        assertEquals(32, binding.getBindingOperations().size());
       
        List<ExtensibilityElement> extElements = getExtensibilityElements(binding);            
        ExtensibilityElement extElement = extElements.get(0);
        if (extElement.getElementType().getLocalPart().equals("binding")) {
            BindingType bindingType = (BindingType)extElement;
            assertEquals(bindingType.getRepositoryID(), "IDL:Test/MultiPart:1.0");
        }       
       
        getStringAttributeTest(binding);
        getTestIdTest(binding);
        setTestIdTest(binding);
View Full Code Here

            assertEquals(1, binding.getExtensibilityElements().size());
            assertEquals(1, binding.getBindingOperations().size());

            for (ExtensibilityElement extElement : getExtensibilityElements(binding)) {
                if (extElement.getElementType().getLocalPart().equals("binding")) {
                    BindingType bindingType = (BindingType)extElement;
                    assertEquals(bindingType.getRepositoryID(), "IDL:X:1.0");
                }
            }

            Iterator<?> j = binding.getBindingOperations().iterator();
            while (j.hasNext()) {
View Full Code Here

        Binding binding = rootDefinition.createBinding();
        binding.setPortType(portType);
        binding.setQName(bqname);

        try {
            BindingType bindingType = (BindingType)
                extReg.createExtension(Binding.class, CorbaConstants.NE_CORBA_BINDING);
            bindingType.setRepositoryID(CorbaConstants.REPO_STRING
                                        + scopedPortTypeName.replace('.', '/')
                                        + CorbaConstants.IDL_VERSION);
            binding.addExtensibilityElement(bindingType);
        } catch (WSDLException ex) {
            throw new RuntimeException(ex);
View Full Code Here

    private AST visitInterfaceInheritanceSpec(AST interfaceInheritanceSpecNode, Binding binding,
                                              Scope childScope) {
        // <interface_inheritance_spec> ::= ":" <interface_name> { "," <interface_name> }*
               
        AST interfaceNameNode = interfaceInheritanceSpecNode.getFirstChild();
        BindingType corbaBinding = findCorbaBinding(binding);
        List<Scope> inheritedScopes = new ArrayList<Scope>();
       
        while (interfaceNameNode != null) {           
            //check for porttypes in current & parent scopes
            Scope interfaceScope = null;
            PortType intf = null;
            if (ScopedNameVisitor.isFullyScopedName(interfaceNameNode)) {
                interfaceScope = ScopedNameVisitor.getFullyScopedName(new Scope(), interfaceNameNode);
                intf = findPortType(interfaceScope);
            }
            Scope currentScope = getScope();
            while (intf == null
                   && currentScope != currentScope.getParent()) {
                if (ScopedNameVisitor.isFullyScopedName(interfaceNameNode)) {
                    interfaceScope = ScopedNameVisitor.getFullyScopedName(currentScope, interfaceNameNode);
                } else {
                    interfaceScope = new Scope(currentScope, interfaceNameNode.toString());
                }
                intf = findPortType(interfaceScope);
                currentScope = currentScope.getParent();
            }
           
            if (intf == null) {
                if (ScopedNameVisitor.isFullyScopedName(interfaceNameNode)) {
                    interfaceScope = ScopedNameVisitor.getFullyScopedName(new Scope(), interfaceNameNode);
                } else {
                    interfaceScope = new Scope(new Scope(), interfaceNameNode);
                }
                intf = findPortType(interfaceScope);
            }

            if (intf == null) {
                throw new RuntimeException("[InterfaceVisitor] Unknown Interface: "
                                           + interfaceNameNode.toString());
            }

            Scope defnScope = interfaceScope.getParent();
            Definition defn = manager.getWSDLDefinition(mapper.map(defnScope));
            inheritedScopes.add(interfaceScope);
           
            if (defn != null && !defn.getTargetNamespace().equals(definition.getTargetNamespace())) {
                String key = defnScope.toString("_");
                String fileName = getWsdlVisitor().getOutputDir()
                    + System.getProperty("file.separator")
                    + key;
                manager.addWSDLDefinitionImport(definition,
                                                defn,
                                                key,
                                                fileName);
            }                       
           
            Binding inheritedBinding = findBinding(intf);
            BindingType inheritedCorbaBinding = findCorbaBinding(inheritedBinding);
            corbaBinding.getBases().add(inheritedCorbaBinding.getRepositoryID());

            //add all the operations of the inherited port type.           
            for (Operation op : CastUtils.cast(intf.getOperations(), Operation.class)) {

                //check to see all the inherited namespaces are added.
View Full Code Here

                            obj.setBinding(bName);
                            // get the repository id of the binding.
                            String repId = null;
                            Iterator<?> bindIter = binding.getExtensibilityElements().iterator();
                            while (bindIter.hasNext()) {
                                BindingType type = (BindingType)bindIter.next();
                                repId = type.getRepositoryID();
                            }
                            obj.setRepositoryID(repId);
                            obj.setType(typeName);
                            corbaTypeImpl = obj;
                        } else {
View Full Code Here

        Binding binding = rootDefinition.createBinding();
        binding.setPortType(portType);
        binding.setQName(bqname);

        try {
            BindingType bindingType = (BindingType)
                extReg.createExtension(Binding.class, CorbaConstants.NE_CORBA_BINDING);
            String pragmaPrefix = (this.getWsdlVisitor().getPragmaPrefix() != null
                                        && this.getWsdlVisitor().getPragmaPrefix().length() > 0)
                ? this.getWsdlVisitor().getPragmaPrefix() + "/" : "";
            bindingType.setRepositoryID(CorbaConstants.REPO_STRING
                                        + pragmaPrefix
                                        + scopedPortTypeName.replace('.', '/')
                                        + CorbaConstants.IDL_VERSION);
            binding.addExtensibilityElement((ExtensibilityElement)bindingType);
        } catch (WSDLException ex) {
View Full Code Here

    private AST visitInterfaceInheritanceSpec(AST interfaceInheritanceSpecNode, Binding binding,
                                              Scope childScope) {
        // <interface_inheritance_spec> ::= ":" <interface_name> { "," <interface_name> }*
               
        AST interfaceNameNode = interfaceInheritanceSpecNode.getFirstChild();
        BindingType corbaBinding = findCorbaBinding(binding);
        List<Scope> inheritedScopes = new ArrayList<Scope>();
       
        while (interfaceNameNode != null) {           
            //check for porttypes in current & parent scopes
            Scope interfaceScope = null;
            PortType intf = null;
            if (ScopedNameVisitor.isFullyScopedName(interfaceNameNode)) {
                interfaceScope = ScopedNameVisitor.getFullyScopedName(new Scope(), interfaceNameNode);
                intf = findPortType(interfaceScope);
            }
            Scope currentScope = getScope();
            while (intf == null
                   && currentScope != currentScope.getParent()) {
                if (ScopedNameVisitor.isFullyScopedName(interfaceNameNode)) {
                    interfaceScope = ScopedNameVisitor.getFullyScopedName(currentScope, interfaceNameNode);
                } else {
                    interfaceScope = new Scope(currentScope, interfaceNameNode.toString());
                }
                intf = findPortType(interfaceScope);
                currentScope = currentScope.getParent();
            }
           
            if (intf == null) {
                if (ScopedNameVisitor.isFullyScopedName(interfaceNameNode)) {
                    interfaceScope = ScopedNameVisitor.getFullyScopedName(new Scope(), interfaceNameNode);
                } else {
                    interfaceScope = new Scope(new Scope(), interfaceNameNode);
                }
                intf = findPortType(interfaceScope);
            }

            if (intf == null) {
                throw new RuntimeException("[InterfaceVisitor] Unknown Interface: "
                                           + interfaceNameNode.toString());
            }

            Scope defnScope = interfaceScope.getParent();
            Definition defn = manager.getWSDLDefinition(mapper.map(defnScope));
            inheritedScopes.add(interfaceScope);
           
            if (defn != null && !defn.getTargetNamespace().equals(definition.getTargetNamespace())) {
                String key = defnScope.toString("_");
                String fileName = getWsdlVisitor().getOutputDir()
                    + System.getProperty("file.separator")
                    + key;
                manager.addWSDLDefinitionImport(definition,
                                                defn,
                                                key,
                                                fileName);
            }                       
           
            Binding inheritedBinding = findBinding(intf);
            BindingType inheritedCorbaBinding = findCorbaBinding(inheritedBinding);
            corbaBinding.getBases().add(inheritedCorbaBinding.getRepositoryID());

            //add all the operations of the inherited port type.           
            for (Operation op : CastUtils.cast(intf.getOperations(), Operation.class)) {

                //check to see all the inherited namespaces are added.
View Full Code Here

TOP

Related Classes of org.apache.cxf.binding.corba.wsdl.BindingType

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.