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

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


        QName arrayElementType = null;
        long arrayBound = 0;
        CorbaTypeImpl baseType = obj.getType();
        QName elementName;
        if (baseType instanceof Array) {
            Array arrayType = (Array)baseType;
            arrayElementType = arrayType.getElemtype();
            arrayBound = arrayType.getBound();
            elementName = arrayType.getElemname();
        } else {
            Anonarray anonArrayType = (Anonarray)baseType;
            arrayElementType = anonArrayType.getElemtype();
            arrayBound = anonArrayType.getBound();
            elementName = anonArrayType.getElemname();
View Full Code Here


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

            Array arr = (Array)tmap.get("X.A");
            assertNotNull(arr);
            assertEquals("ElementType is incorrect for Array Type", "X._5_A",
                         arr.getElemtype().getLocalPart());
           
            Anonarray arr2 = (Anonarray)tmap.get("X._5_A");
            assertNotNull(arr2);
            assertEquals("ElementType is incorrect for Anon Array Type", "X._4_A",
                         arr2.getElemtype().getLocalPart());
View Full Code Here

        //schematypeName = checkPrefix(schematypeName);

        if (!anonymous) {
            //Create an Array
            Array corbaArray = new Array();
            corbaArray.setName(name.getLocalPart());
            corbaArray.setType(schematypeName);
            corbaArray.setElemtype(arrayType);
            corbaArray.setElemname(elName);
            corbaArray.setBound(bound);
            corbaArray.setRepositoryID(WSDLToCorbaHelper.REPO_STRING
                                       + name.getLocalPart().replace('.', '/')
                                       + WSDLToCorbaHelper.IDL_VERSION);
            corbaArray.setQName(name);
            corbatype = corbaArray;
        } else {
            //Create an Anonymous Array
            Anonarray corbaArray = new Anonarray();
            corbaArray.setName(name.getLocalPart());
            corbaArray.setType(schematypeName);
            corbaArray.setElemtype(arrayType);
            corbaArray.setElemname(elName);
            corbaArray.setBound(bound);
            corbaArray.setQName(name);
            corbatype = corbaArray;
        }
        return corbatype;
    }
