Examples of XmlSchemaElement


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

     * @param name is the name of the wrapping element.
     * @param paramName is the name of the  wrapping element.
     * @return the wrapping element.
     */
    private XmlSchemaElement generateWrappedDocElement(AST typeNode, String name, String paramName) {
        XmlSchemaElement element = new XmlSchemaElement();
        if (typeNode != null) {
            ParamTypeSpecVisitor visitor = new ParamTypeSpecVisitor(getScope(),
                                                                    schemas,
                                                                    schema,
                                                                    typeMap,
                                                                    definition);
            visitor.visit(typeNode);
            XmlSchemaType stype = visitor.getSchemaType();
           
            element.setSchemaTypeName(stype.getQName());
            element.setName(paramName);
        }
       
        XmlSchemaSequence sequence = new XmlSchemaSequence();
        if (typeNode != null) {
            sequence.getItems().add(element);
        }
       
        XmlSchemaComplexType complex = new XmlSchemaComplexType(schema);
        complex.setParticle(sequence);
       
        XmlSchemaElement result = new XmlSchemaElement();
        result.setName(name);
        result.setQName(new QName(definition.getTargetNamespace(), name));
        result.setSchemaType(complex);

       
        schema.getItems().add(result);
       
        return result;
View Full Code Here

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

        Operation operation = generateOperation(node.toString());

        BindingOperation bindingOperation = generateBindingOperation(binding, operation);
       
        XmlSchemaSequence inputWrappingSequence = new XmlSchemaSequence();
        XmlSchemaElement inputElement = generateWrapper(new QName(schema.getTargetNamespace(),
                                                                  operation.getName()),
                                                        inputWrappingSequence);
        inputMsg = generateInputMessage(operation, bindingOperation);
        inputPart = generateInputPart(inputMsg, inputElement);

        // <op_attribute>
        node = node.getFirstChild();
        XmlSchemaSequence outputWrappingSequence = null;
        XmlSchemaElement outputElement = null;
        if (node != null && (node.getType() == IDLTokenTypes.LITERAL_oneway)) {
            // oneway operations map to operations with only input message
            // no outputMsg nor outputPart need be created
            node = node.getNextSibling();
        } else {
View Full Code Here

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

     */
    private XmlSchemaElement generateWrapper(QName el, XmlSchemaSequence wrappingSequence) {
        XmlSchemaComplexType schemaComplexType = new XmlSchemaComplexType(schema);
        schemaComplexType.setParticle(wrappingSequence);
       
        XmlSchemaElement wrappingSchemaElement = new XmlSchemaElement();
        wrappingSchemaElement.setQName(el);
        wrappingSchemaElement.setName(el.getLocalPart());
        wrappingSchemaElement.setSchemaType(schemaComplexType);

        schema.getElements().add(el, wrappingSchemaElement);
        schema.getItems().add(wrappingSchemaElement);
       
        return wrappingSchemaElement;
View Full Code Here

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

    private XmlSchemaElement addElement(XmlSchemaSequence schemaSequence,
                                        XmlSchemaType schemaType,
                                        String name,
                                        boolean isObjectReference) {
        XmlSchemaElement element = new XmlSchemaElement();
        element.setName(name);
        // REVISIT: An object reference requires that we use a ref name.  An element type produces
        // a wsdltojava error.
        if (isObjectReference) {
            element.setRefName(schemaType.getQName());
        } else {
            element.setSchemaTypeName(schemaType.getQName());
        }
       
        schemaSequence.getItems().add(element);
       
        return element;
View Full Code Here

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

            } else {
                Array arrayType = (Array)type;
                arrayElemType = arrayType.getElemtype();
                arrayBound = arrayType.getBound();
            }
            XmlSchemaElement el = CorbaHandlerUtils.getXmlSchemaSequenceElement(schemaType, serviceInfo);

            QName name;
            if (isTopLevel) {
                name = reader.nextEvent().asStartElement().getName();
            } else {
                name = el.getQName();
            }

            obj = new CorbaArrayHandler(name, idlType, tc, type);
            boolean nestedArray = isNestedArray(arrayElemType);
            for (int i = 0; i < arrayBound; ++i) {
View Full Code Here

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

        if (isTopLevel) {
            StartElement startEl = factory.createStartElement(objName, null, null);
            writer.add(startEl);
        }
        CorbaArrayHandler arrayHandler = (CorbaArrayHandler)obj;
        XmlSchemaElement el = CorbaHandlerUtils.getXmlSchemaSequenceElement(schemaType, serviceInfo);
        List<CorbaObjectHandler> elements = arrayHandler.getElements();
        for (Iterator<CorbaObjectHandler> elementsIter = elements.iterator(); elementsIter.hasNext();) {
            CorbaObjectHandler handler = elementsIter.next();
            QName handlerName = handler.getName();
            boolean nestedArray = isNestedArray(handler.getTypeCode());
View Full Code Here

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

                                       XMLEventReader reader,
                                       QName seqElementType,
                                       long bound,
                                       XmlSchemaObject schemaType)
        throws java.lang.Exception {
        XmlSchemaElement el = CorbaHandlerUtils.getXmlSchemaSequenceElement(schemaType, serviceInfo);
        QName name = obj.getName();
        QName elementName = el.getQName();
        if (!CorbaUtils.isElementFormQualified(serviceInfo, name.getNamespaceURI())) {
            elementName = new QName("", elementName.getLocalPart());
        }
        CorbaObjectHandler elementObj =
            CorbaHandlerUtils.initializeObjectHandler(orb,
                                                      elementName,
                                                      seqElementType,
                                                      typeMaps,
                                                      serviceInfo);
        obj.setTemplateElement(elementObj);
        boolean nestedSequence = isNestedSequence(seqElementType);
        if (bound == 0) {
            LOG.log(Level.INFO, "Unbounded sequence found");
            XMLEvent event = reader.peek();
            while (event.getEventType() == XMLStreamConstants.START_ELEMENT) {
                StartElement startEl = (StartElement) event;
                //REVISIT, check if qualified or unqualified
                if (startEl.getName().equals(el.getQName())) {
                    if (nestedSequence) {
                        reader.nextEvent().asStartElement();
                    }
                } else {
                    break;
View Full Code Here

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

        if (isTopLevel) {
            StartElement startEl = factory.createStartElement(name, null, null);
            writer.add(startEl);
        }
        if (!writeOctets) {
            XmlSchemaElement el = CorbaHandlerUtils.getXmlSchemaSequenceElement(schemaType, serviceInfo);
            CorbaSequenceHandler seqHandler = (CorbaSequenceHandler)obj;
            List<CorbaObjectHandler> elements = seqHandler.getElements();
            for (Iterator<CorbaObjectHandler> elementsIter = elements.iterator(); elementsIter.hasNext();) {
                CorbaObjectHandler handler = elementsIter.next();
                QName objName = handler.getName();
View Full Code Here

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

           
            boolean readElement = false;

            XmlSchemaObject stype = schemaType;
            if (schemaType instanceof XmlSchemaElement) {
                XmlSchemaElement el = (XmlSchemaElement) schemaType;
                stype = el.getSchemaType();
                if (stype == null) {
                    stype = CorbaUtils.getXmlSchemaType(serviceInfo, el.getRefName());
                }
                readElement = true;
            }
            if (stype instanceof XmlSchemaComplexType) {
                XmlSchemaComplexType ctype = (XmlSchemaComplexType) stype;
View Full Code Here

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

           
        boolean writeElement = false;

        XmlSchemaObject stype = schemaType;
        if (schemaType instanceof XmlSchemaElement) {
            XmlSchemaElement el = (XmlSchemaElement) schemaType;
            stype = el.getSchemaType();
            if (stype == null) {
                stype = CorbaUtils.getXmlSchemaType(serviceInfo, el.getRefName());
            }
            writeElement = true;
        }
        if (stype instanceof XmlSchemaComplexType) {
            XmlSchemaComplexType ctype = (XmlSchemaComplexType) stype;
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.