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

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


   
    public void visit(AST fixedNode) {
        //      <fixed_pt_const_type> ::= "fixed"
               
        XmlSchemaType stype = null;
        CorbaType ctype = null;
       
        QName corbaTypeQName =  CorbaConstants.NE_CORBA_FIXED;
       
        if (corbaTypeQName != null) {
            QName schemaTypeQName = Constants.XSD_DECIMAL;
            if (schemaTypeQName != null) {       
                stype = schemas.getTypeByQName(schemaTypeQName);
                if (stype != null) {
                    ctype = new CorbaType();
                    ctype.setQName(corbaTypeQName);
                    ctype.setType(stype.getQName());
                    ctype.setName(stype.getQName().getLocalPart());
                }
            }
        }
       
        schemaType = stype;
View Full Code Here


        AST memberTypeNode = identifierNode.getNextSibling();
        while (memberTypeNode != null) {
            AST memberNode = TypesUtils.getCorbaTypeNameNode(memberTypeNode);

            XmlSchemaType schemaType = null;
            CorbaType corbaType = null;
            Scope fqName = null;
            try {
                TypesVisitor visitor = new TypesVisitor(structScope,
                                                        definition,
                                                        schema,
                                                        wsdlVisitor,
                                                        null);
                visitor.visit(memberTypeNode);
                schemaType = visitor.getSchemaType();
                corbaType = visitor.getCorbaType();
                fqName = visitor.getFullyQualifiedName();
            } catch (Exception ex) {
                throw new RuntimeException(ex);
            }

            // Handle multiple struct member declarators
            // <declarators> :== <declarator> { "," <declarator> }*
            //
            // A multiple declarator must be an identifier (i.e. of type IDENT)
            // and cannot be a previous declared (or forward declared) type
            // (hence the ScopedNameVisitor.accept() call).
            while (memberNode != null
                   && memberNode.getType() == IDLTokenTypes.IDENT
                   && !ScopedNameVisitor.accept(structScope, definition, schema, memberNode, wsdlVisitor, true)) {

                XmlSchemaType memberSchemaType = schemaType;
                CorbaType memberCorbaType = corbaType;
                // needed for anonymous arrays in structs
                if (ArrayVisitor.accept(memberNode)) {
                    Scope anonScope = new Scope(structScope,
                                                TypesUtils.getCorbaTypeNameNode(memberTypeNode));
                    ArrayVisitor arrayVisitor = new ArrayVisitor(anonScope,
View Full Code Here

        if (wsdlVisitor.getDeferredActions() != null) {
            DeferredActionCollection deferredActions = wsdlVisitor.getDeferredActions();
            List<DeferredAction> list = deferredActions.getActions(structScope);
            if ((list != null) && !list.isEmpty()) {
                XmlSchemaType stype = getSchemaType();
                CorbaType ctype = getCorbaType();
                Iterator<DeferredAction> iterator = list.iterator();
                while (iterator.hasNext()) {
                    SchemaDeferredAction action = (SchemaDeferredAction)iterator.next();
                    action.execute(stype, ctype);
                }
View Full Code Here

        // TEMPORARILY
        // using TypesVisitor to visit <const_type>
        // it should be visited by a SwitchTypeSpecVisitor
        TypesVisitor visitor = new TypesVisitor(getScope(), definition, schema, wsdlVisitor, null);
        visitor.visit(discriminatorNode);
        CorbaType ctype = visitor.getCorbaType();
        Scope fullyQualifiedName = visitor.getFullyQualifiedName();

        XmlSchemaChoice choice = new XmlSchemaChoice();
        choice.setMinOccurs(1);
        choice.setMaxOccurs(1);
        unionSchemaComplexType.setParticle(choice);


        // corba:union
        Union corbaUnion = new Union();
        corbaUnion.setQName(new QName(typeMap.getTargetNamespace(), unionScope.toString()));
        corbaUnion.setRepositoryID(unionScope.toIDLRepositoryID());
        corbaUnion.setType(unionSchemaComplexType.getQName());
        if (ctype != null) {
            corbaUnion.setDiscriminator(ctype.getQName());
        } else {
            // Discriminator type is forward declared.
            UnionDeferredAction unionDiscriminatorAction =
                new UnionDeferredAction(corbaUnion);
            wsdlVisitor.getDeferredActions().add(fullyQualifiedName, unionDiscriminatorAction);
View Full Code Here

                                                    schema,
                                                    wsdlVisitor,
                                                    null);
            visitor.visit(typeNode);
            XmlSchemaType stype = visitor.getSchemaType();
            CorbaType ctype = visitor.getCorbaType();
            Scope fullyQualifiedName = visitor.getFullyQualifiedName();


            // needed for anonymous arrays in unions
            if (ArrayVisitor.accept(nameNode)) {
                Scope anonScope = new Scope(scope, TypesUtils.getCorbaTypeNameNode(nameNode));
                ArrayVisitor arrayVisitor = new ArrayVisitor(anonScope,
                                                             definition,
                                                             schema,
                                                             wsdlVisitor,
                                                             null,
                                                             fullyQualifiedName);
                arrayVisitor.setSchemaType(stype);
                arrayVisitor.setCorbaType(ctype);
                arrayVisitor.visit(nameNode);
                stype = arrayVisitor.getSchemaType();
                ctype = arrayVisitor.getCorbaType();
                fullyQualifiedName = visitor.getFullyQualifiedName();
            }


            // xmlschema:element
            element.setName(nameNode.toString());
            if (stype != null) {
                element.setSchemaTypeName(stype.getQName());
                if (stype.getQName().equals(ReferenceConstants.WSADDRESSING_TYPE)) {
                    element.setNillable(true);
                }
            } else {
                UnionDeferredAction elementAction =
                    new UnionDeferredAction(element);
                wsdlVisitor.getDeferredActions().add(fullyQualifiedName, elementAction);
            }
            choice.getItems().add(element);


            // corba:unionbranch
            unionBranch.setName(nameNode.toString());
            if (ctype != null) {
                unionBranch.setIdltype(ctype.getQName());
            } else {
                // its type is forward declared.
                UnionDeferredAction unionBranchAction =
                    new UnionDeferredAction(unionBranch);
                wsdlVisitor.getDeferredActions().add(fullyQualifiedName, unionBranchAction);
View Full Code Here

        if (wsdlVisitor.getDeferredActions() != null) {
            DeferredActionCollection deferredActions = wsdlVisitor.getDeferredActions();
            List<DeferredAction> list = deferredActions.getActions(unionScope);
            if ((list != null) && !list.isEmpty()) {
                XmlSchemaType stype = getSchemaType();
                CorbaType ctype = getCorbaType();
                Iterator<DeferredAction> iterator = list.iterator();
                while (iterator.hasNext()) {
                    SchemaDeferredAction action = (SchemaDeferredAction)iterator.next();
                    action.execute(stype, ctype);
                }
View Full Code Here

        }

        // process first array
        Long size = new Long(firstSizeNode.toString());
        XmlSchemaType stype = null;
        CorbaType ctype = null;
        if (identifierNode != null) {
            Scope scopedName = getScope();
            if (result.getSchemaType() != null) {
                stype = generateSchemaArray(scopedName, size,
                                            result.getSchemaType(),
View Full Code Here

    }

    private static QName getIdlType(WSDLToCorbaBinding wsdlToCorbaBinding, XmlSchemaType schemaType,
                                    QName typeName, boolean nill) throws Exception {
        QName idltype = null;
        CorbaType corbaTypeImpl = null;
        if (schemaType == null) {
            corbaTypeImpl = (CorbaType)WSDLToCorbaHelper.CORBAPRIMITIVEMAP.get(typeName);
            if (nill) {
                QName qname = corbaTypeImpl.getQName();
                idltype = wsdlToCorbaBinding.getHelper().createQNameCorbaNamespace(qname.getLocalPart()
                                                                                       + "_nil");
            } else {
                if (corbaTypeImpl == null) {
                    XmlSchemaObject schemaObj = getSchemaObject(wsdlToCorbaBinding, typeName);
                    XmlSchemaAnnotation annotation = null;
                    if (schemaObj instanceof XmlSchemaElement) {
                        XmlSchemaElement el = (XmlSchemaElement)schemaObj;
                        schemaType = el.getSchemaType();
                        annotation = ((XmlSchemaElement)schemaObj).getAnnotation();
                    }
                    idltype = getSchemaTypeName(wsdlToCorbaBinding, schemaType, annotation, typeName, nill);
                } else {
                    idltype = corbaTypeImpl.getQName();
                }
            }
        } else {
            // We need to get annotation information for the schema type we are
            // about to pass in.
View Full Code Here

    private static QName getSchemaTypeName(WSDLToCorbaBinding wsdlToCorbaBinding, XmlSchemaType schemaType,
                                           XmlSchemaAnnotation annotation, QName typeName, boolean nill)
        throws Exception {
        QName idltype = null;
        CorbaType corbaTypeImpl = null;

        corbaTypeImpl = wsdlToCorbaBinding.getHelper().convertSchemaToCorbaType(schemaType, typeName, null,
                                                                                annotation, false);
        if (corbaTypeImpl == null) {
            throw new Exception("Couldn't convert schema type to corba type : " + typeName);
        } else {
            if (nill) {
                QName qname = corbaTypeImpl.getQName();
                idltype = wsdlToCorbaBinding.getHelper().createQNameCorbaNamespace(qname.getLocalPart()
                                                                                       + "_nil");
            } else {
                idltype = corbaTypeImpl.getQName();
            }
        }
        return idltype;
    }
View Full Code Here

                                                    schema,
                                                    wsdlVisitor,
                                                    null);
            visitor.visit(memberTypeNode);
            XmlSchemaType stype = visitor.getSchemaType();
            CorbaType ctype = visitor.getCorbaType();
            Scope fullyQualifiedName = visitor.getFullyQualifiedName();

            // needed for anonymous arrays in exceptions
            if (ArrayVisitor.accept(memberNode)) {
                Scope anonScope = new Scope(exceptionScope,
View Full Code Here

TOP

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

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.