View Full Code Here

        return complexType;
    }

    private Array generateCorbaArray(Scope scopedName, Long size,
                                     CorbaType type, XmlSchemaType stype, Scope fQName) {
        Array array = new Array();
        array.setQName(new QName(typeMap.getTargetNamespace(), scopedName.toString()));
        array.setBound(size);
        array.setRepositoryID(scopedName.toIDLRepositoryID());
        array.setType(stype.getQName());
        //REVISIT, if we add qualification option, then change below.
        array.setElemname(new QName("", ELEMENT_NAME));
        if (type != null) {
            array.setElemtype(type.getQName());
        } else {
            ArrayDeferredAction arrayAction =
                new ArrayDeferredAction(array);
            wsdlVisitor.getDeferredActions().add(fQName, arrayAction);
        }
View Full Code Here

        Sequence p2 = (Sequence)typeMap.getType("UnboundedArray");
        assertEquals(new QName("", "item"), p2.getElemname());
        assertEquals(new QName(CorbaConstants.NU_WSDL_CORBA, "string"), p2.getElemtype());
        assertTrue(p2.isWrapped());

        Array p3 = (Array)typeMap.getType("p3-unwrapped-arrayArray");
        assertEquals(new QName("", "p3-unwrapped-array"), p3.getElemname());
        assertEquals(new QName(CorbaConstants.NU_WSDL_CORBA, "string"), p3.getElemtype());
        Array p3q = (Array)typeMap.getType("p3-unwrapped-array-qArray");
        assertEquals(new QName("http://schemas.apache.org/idltypes/anon.idl", "p3-unwrapped-array-q"),
            p3q.getElemname());
        assertFalse(p3.isWrapped());

        Array p4 = (Array)typeMap.getType("FixedArray");
        assertEquals(new QName("", "item"), p4.getElemname());
        assertEquals(new QName(CorbaConstants.NU_WSDL_CORBA, "string"), p4.getElemtype());
        assertTrue(p4.isWrapped());

        Sequence p5 = (Sequence)typeMap.getType("p5-anonymous-unwrapped-sequenceArray");
        assertEquals(new QName("", "p5-anonymous-unwrapped-sequence"), p5.getElemname());
        assertEquals(new QName(CorbaConstants.NU_WSDL_CORBA, "string"), p5.getElemtype());
        Sequence p5q = (Sequence)typeMap.getType("p5-anonymous-unwrapped-sequence-qArray");
        assertEquals(new QName("http://schemas.apache.org/idltypes/anon.idl", "p5-anonymous-unwrapped-sequence-q"),
            p5q.getElemname());
        assertFalse(p5.isWrapped());

        Anonsequence p6 = (Anonsequence)typeMap.getType("MixedArrayType.p6-anonymous-wrapped-sequenceType");
        assertEquals(new QName("", "item"), p6.getElemname());
        assertEquals(new QName(CorbaConstants.NU_WSDL_CORBA, "string"), p6.getElemtype());
        assertFalse(p6.isQualified());
        assertTrue(p6.isWrapped());
        Anonsequence p6q = (Anonsequence)typeMap.getType("MixedArrayType.p6-anonymous-wrapped-sequence-qType");
        assertEquals(new QName("http://schemas.apache.org/idltypes/anon.idl", "item"), p6q.getElemname());
        assertEquals(new QName(CorbaConstants.NU_WSDL_CORBA, "string"), p6q.getElemtype());
        assertTrue(p6q.isQualified());
        assertTrue(p6q.isWrapped());

        Array p7 = (Array)typeMap.getType("p7-anonymous-unwrapped-arrayArray");
        assertEquals(new QName("", "p7-anonymous-unwrapped-array"), p7.getElemname());
        assertEquals(new QName(CorbaConstants.NU_WSDL_CORBA, "string"), p7.getElemtype());
        assertFalse(p7.isQualified());
        assertFalse(p7.isWrapped());
        Array p7q = (Array)typeMap.getType("p7-anonymous-unwrapped-array-qArray");
        assertEquals(new QName("http://schemas.apache.org/idltypes/anon.idl", "p7-anonymous-unwrapped-array-q"),
            p7q.getElemname());
        assertEquals(new QName(CorbaConstants.NU_WSDL_CORBA, "string"), p7q.getElemtype());
        assertTrue(p7q.isQualified());
        assertFalse(p7q.isWrapped());

        Anonarray p8 = (Anonarray)typeMap.getType("MixedArrayType.p8-anonymous-wrapped-arrayType");
        assertEquals(new QName("", "item"), p8.getElemname());
        assertEquals(new QName(CorbaConstants.NU_WSDL_CORBA, "string"), p8.getElemtype());
        assertFalse(p8.isQualified());
View Full Code Here

     */
    private void assertMixedArraysMappingDifficultArrays(CorbaTypeMap typeMap) {
        String corbaTm = "http://schemas.apache.org/idl/anon.idl/corba/typemap/";

        // p11 is unwrapped, so the same case as p9
        Array p11 = (Array)typeMap.getType("MixedArrayType.p11-anonymous-unwrapped-non-primitive-arrayArray");
        assertEquals(new QName("", "p11-anonymous-unwrapped-non-primitive-array"), p11.getElemname());
        assertEquals(
            new QName(corbaTm, "MixedArrayType.p11-anonymous-unwrapped-non-primitive-array"),
            p11.getElemtype());
        assertFalse(p11.isQualified());
        assertFalse(p11.isWrapped());
        Struct p11item = (Struct)typeMap.getType("MixedArrayType.p11-anonymous-unwrapped-non-primitive-array");
        assertEquals(1, p11item.getMember().size());
        assertEquals(new QName(CorbaConstants.NU_WSDL_CORBA, "string"), p11item.getMember().get(0).getIdltype());
        assertEquals("item", p11item.getMember().get(0).getName());
        Array p11q = (Array)typeMap.getType("MixedArrayType.p11-anonymous-unwrapped-non-primitive-array-qArray");
        assertEquals(
            new QName("http://schemas.apache.org/idltypes/anon.idl",
                      "p11-anonymous-unwrapped-non-primitive-array-q"),
            p11q.getElemname());
        assertEquals(
            new QName(corbaTm, "MixedArrayType.p11-anonymous-unwrapped-non-primitive-array-q"),
            p11q.getElemtype());
        assertTrue(p11q.isQualified());
        assertFalse(p11q.isWrapped());
        Struct p11qitem = (Struct)typeMap.getType("MixedArrayType.p11-anonymous-unwrapped-non-primitive-array-q");
        assertEquals(1, p11qitem.getMember().size());
        assertEquals(new QName(CorbaConstants.NU_WSDL_CORBA, "string"), p11qitem.getMember().get(0).getIdltype());
        assertEquals("item", p11qitem.getMember().get(0).getName());

View Full Code Here

        //schematypeName = checkPrefix(schematypeName);

        if (!anonymous) {
            //Create an Array
            Array corbaArray = new Array();
            corbaArray.setName(name.getLocalPart());
            corbaArray.setType(schematypeName);
            corbaArray.setElemtype(arrayType);
            corbaArray.setElemname(elName);
            corbaArray.setBound(bound);
            corbaArray.setRepositoryID(WSDLToCorbaHelper.REPO_STRING
                                       + name.getLocalPart().replace('.', '/')
                                       + WSDLToCorbaHelper.IDL_VERSION);
            corbaArray.setQName(name);
            corbatype = corbaArray;
        } else {
            //Create an Anonymous Array
            Anonarray corbaArray = new Anonarray();
            corbaArray.setName(name.getLocalPart());
            corbaArray.setType(schematypeName);
            corbaArray.setElemtype(arrayType);
            corbaArray.setElemname(elName);
            corbaArray.setBound(bound);
            corbaArray.setQName(name);
            corbatype = corbaArray;
        }
        return corbatype;
    }
View Full Code Here

    }
   
    private IdlType createArray(CorbaTypeImpl ctype, IdlScopeBase scope, String local)
        throws Exception {
        IdlType idlType = null;
        Array s = (Array)ctype;
        IdlType base = findType(s.getElemtype());       
        int bound = (int)s.getBound();
        idlType = IdlArray.create(scope, local, base, bound);
        scope.addToScope(idlType);
        return idlType;
    }
