Package org.apache.ws.commons.schema

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


        }
    }

    private XmlSchemaForm getAttrFormDefaultSetting() {
        if (FORM_DEFAULT_UNQUALIFIED.equals(generationParams.getAttrFormDefault())) {
            return new XmlSchemaForm(XmlSchemaForm.UNQUALIFIED);
        } else {
            return new XmlSchemaForm(XmlSchemaForm.QUALIFIED);
        }
    }
View Full Code Here


        }
    }

    private XmlSchemaForm getElementFormDefaultSetting() {
        if (FORM_DEFAULT_UNQUALIFIED.equals(generationParams.getElementFormDefault())) {
            return new XmlSchemaForm(XmlSchemaForm.UNQUALIFIED);
        } else {
            return new XmlSchemaForm(XmlSchemaForm.QUALIFIED);
        }
    }
View Full Code Here

    public SchemaGenerator(String schemaTargetNamespace, TypeTable typeTable) {
        this.schemaTargetNamespace = schemaTargetNamespace;
        this.typeTable = typeTable;
        XmlSchemaCollection xmlSchemaCollection = new XmlSchemaCollection();
        xmlSchema = new XmlSchema(this.schemaTargetNamespace, xmlSchemaCollection);
        xmlSchema.setAttributeFormDefault(new XmlSchemaForm(XmlSchemaForm.UNQUALIFIED));
        xmlSchema.setElementFormDefault(new XmlSchemaForm(XmlSchemaForm.UNQUALIFIED));

        nameSpacesMap.put(DEFAULT_SCHEMA_NAMESPACE_PREFIX,
                          URI_2001_SCHEMA_XSD);
        nameSpacesMap.put(prefix, this.schemaTargetNamespace);
        xmlSchema.setNamespaceContext(nameSpacesMap);
View Full Code Here

       
        el = createXsElement(part, typeName, schemaInfo);

        XmlSchema schema = schemas.newXmlSchemaInCollection(qn.getNamespaceURI());
        if (qualifiedSchemas) {
            schema.setElementFormDefault(new XmlSchemaForm(XmlSchemaForm.QUALIFIED));
        }
        schemaInfo.setSchema(schema);
        schema.getElements().add(el.getQName(), el);
        schema.getItems().add(el);
View Full Code Here

        XmlSchema schema;
        if (schemaInfo == null) {
            schema = schemas.newXmlSchemaInCollection(part.getElementQName().getNamespaceURI());

            if (qualifiedSchemas) {
                schema.setElementFormDefault(new XmlSchemaForm(XmlSchemaForm.QUALIFIED));
            }

            NamespaceMap nsMap = new NamespaceMap();
            nsMap.add(WSDLConstants.CONVENTIONAL_TNS_PREFIX, schema.getTargetNamespace());
            nsMap.add(WSDLConstants.NP_SCHEMA_XSD, WSDLConstants.NS_SCHEMA_XSD);
View Full Code Here

        schema.setTargetNamespace(name);                  
    }
   
    public void setQualified(boolean qualified) throws Exception  {
        if (qualified) {
            XmlSchemaForm form = new XmlSchemaForm("qualified");           
            schema.setAttributeFormDefault(form);
            schema.setElementFormDefault(form);
        }                         
    }
View Full Code Here

            return schemaInfo;
        }

        schema = col.newXmlSchemaInCollection(namespaceURI);
        if (qualified) {
            schema.setElementFormDefault(new XmlSchemaForm(XmlSchemaForm.QUALIFIED));
        }
        schemaInfo.setSchema(schema);

        Map<String, String> explicitNamespaceMappings = this.getDataBinding().getDeclaredNamespaceMappings();
        if (explicitNamespaceMappings == null) {
View Full Code Here

        }

        if (schemaInfo == null) {
            XmlSchemaCollection col = new XmlSchemaCollection();
            XmlSchema schema = new XmlSchema(wraperBeanName.getNamespaceURI(), col);
            schema.setElementFormDefault(new XmlSchemaForm(XmlSchemaForm.QUALIFIED));
            serviceInfo.setXmlSchemaCollection(col);

            NamespaceMap nsMap = new NamespaceMap();
            nsMap.add(WSDLConstants.NP_SCHEMA_XSD, WSDLConstants.NU_SCHEMA_XSD);
            schema.setNamespaceContext(nsMap);
View Full Code Here

       
        if (schemaInfo == null) {
            schemaInfo = new SchemaInfo(serviceInfo, qname.getNamespaceURI());
            XmlSchemaCollection col = new XmlSchemaCollection();
            schema = new XmlSchema(qname.getNamespaceURI(), col);
            schema.setElementFormDefault(new XmlSchemaForm(XmlSchemaForm.QUALIFIED));
            serviceInfo.setXmlSchemaCollection(col);

            NamespaceMap nsMap = new NamespaceMap();
            nsMap.add(WSDLConstants.NP_SCHEMA_XSD, WSDLConstants.NU_SCHEMA_XSD);
            schema.setNamespaceContext(nsMap);
View Full Code Here

       
        el = createXsElement(part, typeName, schemaInfo);

        XmlSchema schema = schemas.newXmlSchemaInCollection(qn.getNamespaceURI());
        if (qualifiedSchemas) {
            schema.setElementFormDefault(new XmlSchemaForm(XmlSchemaForm.QUALIFIED));
        }
        schemaInfo.setSchema(schema);
        schema.getElements().add(el.getQName(), el);
        schema.getItems().add(el);
View Full Code Here

TOP

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

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.