Examples of XmlSchemaType


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

        AST identifierNode = TypesUtils.getCorbaTypeNameNode(typeDeclaratorNode);
       
        TypesVisitor typesVisitor = new TypesVisitor(getScope(), schemas, schema, typeMap, identifierNode);
        typesVisitor.visit(typeDeclaratorNode);

        XmlSchemaType schemaType = typesVisitor.getSchemaType();
        CorbaTypeImpl corbaType = typesVisitor.getCorbaType();
       
        Scope typedefScope = new Scope(getScope(), identifierNode);
       
        if (SequenceVisitor.accept(typeDeclaratorNode)
View Full Code Here

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

        return null;
    }

    //Change this method to access the XmlSchemaCollection.   
    private static XmlSchemaType getXmlSchemaType(XmlSchema schema, QName name) {
        XmlSchemaType result = schema.getTypeByName(name);
        if (result == null) {
            Iterator it = schema.getIncludes().getIterator();
            while (it.hasNext()) {
                XmlSchemaExternal extSchema = (XmlSchemaExternal) it.next();
                return getXmlSchemaType(extSchema.getSchema(), name);
View Full Code Here

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

    private void addAnyType() {
        XmlSchema[] schemaList = schemas.getXmlSchemas();
        if (schemaList != null) {
            for (int i = 0; i < schemaList.length; i++) {
                if (schemaList[i].getTargetNamespace().equals(Constants.URI_2001_SCHEMA_XSD)) {
                    XmlSchemaType anyType = new XmlSchemaType(schemaList[0]);
                    anyType.setName(Constants.XSD_ANYTYPE.getLocalPart());
                    schemaList[i].addType(anyType);
                    break;
                }
            }
        }
View Full Code Here

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

            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;
                }
View Full Code Here

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

            }
            part.setXmlSchema(el);
        } 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);
View Full Code Here

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

        // Before updating everything, make sure we haven't added this
        // type yet.  Multiple methods that throw the same exception
        // types will cause duplicates.
        String faultTypeName = xmlTypeAnno != null && !StringUtils.isEmpty(xmlTypeAnno.name())
               ? xmlTypeAnno.name()  :  part.getElementQName().getLocalPart();
        XmlSchemaType existingType = schema.getTypeByName(faultTypeName);
        if (existingType != null) {
            return;
        }

        XmlSchemaElement el = new XmlSchemaElement(schema, true);
View Full Code Here

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

                namespace = defaultNamespace;
            }
        }
        final QName qname = new QName(namespace, name + postfix);
        final XmlSchemaElement el = schemas.getElementByQName(qname);
        XmlSchemaType type = null;
        if (el != null) {
            type = el.getSchemaType();
        }
        if (type == null) {
            type = schemas.getTypeByQName(getTypeQName(origCls, namespace));
            if (type == null) {
                type = schemas.getTypeByQName(qname);
            }
        }
        if (type == null) {
            type = mapToSchemaType(origCls, namespace);
            /*
            if (type == null) {
                type = mapToSchemaType(cls, namespace);
            }
            */
        }
        if (el == null && type == null) {
            return null;
        }
        final QName typeName = type == null ? null : type.getQName();
       
        JAXBBeanInfo bi = new JAXBBeanInfo() {
            public boolean isElement() {
                return el == null ? false : true;
            }
View Full Code Here

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

        }
        return new QName(tns, tn);
    }
    private XmlSchemaType mapToSchemaType(Class<?> cls, String namespace) {
        QName qn = getTypeQName(cls, namespace);
        XmlSchemaType type = null;
        if (qn != null) {
            type = schemas.getTypeByQName(qn);
        }
        if (type == null && cls.isArray()) {
            Class<?> compType = cls.getComponentType();
View Full Code Here

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

    public String getImportSchemaFilename() {
        return importSchemaFilename;
    }       
   
    public void setSequenceOctetType(String type) throws Exception {
        XmlSchemaType stype = null;
        if (type.equals(ToolCorbaConstants.CFG_SEQUENCE_OCTET_TYPE_BASE64BINARY)) {
            stype = schemas.getTypeByQName(Constants.XSD_BASE64);
        } else if (type.equals(ToolCorbaConstants.CFG_SEQUENCE_OCTET_TYPE_HEXBINARY)) {
            stype = schemas.getTypeByQName(Constants.XSD_HEXBIN);
        } else {
View Full Code Here

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

    private void addAnyType() {
        XmlSchema[] schemaList = schemas.getXmlSchemas();
        if (schemaList != null) {
            for (int i = 0; i < schemaList.length; i++) {
                if (schemaList[i].getTargetNamespace().equals(Constants.URI_2001_SCHEMA_XSD)) {
                    XmlSchemaType anyType = new XmlSchemaType(schemaList[i]);
                    anyType.setName(Constants.XSD_ANYTYPE.getLocalPart());
                    schemaList[i].addType(anyType);
                    break;
                }
            }
        }
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.