Package org.apache.ws.commons.schema

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


                element = new XmlSchemaElement();
                element.setName(part.getName());
                element.setQName(new QName(null, part.getName()));
                QName typeName = part.getTypeName();
                if (typeName != null) {
                    XmlSchemaType type = WSDLOperationIntrospectorImpl.this.getType(typeName);
                    if (type == null) {
                        throw new InvalidWSDLException("Type cannot be resolved: " + typeName.toString());
                    }
                    element.setSchemaType(type);
                    element.setSchemaTypeName(type.getQName());
                }
            }
            XMLType xmlType = new XMLType(getElementInfo(element));
            xmlType.setNillable(element.isNillable());
            xmlType.setMany(element.getMaxOccurs() > 1);
View Full Code Here


            }
            if (element.isNillable()) {
                // Wrapper element cannot be nillable
                return null;
            }
            XmlSchemaType type = element.getSchemaType();
            if (type == null) {
                String qName = element.getQName().toString();
                throw new InvalidWSDLException("The XML schema element does not have a type: " + qName);
            }
            if (!(type instanceof XmlSchemaComplexType)) {
View Full Code Here

        for (XSDefinition xsd : schemas) {
            if (xsd.getSchemaCollection() != null) {
                schemaCollection = xsd.getSchemaCollection();
            }
            XmlSchema schema = xsd.getSchema();
            XmlSchemaType type = getXmlSchemaObject(schema, name, XmlSchemaType.class);
            if (type != null) {
                return type;
            }
        }
        if (schemaCollection != null) {
View Full Code Here

        return null;
    }

    public XmlSchemaType getXmlSchemaType(QName name) {
        if (schema != null) {
            XmlSchemaType type = getXmlSchemaObject(schema, name, XmlSchemaType.class);
            if (type != null) {
                return type;
            }
        }
        if (schemaCollection != null) {
View Full Code Here

                        Message message = new Message("ELEMENT_MISSING_TYPE", LOG, element.getQName(),
                                                      element.getSchemaTypeName(), schema.getNamespaceURI());
                        LOG.warning(message.toString());
                        continue;
                    }
                    XmlSchemaType type;
                    if (element.getSchemaType() != null) {
                        type = element.getSchemaType();
                    } else {
                        type = schema.getSchema().getTypeByName(element.getSchemaTypeName());
                    }
View Full Code Here

        ParticleInfo itemInfo = ParticleInfo.forLocalItem(thing,
                                                          schemaInfo.getSchema(),
                                                          xmlSchemaCollection,
                                                          prefixAccumulator,
                                                          type.getQName());
        XmlSchemaType itemType = itemInfo.getType();
        boolean simple = itemType instanceof XmlSchemaSimpleType
            || JavascriptUtils.notVeryComplexType(itemType);
        boolean mtomCandidate = JavascriptUtils.mtomCandidateType(itemType);
        String accessorName = "set" + StringUtils.capitalize(itemInfo.getJavascriptName());
        utils.appendLine("cxfjsutils.trace('processing " + itemInfo.getJavascriptName() + "');");
View Full Code Here

            SchemaType st2 = sts.typeForClassname(type.getName());

            part.setProperty(SchemaType.class.getName(), st2);
            part.setProperty(XmlAnySimpleType.class.getName(), type);
            part.setTypeQName(st2.getName());
            XmlSchemaType xmlSchema = schemas.getTypeByQName(st2.getName());
            part.setXmlSchema(xmlSchema);
            return;
        }
        try {
            Field field = clazz.getField("type");
            SchemaType st = (SchemaType)field.get(null);
            part.setProperty(SchemaType.class.getName(), st);
           
            SchemaTypeSystem sts = st.getTypeSystem();
            schemas.getXmlSchemaCollection().setSchemaResolver(new XMLSchemaResolver(sts));

            XmlSchema schema = getSchema(sts, st.getSourceName());

            if (st.isDocumentType()) {
                XmlSchemaElement sct = schema.getElementByName(st.getDocumentElementName());
                part.setXmlSchema(sct);
                part.setElement(true);
                part.setElementQName(st.getDocumentElementName());
                part.setConcreteName(st.getDocumentElementName());
            } else if (st.getComponentType() == SchemaType.ELEMENT) {
                XmlSchemaElement sct = schema.getElementByName(st.getName());
                part.setXmlSchema(sct);
                part.setElement(true);
            } else {
                XmlSchemaType sct = schema.getTypeByName(st.getName());
                part.setTypeQName(st.getName());
                part.setXmlSchema(sct);
                part.setElement(false);
            }
        } catch (RuntimeException ex) {
View Full Code Here

                partvalid = schemaEle != null ? true : false;
            } else {
                if ("anyType".equals(name)) {
                    return true;
                }
                XmlSchemaType schemaType =
                    schemaCollection.getTypeByQName(new QName(WSDLConstants.NS_SCHEMA_XSD, name));

                partvalid = schemaType != null ? true : false;
            }
View Full Code Here

                                                      element.getSchemaTypeName(),
                                                      schema.getTargetNamespace());
                        LOG.warning(message.toString());
                        continue;
                    }
                    XmlSchemaType type;
                    if (element.getSchemaType() != null) {
                        type = element.getSchemaType();
                    } else {
                        type = schema.getTypeByName(element.getSchemaTypeName());
                    }
View Full Code Here

        ParticleInfo itemInfo = ParticleInfo.forLocalItem(thing,
                                                          xmlSchema,
                                                          xmlSchemaCollection,
                                                          prefixAccumulator,
                                                          type.getQName());
        XmlSchemaType itemType = itemInfo.getType();
        boolean simple = itemType instanceof XmlSchemaSimpleType
            || JavascriptUtils.notVeryComplexType(itemType);
        boolean mtomCandidate = JavascriptUtils.mtomCandidateType(itemType);
        String accessorName = "set" + StringUtils.capitalize(itemInfo.getJavascriptName());
        utils.appendLine("cxfjsutils.trace('processing " + itemInfo.getJavascriptName() + "');");
View Full Code Here

TOP

Related Classes of org.apache.ws.commons.schema.XmlSchemaType

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.