Examples of CorbaType


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

                                                     wsdlVisitor,
                                                     identifierNode);
        typesVisitor.visit(typeDeclaratorNode);

        XmlSchemaType schemaType = typesVisitor.getSchemaType();
        CorbaType corbaType = typesVisitor.getCorbaType();
        Scope fullyQualifiedName = typesVisitor.getFullyQualifiedName();
        Scope typedefScope = new Scope(getScope(), identifierNode);
       
        if (SequenceVisitor.accept(typeDeclaratorNode)
            || FixedVisitor.accept(typeDeclaratorNode)) {
View Full Code Here

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

        restriction.getFacets().add(maxLengthFacet);
        simpleType.setContent(restriction);

        setSchemaType(simpleType);

        CorbaType anon = null;
        if (stringNode.getType() == IDLTokenTypes.LITERAL_string) {
            // corba:anonstring
            Anonstring anonstring = new Anonstring();
            anonstring.setQName(new QName(typeMap.getTargetNamespace(), stringScopedName.toString()));
            anonstring.setBound(new Long(boundNode.toString()));
View Full Code Here

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

        setSchemaType(simpleType);

        Scope anonstringScopedName = new Scope(getScope(), "_Anon1_" + stringScopedName.tail());
        String anonstringName = anonstringScopedName.toString();
        CorbaType anon = null;
        if (stringNode.getType() == IDLTokenTypes.LITERAL_string) {
            // corba:anonstring
            Anonstring anonstring = new Anonstring();
            anonstring.setQName(new QName(typeMap.getTargetNamespace(), anonstringName));
            anonstring.setBound(new Long(boundNode.toString()));
            anonstring.setType(simpleType.getQName());

            anon = anonstring;

        } else if (stringNode.getType() == IDLTokenTypes.LITERAL_wstring) {
            // corba:anonwstring
            Anonwstring anonwstring = new Anonwstring();
            anonwstring.setQName(new QName(typeMap.getTargetNamespace(), anonstringName));
            anonwstring.setBound(new Long(boundNode.toString()));
            anonwstring.setType(simpleType.getQName());

            anon = anonwstring;

        } else {
            // should never get here
            throw new RuntimeException("StringVisitor attempted to visit an invalid node");
        }

        // add corba:anonstring
        typeMap.getStructOrExceptionOrUnion().add(anon);

        // corba:alias
        Alias alias = new Alias();
        alias.setQName(new QName(typeMap.getTargetNamespace(), stringScopedName.toString()));
        alias.setBasetype(anon.getQName());
        alias.setType(simpleType.getQName());
        alias.setRepositoryID(stringScopedName.toIDLRepositoryID());

        // add corba:alias
        setCorbaType(alias);
View Full Code Here

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

        // schema type
        setSchemaType(schemas.getTypeByQName(Constants.XSD_STRING));


        // corba type
        CorbaType corbaString = new CorbaType();
        if (stringNode.getType() == IDLTokenTypes.LITERAL_string) {
            corbaString.setQName(CorbaConstants.NT_CORBA_STRING);
            corbaString.setName(CorbaConstants.NT_CORBA_STRING.getLocalPart());
        } else if (stringNode.getType() == IDLTokenTypes.LITERAL_wstring) {
            corbaString.setQName(CorbaConstants.NT_CORBA_WSTRING);
            corbaString.setName(CorbaConstants.NT_CORBA_WSTRING.getLocalPart());
        } else {
            // should never get here
            throw new RuntimeException("StringVisitor attempted to visit an invalid node");
        }
        corbaString.setType(Constants.XSD_STRING);

        setCorbaType(corbaString);
    }
View Full Code Here

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

        // <scoped_name> ::= <identifier>
        //                 | :: <identifier>
        //                 | <scoped_name> "::" <identifier>

        XmlSchemaType stype = null;
        CorbaType ctype = null;       
        if (PrimitiveTypesVisitor.accept(node)) {
            // primitive type           
            PrimitiveTypesVisitor primitiveVisitor =
                new PrimitiveTypesVisitor(null, definition, schema, schemas);
            primitiveVisitor.visit(node);
View Full Code Here

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

    private static CorbaType getCorbaSchemaType(XmlSchema xmlSchema,
                                                    TypeMappingType typeMap,
                                                    XmlSchemaType stype,
                                                    Scope scopedName) {      
        CorbaType ctype = null;
        if (stype.getQName().equals(Constants.XSD_STRING)) {
            ctype = new CorbaType();
            ctype.setName(CorbaConstants.NT_CORBA_STRING.getLocalPart());
            ctype.setQName(CorbaConstants.NT_CORBA_STRING);
            ctype.setType(Constants.XSD_STRING);
        } else {                   
            QName qname = stype.getQName();
            ctype = findCorbaTypeForSchemaType(typeMap, qname, scopedName);
        }
        return ctype;
View Full Code Here

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

   
   
    public static CorbaType findCorbaTypeForSchemaType(TypeMappingType typeMap,
                                                           QName schemaTypeName,
                                                           Scope scopedName) {
        CorbaType result = null;
        for (CorbaType type : typeMap.getStructOrExceptionOrUnion()) {        
            if ((type instanceof Sequence)
                || (type instanceof Array)
                || (type.getType() == null)
                || (type instanceof Anonsequence)
View Full Code Here

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

        }
        return result;
   

    public static CorbaType findCorbaType(TypeMappingType typeMap, QName typeName) {
        CorbaType result = null;
        for (CorbaType type : typeMap.getStructOrExceptionOrUnion()) {
            if (type.getQName().equals(typeName)) {
                result = type;
                break;
            }
View Full Code Here

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

        boolean result = false;
        TypeMappingType typeMap = wsdlVisitor.getTypeMap();
        XmlSchemaCollection schemas = wsdlVisitor.getSchemas();

        QName qname = new QName(typeMap.getTargetNamespace(), name);
        CorbaType corbaType = findCorbaType(typeMap, qname);
        if (corbaType != null) {
            if (corbaType instanceof Alias) {
                result = true;
                if (holder != null) {
                    populateAliasSchemaType(corbaType, wsdlVisitor, holder);
                }
            } else if (((corbaType instanceof Sequence) || (corbaType instanceof Anonsequence))
                       && ((corbaType.getType().equals(Constants.XSD_BASE64))
                           || (corbaType.getType().equals(Constants.XSD_BASE64)))) {
                //special case of sequence of octets
                result = true;
                if (holder != null) {
                    holder.setCorbaType(corbaType);
                    holder.setSchemaType(schemas.getTypeByQName(corbaType.getType()));
                }
            }
        }
        return result;
    }
View Full Code Here

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

        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
        CorbaType type = findCorbaType(typeMap, alias.getBasetype());
        while ((type != null) && (type instanceof Alias)) {
            alias = (Alias) type;
            type = findCorbaType(typeMap, alias.getBasetype());
        }
        QName tname;
        if (type == null) {
            //it must be a primitive type
            tname = xmlSchemaPrimitiveMap.get(alias.getBasetype());
        } else {
            tname = type.getType();
        }
        XmlSchemaType stype = schemas.getTypeByQName(tname);
        if (stype == null) {
            XmlSchema xmlSchema = wsdlVisitor.getManager().getXmlSchema(tname.getNamespaceURI());
            if (xmlSchema != null) {
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.