Examples of XmlSchemaComplexType


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

        assertValid("/b:root[@b:howdy='howdy']", element);
       
        XmlSchema schema = newXmlSchema("urn:Bean");
        type.writeSchema(schema);
       
        XmlSchemaComplexType stype = (XmlSchemaComplexType)schema.getTypeByName("bean");
        boolean howdy = false;
        boolean bleh = false;
        for (int x = 0; x < stype.getAttributes().getCount(); x++) {
            XmlSchemaObject o = stype.getAttributes().getItem(x);
            if (o instanceof XmlSchemaAttribute) {
                XmlSchemaAttribute a = (XmlSchemaAttribute)o;
                if ("howdy".equals(a.getName())) {
                    howdy = true;
                }
View Full Code Here

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

        assertValid("/b:root/b:bleh[@xsi:nil='true']", element);

        XmlSchema schema = newXmlSchema("urn:Bean");
        type.writeSchema(schema);
       
        XmlSchemaComplexType stype = (XmlSchemaComplexType)schema.getTypeByName("bean");
        XmlSchemaSequence seq = (XmlSchemaSequence) stype.getParticle();
        boolean howdy = false;
        boolean bleh = false;

        for (int x = 0; x < seq.getItems().getCount(); x++) {
            XmlSchemaObject o = seq.getItems().getItem(x);
            if (o instanceof XmlSchemaElement) {
                XmlSchemaElement a = (XmlSchemaElement)o;
                if ("bleh".equals(a.getName())) {
                    bleh = true;
                }
            }
        }

        for (int x = 0; x < stype.getAttributes().getCount(); x++) {
            XmlSchemaObject o = stype.getAttributes().getItem(x);
            if (o instanceof XmlSchemaAttribute) {
                XmlSchemaAttribute a = (XmlSchemaAttribute)o;
                if ("howdy".equals(a.getName())) {
                    howdy = true;
                }
View Full Code Here

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

        type.setSchemaType(new QName("urn:Bean", "bean"));

        XmlSchema schema = newXmlSchema("urn:Bean");
        type.writeSchema(schema);
       
        XmlSchemaComplexType btype = (XmlSchemaComplexType)schema.getTypeByName("bean");
        XmlSchemaSequence seq = (XmlSchemaSequence)btype.getParticle();
        boolean int1ok = false;
        boolean int2ok = false;
        for (int x = 0; x < seq.getItems().getCount(); x++) {
            XmlSchemaObject o = seq.getItems().getItem(x);
            if (o instanceof XmlSchemaElement) {
View Full Code Here

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

        entryWriter.close();
    }

    @Override
    public void writeSchema(XmlSchema root) {
        XmlSchemaComplexType complex = new XmlSchemaComplexType(root);
        complex.setName(getSchemaType().getLocalPart());
        root.addType(complex);
        root.getItems().add(complex);
        XmlSchemaSequence sequence = new XmlSchemaSequence();
        complex.setParticle(sequence);

        AegisType kType = getKeyType();
        AegisType vType = getValueType();
       
        XmlSchemaElement element = new XmlSchemaElement();
        sequence.getItems().add(element);
        element.setName(getEntryName().getLocalPart());
        element.setMinOccurs(0);
        element.setMaxOccurs(Long.MAX_VALUE);
       
        XmlSchemaComplexType evType = new XmlSchemaComplexType(root);
        element.setType(evType);
       
        XmlSchemaSequence evSequence = new XmlSchemaSequence();
        evType.setParticle(evSequence);

        createElement(evSequence, getKeyName(), kType, false);
        createElement(evSequence, getValueName(), vType, true);
    }
View Full Code Here

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

        type.setTypeMapping(mapping);

        XmlSchema schema = newXmlSchema("urn:Bean");
        type.writeSchema(schema);
       
        XmlSchemaComplexType btype = (XmlSchemaComplexType)schema.getTypeByName("BeanWithNillableItem");
        XmlSchemaSequence seq = (XmlSchemaSequence)btype.getParticle();
        boolean itemFound = false;
        boolean itemNotNillableFound = false;
        for (int x = 0; x < seq.getItems().getCount(); x++) {
            XmlSchemaObject o = seq.getItems().getItem(x);
            if (o instanceof XmlSchemaElement) {
View Full Code Here

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

        type.setTypeMapping(mapping);

        XmlSchema schema = newXmlSchema("urn:Bean");
        type.writeSchema(schema);
       
        XmlSchemaComplexType btype = (XmlSchemaComplexType)schema.getTypeByName("IntBean");
        XmlSchemaSequence seq = (XmlSchemaSequence)btype.getParticle();
        boolean int1ok = false;
        for (int x = 0; x < seq.getItems().getCount(); x++) {
            XmlSchemaObject o = seq.getItems().getItem(x);
            if (o instanceof XmlSchemaElement) {
                XmlSchemaElement oe = (XmlSchemaElement) o;
View Full Code Here

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

        type.setTypeMapping(mapping);
       
        XmlSchema schema = newXmlSchema("urn:Bean");
        type.writeSchema(schema);
       
        XmlSchemaComplexType btype = (XmlSchemaComplexType)schema.getTypeByName("SimpleBean");
        XmlSchemaSequence seq = (XmlSchemaSequence)btype.getParticle();
        boolean charok = false;

        for (int x = 0; x < seq.getItems().getCount(); x++) {
            XmlSchemaObject o = seq.getItems().getItem(x);
            if (o instanceof XmlSchemaElement) {
View Full Code Here

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

        type.setTypeMapping(mapping);

        XmlSchema schema = newXmlSchema("urn:Bean");
        type.writeSchema(schema);
       
        XmlSchemaComplexType btype = (XmlSchemaComplexType)schema.getTypeByName("SimpleBean");
        XmlSchemaSequence seq = (XmlSchemaSequence)btype.getParticle();
        boolean littleByteOk = false;
        boolean bigByteOk = false;

        for (int x = 0; x < seq.getItems().getCount(); x++) {
            XmlSchemaObject o = seq.getItems().getItem(x);
View Full Code Here

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

        }
        if (hasDefinedArray(root)) {
            return;
        }

        XmlSchemaComplexType complex = new XmlSchemaComplexType(root);
        complex.setName(getSchemaType().getLocalPart());
        root.addType(complex);
        root.getItems().add(complex);

        XmlSchemaSequence seq = new XmlSchemaSequence();
        complex.setParticle(seq);

        AegisType componentType = getComponentType();
        XmlSchemaElement element = new XmlSchemaElement();
        element.setName(componentType.getSchemaType().getLocalPart());
        element.setSchemaTypeName(componentType.getSchemaType());
View Full Code Here

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

            schemaInfo.getSchema().getElements().add(el.getQName(), el);
            schemaInfo.setElement(null);

            part.setXmlSchema(el);

            XmlSchemaComplexType ct = new XmlSchemaComplexType(schemaInfo.getSchema());
            el.setSchemaType(ct);
            XmlSchemaSequence seq = new XmlSchemaSequence();
            ct.setParticle(seq);
               
            Method methods[] = cls.getMethods();
            for (Method m : methods) {
                if (m.getName().startsWith("get")
                    || m.getName().startsWith("is")) {
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.