Examples of XmlSchemaSimpleType


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

        } else  {
            QName typeName = getTypeName(beanInfo);
            if (typeName != null) {
                XmlSchemaType type = schemas.getTypeByQName(typeName);
                if  (isList && type instanceof XmlSchemaSimpleType) {
                    XmlSchemaSimpleType simpleType = new XmlSchemaSimpleType(type.getParent(), false);
                    XmlSchemaSimpleTypeList list = new XmlSchemaSimpleTypeList();
                    XmlSchemaSimpleType stype = (XmlSchemaSimpleType)type;
                    list.setItemTypeName(stype.getQName());
                    simpleType.setContent(list);
                    part.setXmlSchema(simpleType);
                    if (part.getConcreteName() == null) {
                        part.setConcreteName(new QName(null, part.getName().getLocalPart()));
                    }
View Full Code Here

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

    public void writeSchema(XmlSchema root) {
        // this mapping gets used with xs:string, and we might get called.
        if (root.getTargetNamespace().equals(XMLConstants.W3C_XML_SCHEMA_NS_URI)) {
            return;
        }
        XmlSchemaSimpleType type = new XmlSchemaSimpleType(root, true);
        type.setName(getSchemaType().getLocalPart());
        XmlSchemaSimpleContentExtension ext = new XmlSchemaSimpleContentExtension();
        ext.setBaseTypeName(XmlSchemaConstants.STRING_QNAME);
        XmlSchemaSimpleTypeRestriction content = new XmlSchemaSimpleTypeRestriction();
        content.setBaseTypeName(XmlSchemaConstants.STRING_QNAME);
        type.setContent(content);
    }
View Full Code Here

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

            }
        }
        if (wsaSchema == null) {
            wsaSchema = new XmlSchema(ReferenceConstants.WSADDRESSING_NAMESPACE, schemas);
        }
        XmlSchemaType objectType = new XmlSchemaSimpleType(wsaSchema, true);
        objectType.setName(ReferenceConstants.WSADDRESSING_LOCAL_NAME);
        setSchemaType(objectType);

        // Build and assign the corba:object to the visitor
        Object corbaObject = new Object();
        corbaObject.setQName(new QName(typeMap.getTargetNamespace(), "CORBA.Object"));
        corbaObject.setRepositoryID("IDL:omg.org/CORBA/Object/1.0");
        corbaObject.setType(objectType.getQName());
        setCorbaType(corbaObject);

        // Add the object definition to the typemap.  We only need to add the default
        // type once.
        if (!isReferenceCORBATypeDefined(corbaObject.getQName())) {
View Full Code Here

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

            }
        }
        if (wsaSchema == null) {
            wsaSchema = new XmlSchema(ReferenceConstants.WSADDRESSING_NAMESPACE, schemas);
        }
        XmlSchemaType wsaType = new XmlSchemaSimpleType(wsaSchema, true);
        wsaType.setName(ReferenceConstants.WSADDRESSING_LOCAL_NAME);

        // Check to see if we have already defined an element for this reference type.  If
        // we have, then there is no need to add it to the schema again.
        isDuplicateReference(referenceName, bindingName, customScope, wsaType, node);

        setSchemaType(wsaType);

        // Build and assign the corba:object to the visitor
        Object corbaObject = new Object();
        corbaObject.setBinding(bindingName);
        corbaObject.setQName(new QName(typeMap.getTargetNamespace(), customScope.toString()));
        corbaObject.setRepositoryID(repositoryID);
        corbaObject.setType(wsaType.getQName());
        setCorbaType(corbaObject);

        // Add the object definition to the typemap.  We only need to add the default
        // type once.
        if (!isReferenceCORBATypeDefined(corbaObject.getQName())) {
View Full Code Here

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

    }

    @Override
    public void writeSchema(XmlSchema root) {

        XmlSchemaSimpleType simple = new XmlSchemaSimpleType(root, true);
        simple.setName(getSchemaType().getLocalPart());
        XmlSchemaSimpleTypeRestriction restriction = new XmlSchemaSimpleTypeRestriction();
        restriction.setBaseTypeName(XmlSchemaConstants.STRING_QNAME);
        simple.setContent(restriction);

        Object[] constants = getTypeClass().getEnumConstants();

        List<XmlSchemaFacet> facets = restriction.getFacets();
        for (Object constant : constants) {
View Full Code Here

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

        attributeImportingType.setName("importingType");
        attributeImportingType.setSchemaTypeName(new QName(ATTRIBUTE_TYPE_SCHEMA, "importedAttributeType"));
    }

    private void createImportedAttributeType(XmlSchema attributeTypeSchema) {
        XmlSchemaSimpleType attributeImportedType = new XmlSchemaSimpleType(attributeTypeSchema, true);
        attributeImportedType.setName("importedAttributeType");
        XmlSchemaSimpleTypeRestriction simpleContent = new XmlSchemaSimpleTypeRestriction();
        attributeImportedType.setContent(simpleContent);
        simpleContent.setBaseTypeName(new QName(XMLConstants.W3C_XML_SCHEMA_NS_URI, "string"));
    }
View Full Code Here

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

        } else  {
            QName typeName = getTypeName(beanInfo);
            if (typeName != null) {
                XmlSchemaType type = schemas.getTypeByQName(typeName);
                if  (isList && type instanceof XmlSchemaSimpleType) {
                    XmlSchemaSimpleType simpleType = new XmlSchemaSimpleType(type.getParent(), false);
                    XmlSchemaSimpleTypeList list = new XmlSchemaSimpleTypeList();
                    XmlSchemaSimpleType stype = (XmlSchemaSimpleType)type;
                    list.setItemTypeName(stype.getQName());
                    simpleType.setContent(list);
                    part.setXmlSchema(simpleType);
                    if (part.getConcreteName() == null) {
                        part.setConcreteName(new QName(null, part.getName().getLocalPart()));
                    }
View Full Code Here

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

        } else  {
            QName typeName = getTypeName(beanInfo);
            if (typeName != null) {
                XmlSchemaType type = schemas.getTypeByQName(typeName);
                if  (isList && type instanceof XmlSchemaSimpleType) {
                    XmlSchemaSimpleType simpleType = new XmlSchemaSimpleType(type.getParent(), false);
                    XmlSchemaSimpleTypeList list = new XmlSchemaSimpleTypeList();
                    XmlSchemaSimpleType stype = (XmlSchemaSimpleType)type;
                    list.setItemTypeName(stype.getQName());
                    simpleType.setContent(list);
                    part.setXmlSchema(simpleType);
                    if (part.getConcreteName() == null) {
                        part.setConcreteName(new QName(null, part.getName().getLocalPart()));
                    }
View Full Code Here

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

        // HACKY workaround for WSCOMMONS-355
        if (xst == null && "http://www.w3.org/2001/XMLSchema".equals(schemaTypeName.getNamespaceURI())) {
            XmlSchema sch = getSchemaByTargetNamespace(schemaTypeName.getNamespaceURI());

            if ("anySimpleType".equals(schemaTypeName.getLocalPart())) {
                XmlSchemaSimpleType type = new XmlSchemaSimpleType(sch);
                type.setName(schemaTypeName.getLocalPart());
                sch.addType(type);
                xst = type;
            } else if ("anyType".equals(schemaTypeName.getLocalPart())) {
                XmlSchemaType type = new XmlSchemaType(sch);
                type.setName(schemaTypeName.getLocalPart());
                sch.addType(type);
                xst = type;
            }
        }
View Full Code Here

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

            if ("".equals(param.trim())) {
                return null;
            }
            if (param.indexOf('|') > -1) {
                String[] enums = param.split("\\|");
                XmlSchemaSimpleType schemaSimpleType =
                        handleEnumeration(name + "EnumerationType", enums);
                xmlSchema.getItems().add(schemaSimpleType);
                xmlSchemaElement.setSchemaTypeName(schemaSimpleType.getQName());
                xmlSchemaElement.setSchemaType(schemaSimpleType);
                return xmlSchemaElement;
            }
            if (param.equalsIgnoreCase("array") || param.equalsIgnoreCase("xmlList")
                    || param.equalsIgnoreCase("object")) {
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.