Examples of TypeMappingType


Examples of org.apache.schemas.yoko.bindings.corba.TypeMappingType

            assertNotNull(typemap);
            assertEquals(1, typemap.getElementsByTagName("corba:anonfixed").getLength());           
            assertEquals(1, typemap.getElementsByTagName("corba:anonstring").getLength());           
            assertEquals(3, typemap.getElementsByTagName("corba:struct").getLength());           
           
            TypeMappingType mapType = (TypeMappingType)model.getExtensibilityElements().get(0);           

            WSDLToIDLAction idlgen = new WSDLToIDLAction();
            idlgen.setBindingName("XCORBABinding");
            idlgen.setOutputFile("atype.idl");
            idlgen.generateIDL(model);

            Anonstring str = (Anonstring)mapType.getStructOrExceptionOrUnion().get(2);
            assertEquals("Name is incorrect for Array Type", "X._1_S",
                         str.getName());
            assertEquals("Type is incorrect for AnonString Type", "string",
                         str.getType().getLocalPart());
           
            Anonfixed fx = (Anonfixed)mapType.getStructOrExceptionOrUnion().get(3);
            assertEquals("Name is incorrect for Anon Array Type", "X._2_S",
                         fx.getName());
            assertEquals("Type is incorrect for AnonFixed Type", "decimal",
                         fx.getType().getLocalPart());
           
            Struct struct = (Struct)mapType.getStructOrExceptionOrUnion().get(1);
            assertEquals("Name is incorrect for Anon Array Type", "X.S",
                         struct.getName());           
            assertEquals("Type is incorrect for Struct Type", "X.S",
                         struct.getType().getLocalPart());
            assertEquals("Name for first Struct Member Type is incorrect", "str",
View Full Code Here

Examples of org.apache.schemas.yoko.bindings.corba.TypeMappingType

            assertEquals(3, typemap.getElementsByTagName("corba:anonsequence").getLength());           
            assertEquals(2, typemap.getElementsByTagName("corba:anonarray").getLength());
            assertEquals(1, typemap.getElementsByTagName("corba:array").getLength());
            assertEquals(2, typemap.getElementsByTagName("corba:struct").getLength());           
           
            TypeMappingType mapType = (TypeMappingType)model.getExtensibilityElements().get(0);           

            WSDLToIDLAction idlgen = new WSDLToIDLAction();
            idlgen.setBindingName("XCORBABinding");
            idlgen.setOutputFile("atype.idl");
            idlgen.generateIDL(model);

            Array arr = (Array)mapType.getStructOrExceptionOrUnion().get(0);           
            assertEquals("ElementType is incorrect for Array Type", "X._5_A",
                         arr.getElemtype().getLocalPart());
           
            Anonarray arr2 = (Anonarray)mapType.getStructOrExceptionOrUnion().get(3);
            assertEquals("ElementType is incorrect for Anon Array Type", "X._4_A",
                         arr2.getElemtype().getLocalPart());
           
            Anonarray arr3 = (Anonarray)mapType.getStructOrExceptionOrUnion().get(2);
            assertEquals("ElementType is incorrect for Anon Array Type", "X._1_A",
                         arr3.getElemtype().getLocalPart());
           
           
            Anonsequence seq = (Anonsequence)mapType.getStructOrExceptionOrUnion().get(5);
            assertEquals("Name is incorrect for Anon Array Type", "X._1_A",
                         seq.getName());                       
            assertEquals("ElementType is incorrect for Anon Sequence Type", "X._2_A",
                         seq.getElemtype().getLocalPart());
           
           
            Anonsequence seq2 = (Anonsequence)mapType.getStructOrExceptionOrUnion().get(1);
            assertEquals("Name is incorrect for Anon Array Type", "X._2_A",
                         seq2.getName());                       
            assertEquals("ElementType is incorrect for Anon Sequence Type", "X._3_A",
                         seq2.getElemtype().getLocalPart());
           
            Anonsequence seq3 = (Anonsequence)mapType.getStructOrExceptionOrUnion().get(4);
            assertEquals("Name is incorrect for Anon Array Type", "X._3_A",
                         seq3.getName());
            assertEquals("ElementType is incorrect for Anon Sequence Type", "long",
                         seq3.getElemtype().getLocalPart());
           
View Full Code Here

Examples of org.apache.schemas.yoko.bindings.corba.TypeMappingType

    private void getAllIdlTypes() throws Exception {

        try {
            Iterator types = def.getExtensibilityElements().iterator();
            TypeMappingType typeMappingType = null;           
            if (types != null) {
                while (types.hasNext()) {                   
                    typeMappingType = (TypeMappingType)types.next();
                }
            }
            if (typeMappingType != null) {
                Iterator i = typeMappingType.getStructOrExceptionOrUnion().iterator();
                while (i.hasNext()) {
                    CorbaTypeImpl corbaTypeImpl = (CorbaTypeImpl)i.next();                               
                    findCorbaIdlType(corbaTypeImpl);
                }
            }
View Full Code Here

Examples of org.apache.schemas.yoko.bindings.corba.TypeMappingType

        CorbaTypeImpl corbaTypeImpl = null;

        try {

            Iterator types = def.getExtensibilityElements().iterator();
            TypeMappingType typeMappingType = null;
            if (types != null) {
                while (types.hasNext()) {
                    typeMappingType = (TypeMappingType)types.next();
                }
            }
            Iterator i = typeMappingType.getStructOrExceptionOrUnion().iterator();
            while (i.hasNext()) {
                CorbaTypeImpl corbaType = (CorbaTypeImpl)i.next();                              
                if (corbaType.getName().equals(qname.getLocalPart())) {                   
                    return corbaType;
                }
View Full Code Here

Examples of org.apache.schemas.yoko.bindings.corba.TypeMappingType

            String fileName = getClass().getResource("/wsdl/any.wsdl").toString();
            generator.setWsdlFile(fileName);
            generator.addInterfaceName("anyInterface");           
            Definition model = generator.generateCORBABinding();

            TypeMappingType mapType = (TypeMappingType)model.getExtensibilityElements().get(0);
            assertEquals(5, mapType.getStructOrExceptionOrUnion().size());
            Iterator i = mapType.getStructOrExceptionOrUnion().iterator();
            int strcnt = 0;
            int unioncnt = 0;
            while (i.hasNext()) {
                CorbaTypeImpl corbaType = (CorbaTypeImpl)i.next();
                if (corbaType instanceof Struct) {
View Full Code Here

Examples of org.apache.schemas.yoko.bindings.corba.TypeMappingType

    }

    public static void createCorbaTypeMap(List<CorbaTypeMap> typeMaps, List<TypeMappingType> tmTypes) {
        if (tmTypes != null) {
            for (int i = 0; i < tmTypes.size(); i++) {
                TypeMappingType tmType = tmTypes.get(i);

                CorbaTypeMap map = null;
                for (Iterator<CorbaTypeMap> it = typeMaps.iterator(); it.hasNext();) {
                    CorbaTypeMap tm = it.next();
                    if (tm.getTargetNamespace().equals(tmType.getTargetNamespace())) {
                        LOG.info("Found an existing typemap with the same namespace");
                        map = tm;
                        break;
                    }
                }

                if (map == null) {
                    map = new CorbaTypeMap(tmType.getTargetNamespace());
                    typeMaps.add(map);
                }

                LOG.info("Found typemap in WSDL (Namespace: " + tmType.getTargetNamespace() + ")");

                List<CorbaTypeImpl> types = tmType.getStructOrExceptionOrUnion();
                LOG.info("Found " + types.size() + " types defined in the typemap");
                for (Iterator<CorbaTypeImpl> it = types.iterator(); it.hasNext();) {
                    CorbaTypeImpl corbaType = it.next();                    
                    map.addType(corbaType.getName(), corbaType);
                    LOG.info("Adding type " + corbaType.getName());
View Full Code Here

Examples of org.apache.schemas.yoko.bindings.corba.TypeMappingType

        Iterator j = binding.getBindingOperations().iterator();
        while (j.hasNext()) {           
            BindingOperation bindingOperation = (BindingOperation)j.next();
            assertEquals("YCORBABinding", binding.getQName().getLocalPart());
            assertEquals(1, bindingOperation.getExtensibilityElements().size());
            TypeMappingType mapType = (TypeMappingType)model.getExtensibilityElements().get(0);
            checkFixedTypeOne(bindingOperation, mapType);
            bindingOperation = (BindingOperation)j.next();
            checkSequenceType(bindingOperation, mapType);
            bindingOperation = (BindingOperation)j.next();
            checkFixedTypeTwo(bindingOperation, mapType);
View Full Code Here

Examples of org.apache.schemas.yoko.bindings.corba.TypeMappingType

        Iterator j = binding.getBindingOperations().iterator();
        while (j.hasNext()) {           
            BindingOperation bindingOperation = (BindingOperation)j.next();
            assertEquals("YCORBABinding", binding.getQName().getLocalPart());
            assertEquals(1, bindingOperation.getExtensibilityElements().size());
            TypeMappingType mapType = (TypeMappingType)model.getExtensibilityElements().get(0);
            checkFixedTypeOne(bindingOperation, mapType);
            bindingOperation = (BindingOperation)j.next();
            checkSequenceType(bindingOperation, mapType);
            bindingOperation = (BindingOperation)j.next();
            checkFixedTypeTwo(bindingOperation, mapType);
View Full Code Here

Examples of org.apache.schemas.yoko.bindings.corba.TypeMappingType

            assertEquals(6, typemap.getElementsByTagName("corba:union").getLength());
            assertEquals(14, typemap.getElementsByTagName("corba:struct").getLength());
            assertEquals(1, typemap.getElementsByTagName("corba:enum").getLength());
            assertEquals(1, typemap.getElementsByTagName("corba:array").getLength());
           
            TypeMappingType mapType = (TypeMappingType)model.getExtensibilityElements().get(0);           

            WSDLToIDLAction idlgen = new WSDLToIDLAction();
            idlgen.setBindingName("XCORBABinding");
            idlgen.setOutputFile("nested_complex.idl");
            idlgen.generateIDL(model);
View Full Code Here

Examples of org.apache.schemas.yoko.bindings.corba.TypeMappingType

            assertNotNull(typemap);
            assertEquals(6, typemap.getElementsByTagName("corba:union").getLength());
            assertEquals(58, typemap.getElementsByTagName("corba:struct").getLength());
            assertEquals(3, typemap.getElementsByTagName("corba:sequence").getLength());
           
            TypeMappingType mapType = (TypeMappingType)model.getExtensibilityElements().get(0);           

            WSDLToIDLAction idlgen = new WSDLToIDLAction();
            idlgen.setBindingName("DerivedTypesCORBABinding");
            idlgen.setOutputFile("nested-derivedtypes.idl");
            idlgen.generateIDL(model);
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.