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

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


                }
            }

            Iterator<?> tm = model.getExtensibilityElements().iterator();
            assertTrue(tm.hasNext());
            TypeMappingType tmt = (TypeMappingType)tm.next();
            CorbaTypeMap typeMap = CorbaUtils.createCorbaTypeMap(Arrays.asList(tmt));

            assertNull("All nested anonymous types should have \"nested\" names", typeMap.getType("item"));

            // Checkstyle forces me to split the method...
View Full Code Here


        Element bindingElement = getElementNode(document, "binding");       
        assertEquals(5, bindingElement.getElementsByTagName("corba:operation").getLength());
        QName bName = new QName("http://schemas.apache.org/idl/fixed.idl",
                                "YCORBABinding", "tns");
        Binding binding = model.getBinding(bName);
        TypeMappingType mapType = (TypeMappingType)model.getExtensibilityElements().get(0);
        Map<String, CorbaTypeImpl> tmap = new HashMap<String, CorbaTypeImpl>();
        for (CorbaTypeImpl type : mapType.getStructOrExceptionOrUnion()) {
            tmap.put(type.getName(), type);
        }
       
        Iterator j = binding.getBindingOperations().iterator();
        while (j.hasNext()) {           
View Full Code Here

    }

    private void getAllIdlTypes() throws Exception {

        try {
            TypeMappingType typeMappingType = getTypeMappingType();
            if (typeMappingType != null) {
                for (CorbaTypeImpl corbaTypeImpl
                    : typeMappingType.getStructOrExceptionOrUnion()) {                               
                    findCorbaIdlType(corbaTypeImpl);
                }
            }
        } catch (Exception ex) {
            ex.printStackTrace();
View Full Code Here

    private CorbaTypeImpl getCorbaType(QName qname) throws Exception {   
        CorbaTypeImpl corbaTypeImpl = null;

        try {
            TypeMappingType typeMappingType = getTypeMappingType();
            if (typeMappingType != null) {
                for (CorbaTypeImpl corbaType : typeMappingType.getStructOrExceptionOrUnion()) {
                    if (corbaType.getName().equals(qname.getLocalPart())) {                   
                        return corbaType;
                    }
                }
            }
View Full Code Here

        types.addExtensibilityElement(wsdlSchema);
    }

    public TypeMappingType createCorbaTypeMap(Definition definition, String corbatypemaptns)
        throws WSDLException {
        TypeMappingType typeMap = (TypeMappingType)definition.getExtensionRegistry()
            .createExtension(Definition.class, CorbaConstants.NE_CORBA_TYPEMAPPING);
        if (corbatypemaptns == null) {
            typeMap.setTargetNamespace(definition.getTargetNamespace() + "/"
                                       + CorbaConstants.NS_CORBA_TYPEMAP);
        } else {
            typeMap.setTargetNamespace(corbatypemaptns);
        }
        definition.addExtensibilityElement(typeMap);
        return typeMap;
    }
View Full Code Here

            Element typemap = getElementNode(document, "corba:typeMapping");           
            assertNotNull(typemap);
            assertEquals(2, typemap.getElementsByTagName("corba:union").getLength());
            assertEquals(1, typemap.getElementsByTagName("corba:struct").getLength());           
           
            TypeMappingType mapType = (TypeMappingType)model.getExtensibilityElements().get(0);           

            WSDLToIDLAction idlgen = new WSDLToIDLAction();
            idlgen.setBindingName("NillableCORBABinding");
            idlgen.setOutputFile("nillable.idl");
            idlgen.generateIDL(model);
           
            Union un = (Union)mapType.getStructOrExceptionOrUnion().get(2);
            assertEquals("Name is incorrect for Union Type", "long_nil",
                         un.getName());
            assertEquals("Type is incorrect for Union Type", "PEl",
                         un.getType().getLocalPart());
            Unionbranch unbranch = un.getUnionbranch().get(0);
View Full Code Here

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

            WSDLToIDLAction idlgen = new WSDLToIDLAction();
            idlgen.setBindingName("TypeInheritanceCORBABinding");
            idlgen.setOutputFile("typeInherit.idl");
            idlgen.generateIDL(model);

            List<CorbaTypeImpl> types = mapType.getStructOrExceptionOrUnion();
            for (int i = 0; i < types.size(); i++) {
                CorbaTypeImpl type = types.get(i);
                if ("Type5SequenceStruct".equals(type.getName())) {
                    assertTrue("Name is incorrect for Type5SequenceStruct Type", type instanceof Struct);
                    assertEquals("Type is incorrect for AnonSequence Type", "Type5",
View Full Code Here

            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);

            List<CorbaTypeImpl> types = mapType.getStructOrExceptionOrUnion();
            for (int i = 0; i < types.size(); i++) {
                CorbaTypeImpl type = types.get(i);
                if (type instanceof Anonstring) {
                    Anonstring str = (Anonstring)type;
                    assertEquals("Name is incorrect for Array Type", "X._1_S",
View Full Code Here

            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);
            Map<String, CorbaTypeImpl> tmap = new HashMap<String, CorbaTypeImpl>();
            for (CorbaTypeImpl type : mapType.getStructOrExceptionOrUnion()) {
                tmap.put(type.getName(), type);
            }


            WSDLToIDLAction idlgen = new WSDLToIDLAction();
View Full Code Here

            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

TOP

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

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.