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

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


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

            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

            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

                                                       XmlSchema currentSchema,
                                                       AST node,
                                                       WSDLASTVisitor wsdlVisitor,
                                                       VisitorTypeHolder holder) {
        XmlSchemaCollection schemas = wsdlVisitor.getSchemas();
        TypeMappingType typeMap = wsdlVisitor.getTypeMap();
        ModuleToNSMapper mapper = wsdlVisitor.getModuleToNSMapper();
        WSDLSchemaManager manager = wsdlVisitor.getManager();
       
        Scope scopedName = scope;
        String name = node.toString();
View Full Code Here

    private static boolean findScopeSchemaType(Scope scopedName, XmlSchema schemaRef,
                                           WSDLASTVisitor wsdlVisitor,
                                           VisitorTypeHolder holder) {
       
        XmlSchemaCollection schemas = wsdlVisitor.getSchemas();
        TypeMappingType typeMap = wsdlVisitor.getTypeMap();
        ModuleToNSMapper mapper = wsdlVisitor.getModuleToNSMapper();
        WSDLSchemaManager manager = wsdlVisitor.getManager();

        boolean result = findNonSchemaType(scopedName.toString(), wsdlVisitor, holder);
        if (!result) {
View Full Code Here

    protected static boolean findNonSchemaType(String name,
                                               WSDLASTVisitor wsdlVisitor,
                                               VisitorTypeHolder holder) {
        boolean result = false;
        TypeMappingType typeMap = wsdlVisitor.getTypeMap();
        XmlSchemaCollection schemas = wsdlVisitor.getSchemas();

        QName qname = new QName(typeMap.getTargetNamespace(), name);
        CorbaTypeImpl corbaType = findCorbaType(typeMap, qname);
        if (corbaType != null) {
            if (corbaType instanceof Alias) {
                result = true;
                if (holder != null) {
View Full Code Here

    protected static void populateAliasSchemaType(CorbaTypeImpl corbaType,
                                                  WSDLASTVisitor wsdlVisitor,
                                                  VisitorTypeHolder holder) {
        XmlSchemaCollection schemas = wsdlVisitor.getSchemas();
        TypeMappingType typeMap = wsdlVisitor.getTypeMap();
        holder.setCorbaType(corbaType);
        Alias alias = (Alias) corbaType;
        //loop through alias base types, till you get a non-alias corba type
        CorbaTypeImpl type = findCorbaType(typeMap, alias.getBasetype());
        while ((type != null) && (type instanceof Alias)) {
View Full Code Here

                                                       XmlSchema currentSchema,
                                                       AST node,
                                                       WSDLASTVisitor wsdlVisitor,
                                                       VisitorTypeHolder holder) {
        XmlSchemaCollection schemas = wsdlVisitor.getSchemas();
        TypeMappingType typeMap = wsdlVisitor.getTypeMap();
        ModuleToNSMapper mapper = wsdlVisitor.getModuleToNSMapper();
        WSDLSchemaManager manager = wsdlVisitor.getManager();
       
        Scope scopedName = new Scope(scope, node);
        String name = node.toString();
View Full Code Here

    private static boolean findScopeSchemaType(Scope scopedName, XmlSchema schemaRef,
                                           WSDLASTVisitor wsdlVisitor,
                                           VisitorTypeHolder holder) {
       
        XmlSchemaCollection schemas = wsdlVisitor.getSchemas();
        TypeMappingType typeMap = wsdlVisitor.getTypeMap();
        ModuleToNSMapper mapper = wsdlVisitor.getModuleToNSMapper();
        WSDLSchemaManager manager = wsdlVisitor.getManager();

        boolean result = findNonSchemaType(scopedName.toString(), wsdlVisitor, holder);
        if (!result) {
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.