View Full Code Here

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

            Array arr = (Array)tmap.get("X.A");
            assertNotNull(arr);
            assertEquals("ElementType is incorrect for Array Type", "X._5_A",
                         arr.getElemtype().getLocalPart());
           
            Anonarray arr2 = (Anonarray)tmap.get("X._5_A");
            assertNotNull(arr2);
            assertEquals("ElementType is incorrect for Anon Array Type", "X._4_A",
                         arr2.getElemtype().getLocalPart());
View Full Code Here

           
        //schematypeName = checkPrefix(schematypeName);

        if (!anonymous) {
            //Create an Array
            Array corbaArray = new Array();
            corbaArray.setName(name.getLocalPart());
            corbaArray.setType(schematypeName);
            corbaArray.setElemtype(arrayType);
            corbaArray.setElemname(elName);
            corbaArray.setBound(bound);
            corbaArray.setRepositoryID(WSDLToCorbaHelper.REPO_STRING
                                       + name.getLocalPart().replace('.', '/')
                                       + WSDLToCorbaHelper.IDL_VERSION);
            corbaArray.setQName(name);           
            corbatype = corbaArray;
        } else {
            //Create an Anonymous Array
            Anonarray corbaArray = new Anonarray();
            corbaArray.setName(name.getLocalPart());
            corbaArray.setType(schematypeName);           
            corbaArray.setElemtype(arrayType);
            corbaArray.setElemname(elName);
            corbaArray.setBound(bound);
            corbaArray.setQName(name);                       
            corbatype = corbaArray;
        }          
        return corbatype;
    }
View Full Code Here

TOP

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

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.