Examples of XmlSchemaElement


Examples of org.apache.ws.commons.schema.XmlSchemaElement

                                              List<CorbaTypeMap> typeMaps,
                                              ServiceInfo serviceInfo) {
        QName arrayElementType = null;
        long arrayBound = 0;
        CorbaTypeImpl baseType = obj.getType();
        XmlSchemaElement el = CorbaHandlerUtils.getXmlSchemaSequenceElement(schemaType, serviceInfo);
        QName elementName = el.getQName();
        if (!CorbaUtils.isElementFormQualified(serviceInfo, name.getNamespaceURI())) {
            elementName = new QName("", elementName.getLocalPart());
        }
        if (baseType instanceof Array) {
            Array arrayType = (Array)baseType;
View Full Code Here

Examples of org.apache.ws.commons.schema.XmlSchemaElement

        CorbaTypeImpl baseType = obj.getType();
        boolean isOctets = baseType.getType().equals(W3CConstants.NT_SCHEMA_BASE64)
            || baseType.getType().equals(W3CConstants.NT_SCHEMA_HBIN);
        QName elementName = name;
        if (!isOctets) {
            XmlSchemaElement el = CorbaHandlerUtils.getXmlSchemaSequenceElement(schemaType, serviceInfo);
            elementName = el.getQName();
            if (!CorbaUtils.isElementFormQualified(serviceInfo, name.getNamespaceURI())) {
                elementName = new QName("", elementName.getLocalPart());
            }
        }
        if (baseType instanceof Sequence) {
View Full Code Here

Examples of org.apache.ws.commons.schema.XmlSchemaElement

        XmlSchemaObjectCollection members = null;
           
        XmlSchemaObject stype = schemaType;
        QName qname = name;
        if (schemaType instanceof XmlSchemaElement) {
            XmlSchemaElement el = (XmlSchemaElement) schemaType;
            if (el.getQName() != null) {
                qname = el.getQName();
            }
            stype = el.getSchemaType();
            if (stype == null) {
                stype = CorbaUtils.getXmlSchemaType(serviceInfo, el.getRefName());
            }
        }
        if (stype instanceof XmlSchemaComplexType) {
            XmlSchemaComplexType ctype = (XmlSchemaComplexType) stype;
            if (ctype.getQName() != null) {
View Full Code Here

Examples of org.apache.ws.commons.schema.XmlSchemaElement

            if (attr.getQName() != null) {
                qname = attr.getQName();
            }
            isAttr = true;
        } else if (schemaType instanceof XmlSchemaElement) {
            XmlSchemaElement el = (XmlSchemaElement) schemaType;
            if (el.isNillable()) {
                //should not write the start Element.
                isElementNil = true;
            }
            if (el.getQName() != null) {
                qname = el.getQName();
            }
            stype = el.getSchemaType();
            if (stype == null) {
                stype = CorbaUtils.getXmlSchemaType(serviceInfo, el.getRefName());
            }
        }
        String nsURI = getNamespaceURI(serviceInfo, qname);
        // Now handle all of the branches
        List<Unionbranch> unionBranches = unionType.getUnionbranch();
View Full Code Here

Examples of org.apache.ws.commons.schema.XmlSchemaElement

    }

    public static XmlSchemaElement getXmlSchemaSequenceElement(XmlSchemaObject schemaType,
                                                               ServiceInfo serviceInfo) {
        XmlSchemaObject stype = schemaType;
        XmlSchemaElement el = null;
        if (schemaType instanceof XmlSchemaElement) {
            stype = ((XmlSchemaElement) schemaType).getSchemaType();
            if (stype == null) {
                stype = CorbaUtils.getXmlSchemaType(serviceInfo, el.getRefName());
            }
        }
       
        if (stype instanceof XmlSchemaComplexType) {
            //only one element inside the XmlSchemaComplexType
View Full Code Here

Examples of org.apache.ws.commons.schema.XmlSchemaElement

                            && schemaType.getName() == null) {
                        Iterator it = getSchemaIterator(schemaType);
                        Iterator iter = getSchemaIterator(schemaType);
                        addParams(wsdlToCorbaBinding, inputs, it, iter);
                    } else {
                        XmlSchemaElement el = getElement(part, xmlSchemaList);
                        if (schemaType == null) {
                            addParam(wsdlToCorbaBinding, schemaType, part
                                    .getName(), el.getSchemaTypeName(), el
                                    .isNillable(), inputs);
                        } else {
                            addParam(wsdlToCorbaBinding, schemaType, part
                                    .getName(), part.getElementName(), el
                                    .isNillable(), inputs);
                        }
                    }
                } else {
                    if (part.getTypeName() != null) {
View Full Code Here

Examples of org.apache.ws.commons.schema.XmlSchemaElement

        TypesVisitor visitor = new TypesVisitor(getScope(), schemas, schema, typeMap, null);
        visitor.visit(discriminatorNode);
        XmlSchemaType stype = visitor.getSchemaType();
        CorbaTypeImpl ctype = visitor.getCorbaType();
       
        XmlSchemaElement discriminatorElement = new XmlSchemaElement();
        discriminatorElement.setName(discriminator);
        discriminatorElement.setSchemaTypeName(stype.getQName());
        discriminatorElement.setMinOccurs(1);
        discriminatorElement.setMaxOccurs(1);
        sequence.getItems().add(discriminatorElement);
       
        XmlSchemaChoice choice = new XmlSchemaChoice();
        choice.setMinOccurs(1);
        choice.setMaxOccurs(1);
View Full Code Here

Examples of org.apache.ws.commons.schema.XmlSchemaElement

            AST typeNode  = null;
            AST nameNode  = null;
            AST labelNode = null;
           
            // xmlschema:element
            XmlSchemaElement element = new XmlSchemaElement();

            // corba:unionbranch
            Unionbranch unionBranch = new Unionbranch();

            if (caseNode.getType() == IDLTokenTypes.LITERAL_default) {
                // default:
                unionBranch.setDefault(true);
               
                typeNode = caseNode.getFirstChild();
                nameNode = typeNode.getNextSibling();
            } else {
                // case:
                createCase(caseNode, unionBranch);
               
                labelNode = caseNode.getFirstChild();
                if (labelNode.getType() == IDLTokenTypes.LITERAL_case) {
                    labelNode = labelNode.getNextSibling();
                }
               
                typeNode = labelNode.getNextSibling();
                nameNode = typeNode.getNextSibling();
            }
           

            TypesVisitor visitor = new TypesVisitor(scope,
                                                    schemas,
                                                    schema,
                                                    typeMap,
                                                    null);
            visitor.visit(typeNode);
            XmlSchemaType stype = visitor.getSchemaType();
            CorbaTypeImpl ctype = visitor.getCorbaType();
           
           
            // needed for anonymous arrays in unions
            if (ArrayVisitor.accept(nameNode)) {
                Scope anonScope = new Scope(scope, TypesUtils.getCorbaTypeNameNode(nameNode));
                ArrayVisitor arrayVisitor = new ArrayVisitor(anonScope,
                                                             schemas,
                                                             schema,
                                                             typeMap,
                                                             stype,
                                                             ctype,
                                                             null);
                arrayVisitor.visit(nameNode);
                stype = arrayVisitor.getSchemaType();
                ctype = arrayVisitor.getCorbaType();
            }
           
           
            // xmlschema:element
            element.setName(nameNode.toString());
            element.setSchemaTypeName(stype.getQName());
            choice.getItems().add(element);
           
           
            // corba:unionbranch
            unionBranch.setName(nameNode.toString());
View Full Code Here

Examples of org.apache.ws.commons.schema.XmlSchemaElement

        }
    }

    private void generateGetter(AST typeNode, AST nameNode) {
        // generate wrapped doc element in parameter
        XmlSchemaElement inParameters =
            generateWrappedDocElement(null,
                                      GETTER_PREFIX + nameNode.toString(),
                                      PARAM_NAME);
        // generate wrapped doc element out parameter
        XmlSchemaElement outParameters =
            generateWrappedDocElement(typeNode,
                                      GETTER_PREFIX + nameNode.toString() + RESULT_POSTFIX,
                                      RETURN_PARAM_NAME);

        // generate input message
View Full Code Here

Examples of org.apache.ws.commons.schema.XmlSchemaElement

        BindingOperation corbaBindingOp = generateCorbaBindingOperation(binding, op, corbaOp);
    }

    private void generateSetter(AST typeNode, AST nameNode) {
        // generate wrapped doc element in parameter
        XmlSchemaElement inParameters =
            generateWrappedDocElement(typeNode,
                                      SETTER_PREFIX + nameNode.toString(),
                                      PARAM_NAME);
        // generate wrapped doc element out parameter
        XmlSchemaElement outParameters =
            generateWrappedDocElement(null,
                                      SETTER_PREFIX + nameNode.toString() + RESULT_POSTFIX,
                                      RETURN_PARAM_NAME);
       
        // generate input message
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.