Examples of XmlSchemaComplexContentExtension


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

       
        if (!(content instanceof XmlSchemaComplexContentExtension)) {
            return null;
        }
   
        XmlSchemaComplexContentExtension ext = (XmlSchemaComplexContentExtension)content;
        return ext.getBaseTypeName();       
    }
View Full Code Here

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

        if (!(content instanceof XmlSchemaComplexContentExtension)) {
            return null;
        }
   
        //TODO: the anyAttribute case.
        XmlSchemaComplexContentExtension ext = (XmlSchemaComplexContentExtension)content;
        return ext.getAttributes();
    }
View Full Code Here

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

        }
        if (!(content instanceof XmlSchemaComplexContentExtension)) {
            return null;
        }
   
        XmlSchemaComplexContentExtension ext = (XmlSchemaComplexContentExtension)content;
        XmlSchemaParticle particle = ext.getParticle();
        if (particle == null) {
            return null;
        }
        XmlSchemaSequence sequence = null;
        try {
View Full Code Here

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

        if(contentModel instanceof XmlSchemaSimpleContent) {
          return JavaQNameImpl.getInstance(Object.class);
        } else {
          XmlSchemaContent content = contentModel.getContent();
          if(content instanceof XmlSchemaComplexContentExtension) {
            XmlSchemaComplexContentExtension ext = (XmlSchemaComplexContentExtension)content;
            return JavaSourceUtils.toJavaQName(ext.getBaseTypeName());
          } else {
            XmlSchemaComplexContentRestriction rest = (XmlSchemaComplexContentRestriction)content;
            return JavaSourceUtils.toJavaQName(rest.getBaseTypeName());
          }
        }
View Full Code Here

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

        //If it's extension
        if (seq == null && type.getContentModel() != null) {
           
            XmlSchemaContent xmlSchemaConent = type.getContentModel().getContent();
            if (xmlSchemaConent instanceof XmlSchemaComplexContentExtension) {
                XmlSchemaComplexContentExtension extension = (XmlSchemaComplexContentExtension)type
                    .getContentModel().getContent();
                QName baseTypeName = extension.getBaseTypeName();
                XmlSchemaType schemaType = schema.getTypeByQName(baseTypeName);
                if (schemaType instanceof XmlSchemaComplexType) {
                    XmlSchemaComplexType complexType = (XmlSchemaComplexType)schemaType;
                    if (complexType.getParticle() instanceof XmlSchemaSequence) {
                        seq = (XmlSchemaSequence)complexType.getParticle();
                        qnames.addAll(createWrappedElements(seq));
                    }
                }

                if (extension.getParticle() instanceof XmlSchemaSequence) {
                    XmlSchemaSequence xmlSchemaSeq = (XmlSchemaSequence)extension.getParticle();
                    qnames.addAll(createWrappedElements(xmlSchemaSeq));
                }
            }

        }
View Full Code Here

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

    protected Struct processComplexContentStruct(XmlSchemaComplexContent complex, QName defaultName,
                                                 Struct corbaStruct, QName schematypeName)
        throws Exception {

        if (complex.getContent() instanceof XmlSchemaComplexContentExtension) {
            XmlSchemaComplexContentExtension extype
                = (XmlSchemaComplexContentExtension)complex.getContent();
            QName extName = extype.getBaseTypeName();
            corbaStruct = processComplexContentStructParticle(extype.getParticle(), defaultName, corbaStruct,
                                                         schematypeName, extName, extype.getAttributes());
        } else {
            if (complex.getContent() instanceof XmlSchemaComplexContentRestriction) {
                XmlSchemaComplexContentRestriction extype
                    = (XmlSchemaComplexContentRestriction)complex.getContent();
                QName extName = extype.getBaseTypeName();
                corbaStruct =
                    processComplexContentStructParticle(extype.getParticle(), defaultName,
                                                   corbaStruct, schematypeName,
                                                   extName, extype.getAttributes());
            }
        }
        return corbaStruct;
    }
View Full Code Here

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

        } else if (type.getParticle() == null) {
            if (type.getContentModel() == null) {
                return true;
            }
            if (type.getContentModel().getContent() instanceof XmlSchemaComplexContentExtension) {
                XmlSchemaComplexContentExtension extension = (XmlSchemaComplexContentExtension)type
                    .getContentModel().getContent();
                QName baseTypeName = extension.getBaseTypeName();
                ServiceInfo serviceInfo = wrapper.getOperation().getInterface().getService();
                XmlSchemaType schemaType = serviceInfo.getXmlSchemaCollection().getTypeByQName(baseTypeName);
                if (!(schemaType instanceof XmlSchemaComplexType)
                    || !isWrappableSequence((XmlSchemaComplexType)schemaType, namespaceURI, wrapper,
                                            allowRefs)) {
                    return false;
                }
                            
                if (extension.getParticle() instanceof XmlSchemaSequence) {
                    XmlSchemaSequence seq = (XmlSchemaSequence)extension.getParticle();
                    return buildMessageParts(seq, namespaceURI, wrapper, allowRefs);
               
               
            }
            return true;
View Full Code Here

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

        if (isExtension && sooperType != null) {
            // if sooperType is null, things are confused.
            XmlSchemaComplexContent content = new XmlSchemaComplexContent();
            complex.setContentModel(content);
            XmlSchemaComplexContentExtension extension = new XmlSchemaComplexContentExtension();
            content.setContent(extension);
            extension.setBaseTypeName(sooperType.getSchemaType());
            extension.setParticle(sequence);
        } else {
            complex.setParticle(sequence);
        }

        boolean needXmime = false;
View Full Code Here

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

        XmlSchemaContent content = contentModel.getContent();
        if (content == null) {
            return;
        }
        if (content instanceof XmlSchemaComplexContentExtension) {
            XmlSchemaComplexContentExtension extension = (XmlSchemaComplexContentExtension)content;
            XmlSchemaUtils.addImportIfNeeded(schema, extension.getBaseTypeName());
            addCrossImportsAttributeList(schema, extension.getAttributes());
            XmlSchemaParticle particle = extension.getParticle();
            if (particle instanceof XmlSchemaSequence) {
                addCrossImports(schema, (XmlSchemaSequence)particle);
            } else if (particle instanceof XmlSchemaChoice) {
                addCrossImports(schema, (XmlSchemaChoice)particle);
            } else if (particle instanceof XmlSchemaAll) {
                addCrossImports(schema, (XmlSchemaAll)particle);
            }
        } else if (content instanceof XmlSchemaComplexContentRestriction) {
            XmlSchemaComplexContentRestriction restriction = (XmlSchemaComplexContentRestriction)content;
            XmlSchemaUtils.addImportIfNeeded(schema, restriction.getBaseTypeName());
            addCrossImportsAttributeList(schema, restriction.getAttributes());
        } else if (content instanceof XmlSchemaSimpleContentExtension) {
            XmlSchemaSimpleContentExtension extension = (XmlSchemaSimpleContentExtension)content;
            XmlSchemaUtils.addImportIfNeeded(schema, extension.getBaseTypeName());
            addCrossImportsAttributeList(schema, extension.getAttributes());
        } else if (content instanceof XmlSchemaSimpleContentRestriction) {
            XmlSchemaSimpleContentRestriction restriction = (XmlSchemaSimpleContentRestriction)content;
            XmlSchemaUtils.addImportIfNeeded(schema, restriction.getBaseTypeName());
            addCrossImportsAttributeList(schema, restriction.getAttributes());
        }
View Full Code Here

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

        XmlSchema attributeTypeSchema = newSchema(ATTRIBUTE_TYPE_SCHEMA);

        createBaseType1(baseTypeSchema1);

        createBaseType2(baseTypeSchema2);
        XmlSchemaComplexContentExtension derivedType1Extension = createDerivedType1(importingSchema);
        createDerivedType2(importingSchema);

        createImportedElement(elementSchema);

        createTypeImportingElement(importingSchema);

        createTypeImportedByElement(elementTypeSchema);

        createElementWithImportedType(importingSchema);

        createImportedAttribute(attributeSchema);

        XmlSchemaAttribute importingAttribute = new XmlSchemaAttribute(importingSchema, false);
        importingAttribute.getRef().setTargetQName(new QName(ATTRIBUTE_SCHEMA, "imported"));
        // borrow derivedType1 to make the reference.
        derivedType1Extension.getAttributes().add(importingAttribute);

        createImportedAttributeType(attributeTypeSchema);

        createAttributeImportingType(importingSchema);
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.