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

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


    public static CorbaTypeImpl processObject(Definition definition, XmlSchemaComplexType complex,
                                              XmlSchemaAnnotation annotation, QName typeName,
                                              QName defaultName, String idlNamespace)
        throws Exception {
        CorbaTypeImpl corbaTypeImpl = null;

        if (annotation != null) {
            for (XmlSchemaAnnotationItem item : annotation.getItems()) {
                XmlSchemaAppInfo appInfo = (XmlSchemaAppInfo)item;
                if (appInfo != null) {
View Full Code Here


        return corbaTypeImpl;
    }

    public static CorbaTypeImpl mapToArray(QName name, QName schematypeName, QName arrayType,
                                           QName elName, int bound, boolean anonymous) {
        CorbaTypeImpl corbatype = null;

        //schematypeName = checkPrefix(schematypeName);

        if (!anonymous) {
            //Create an Array
View Full Code Here

        return corbatype;
    }

    public static CorbaTypeImpl mapToSequence(QName name, QName schematypeName, QName arrayType,
                                              QName elName, int bound, boolean anonymous) {
        CorbaTypeImpl corbaTypeImpl = null;

        //schematypeName = checkPrefix(schematypeName);
        if (!anonymous) {
            // Create a Sequence
            Sequence corbaSeq = new Sequence();
View Full Code Here

    }

    private MemberType processAllMember(XmlSchemaAll all, QName defaultName,
        QName schemaTypeName) throws Exception {
   
        CorbaTypeImpl corbatype = processAllType(all, defaultName, schemaTypeName);
        MemberType member = new MemberType();
        member.setName(corbatype.getQName().getLocalPart());
        member.setIdltype(corbatype.getQName());
        if (corbatype.isSetQualified() && corbatype.isQualified()) {
            member.setQualified(true);
        }
        return member;
    }
View Full Code Here

        } else {
            choicename = createQNameCorbaNamespace(schemaTypeName.getLocalPart());
        }
        choicename = checkPrefix(choicename);

        CorbaTypeImpl corbatype = createUnion(choicename, choice, defaultName, schemaTypeName);
        String repoId = REPO_STRING + corbatype.getQName().getLocalPart().replace('.', '/')
            + IDL_VERSION;
        ((Union)corbatype).setRepositoryID(repoId);                               

        if (!(choice.getMaxOccurs() == 1) || !(choice.getMinOccurs() == 1)) {
            QName name = createQNameTargetNamespace(corbatype.getQName().getLocalPart() + "Array");
            CorbaTypeImpl arrayType =
                createArray(name, corbatype.getQName(), corbatype.getQName(),
                            choice.getMaxOccurs(), choice.getMinOccurs(), false);
           
            if (arrayType != null
                && !isDuplicate(arrayType)) {
View Full Code Here

        }
        return corbatype;
    }
   
    private CorbaTypeImpl processLocalElement(XmlSchemaElement element, String uri) throws Exception {
        CorbaTypeImpl membertype = new CorbaTypeImpl();
        CorbaTypeImpl memtype = new CorbaTypeImpl();

        XmlSchemaType schemaType = element.getSchemaType();
        // workaround for now - sent bug to WSCommons - the elements
        // QName should have its namespace included.
        QName schemaName = element.getQName();
        if (schemaName == null) {
            schemaName = element.getRefName();
            schemaType = findSchemaType(schemaName);
        }
        if (schemaName.getNamespaceURI().equals("")) {
            schemaName = new QName(uri, schemaName.getLocalPart());               
        }
        QName elemName = schemaName;
        boolean elementQualified = getElementQualification(element, uri);
        if (!elementQualified) {
            elemName = new QName("", elemName.getLocalPart());
        }

        QName memName = null;
        if (element.isNillable()) {
            CorbaTypeImpl elemtype = convertSchemaToCorbaType(schemaType, elemName,
                                                              schemaType, null, true);
            QName name = createQNameTargetNamespace(elemtype.getQName().getLocalPart() + "_nil");
            QName elName = checkPrefix(elemName);
            if (elName ==  null) {
                elName = createQNameTargetNamespace(elemName.getLocalPart());
            }
            memtype = createNillableUnion(elName,
                                          name,
                                          elemtype.getQName(),
                                          elementQualified);
            memName = createQNameCorbaNamespace(memtype.getQName().getLocalPart());
                                   
            if (memtype != null
                && !isDuplicate(memtype)) {
                typeMappingType.getStructOrExceptionOrUnion().add(memtype);
            }
            membertype.setQName(memName);
            membertype.setName(memtype.getName());
            membertype.setType(memtype.getType());           
        } else if (schemaType != null) {
            XmlSchemaType st = schemaType;
            boolean anonymous = WSDLTypes.isAnonymous(st.getName());           
            membertype = convertSchemaToCorbaType(st, elemName, st, null, anonymous);
        } else if (element.getSchemaTypeName() != null) {
            QName name = checkPrefix(element.getSchemaTypeName());
            membertype = getLocalType(name);
        }
        if (membertype == null) {
            return null;
        }

        if (!(element.getMaxOccurs() == 1) || !(element.getMinOccurs() == 1)) {
            QName name = createQNameCorbaNamespace(getModulePrefix(membertype)
                                                    + elemName.getLocalPart() + "Array");           
            CorbaTypeImpl arraytype = null;
            if (memName != null) {
                arraytype = createArray(name, schemaName, memName, elemName,
                                        element.getMaxOccurs(), element.getMinOccurs(), false);
            } else {
                arraytype = createArray(name, schemaName, membertype.getQName(), elemName,
                                        element.getMaxOccurs(), element.getMinOccurs(), false);
            }
                       
            membertype.setName(arraytype.getName());
            membertype.setQName(arraytype.getQName());
            membertype.setType(arraytype.getType());
                       
            if (arraytype != null
                && !isDuplicate(arraytype)) {
                typeMappingType.getStructOrExceptionOrUnion().add(arraytype);              
            }                  
View Full Code Here

   
    protected CorbaTypeImpl processSequenceType(XmlSchemaSequence seq,
                                                QName defaultName, QName schemaTypeName)
        throws Exception {
        CorbaTypeImpl type = null;
        QName seqName = null;
        if (schemaTypeName == null) {
            seqName = createQNameCorbaNamespace(defaultName.getLocalPart() + "SequenceStruct");       
        } else {       
            seqName = createQNameCorbaNamespace(schemaTypeName.getLocalPart() + "SequenceStruct");
        }
       
        schemaTypeName = checkPrefix(schemaTypeName);
        Struct struct = new Struct();      
        struct.setName(seqName.getLocalPart());
        struct.setQName(seqName);
        struct.setRepositoryID(REPO_STRING + seqName.getLocalPart().replace('.', '/') + IDL_VERSION);
        struct.setType(schemaTypeName);
       
        List members = processContainerAsMembers(seq, defaultName, schemaTypeName);
        for (Iterator iterator = members.iterator(); iterator.hasNext();) {
            MemberType memberType = (MemberType)iterator.next();
            struct.getMember().add(memberType);           
        }       
       
        type = struct;
                             
        if (!"1".equals(seq.getMaxOccurs()) || !"1".equals(seq.getMinOccurs())) {
            QName name = createQNameTargetNamespace(type.getQName().getLocalPart() + "Array");           
            CorbaTypeImpl atype = createArray(name, type.getQName(), type.getQName(),
                                              seq.getMaxOccurs(), seq.getMinOccurs(), false);
           
            if (atype != null
                && !isDuplicate(atype)) {
                typeMappingType.getStructOrExceptionOrUnion().add(atype);              
View Full Code Here

        return type;
    }
   
    private CorbaTypeImpl processPrimitiveType(QName typeName) {
        QName qName = createQNameXmlSchemaNamespace(typeName.getLocalPart());       
        CorbaTypeImpl corbatype = (CorbaTypeImpl)CORBAPRIMITIVEMAP.get(qName);
        if (corbatype == null) {
            //REVISIT, bravi, not an ideal way to add the fixed & octet type to the typemap.
            CorbaTypeImpl type = null;
            if (typeName.equals(W3CConstants.NT_SCHEMA_DECIMAL)) {
                QName name = new QName(idlNamespace, "fixed_1");
                type = WSDLTypes.getFixedCorbaType(name, typeName, 31, 6);
                corbatype = WSDLTypes.getFixedCorbaType(name, typeName, 31, 6);
            } else if (typeName.equals(W3CConstants.NT_SCHEMA_BASE64)
View Full Code Here

            XmlSchemaAttribute attribute = (XmlSchemaAttribute)attrObj;
            QName attrName = attribute.getQName();
            if (attrName.getNamespaceURI().equals("")) {
                attrName = new QName(uri, attrName.getLocalPart());
            }
            CorbaTypeImpl membertype = null;
            boolean attrQualified = getAttributeQualification(attribute, uri);
            if (attribute.getUse().getValue().equals("none")
                || attribute.getUse().getValue().equals(W3CConstants.USE_OPTIONAL)) {               
                CorbaTypeImpl attType = null;
                if (attribute.getSchemaType() != null) {
                    // REVISIT, edell bug in XmlSchema 1.2.
                    // https://issues.apache.org/jira/browse/WSCOMMONS-208
                    attType = convertSchemaToCorbaType(attribute.getSchemaType(),
                                                       checkPrefix(attrName),
                                                       attribute.getSchemaType(),
                                                       null, true);                  
                    if (attType != null) {
                        QName typeName = attType.getQName();
                        if (!isDuplicate(attType)) {
                            typeMappingType.getStructOrExceptionOrUnion().add(attType);
                        }
                        QName name =  createQNameTargetNamespace(typeName.getLocalPart() + "_nil");
                        membertype = createNillableUnion(name,
                                                         checkPrefix(attrName),
                                                         createQNameCorbaNamespace(typeName.getLocalPart()),
                                                         attrQualified);
                    }
                } else {
                    attType = processPrimitiveType(attribute.getSchemaTypeName());
                    //REVISIT, bravi, attType is null for the wsaddr type
                    //{http://www.w3.org/2005/08/addressing}RelationshipTypeOpenEnum
                    if (attType != null) {
                        QName name =  createQNameTargetNamespace(attType.getQName().getLocalPart() + "_nil");
                        //REVISIT, Edell - bug in Xmlschema 1.2
                        // https://issues.apache.org/jira/browse/WSCOMMONS-208
                        membertype = createNillableUnion(name,
                                                         checkPrefix(attrName),
                                                         attType.getQName(),
                                                         attrQualified);
                    }

                }
                if (membertype != null) {
View Full Code Here

            name = stype.getQName().getLocalPart();
        }
        if (schemaTypeName == null) {
            schemaTypeName = createQNameTargetNamespace(name);
        }
        CorbaTypeImpl result = convertSchemaToCorbaType(schemaType, schemaTypeName,
                                                        schemaType, null, false);

        result.setQualified(getElementQualification(stype, uri));
        return result;
    }
View Full Code Here

TOP

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

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.