Examples of XmlTypeImpl


Examples of org.apache.axis2.rmi.metadata.xml.impl.XmlTypeImpl

        // here we have to populate the xmlType object properly
        this.isSchemaGenerated = true;
        if (JavaTypeToQNameMap.containsKey(this.javaClass)){
            // i.e. this is a basic type
            // no need to process or add this to schema list
            this.xmlType = new XmlTypeImpl(JavaTypeToQNameMap.getTypeQName(this.javaClass));
            this.xmlType.setSimpleType(true);
        } else {

            // get the schema to add the complex type
            if (schemaMap.get(this.namespace) == null){
                // create a new namespace for this schema
                schemaMap.put(this.namespace, new XmlSchema(this.namespace));
            }
            XmlSchema xmlSchema = (XmlSchema) schemaMap.get(this.namespace);

            // we have to generate a complex type for this
            this.xmlType = new XmlTypeImpl(new QName(this.namespace,this.name));
            this.xmlType.setSimpleType(false);

             // set the parent type for this type
            if (this.parentType != null){
                Type parentType = this.parentType;
View Full Code Here

Examples of org.apache.axis2.rmi.metadata.xml.impl.XmlTypeImpl

            this.inputElement.setNamespace(this.namespace);
            this.inputElement.setTopElement(true);
            xmlSchema.addElement(this.inputElement);

            // set the complex type for this element
            XmlType xmlType = new XmlTypeImpl();
            xmlType.setAnonymous(true);
            xmlType.setSimpleType(false);

            Parameter parameter;
            for (Iterator iter = this.inputParameters.iterator(); iter.hasNext();) {
                parameter = (Parameter) iter.next();
                if (!parameter.isSchemaGenerated()){
                   parameter.generateSchema(configurator,schemaMap);
                }
                parameter.getElement().setTopElement(false);
                xmlType.addElement(parameter.getElement());
                QName elementTypeQName = parameter.getElement().getType().getQname();
                if (!xmlSchema.containsNamespace(elementTypeQName.getNamespaceURI())) {
                    // if the element namespace does not exists we have to add it
                    if (!elementTypeQName.getNamespaceURI().equals(Constants.URI_2001_SCHEMA_XSD)) {
                        XmlImport xmlImport = new XmlImport(elementTypeQName.getNamespaceURI());
                        xmlSchema.addImport(xmlImport);
                    }
                    xmlSchema.addNamespace(elementTypeQName.getNamespaceURI());
                }
            }

            this.inputElement.setType(xmlType);

            // generate the output Element
            this.outPutElement = new XmlElementImpl(false);
            this.outPutElement.setName(this.name + "Response");
            this.outPutElement.setNamespace(this.namespace);
            this.outPutElement.setTopElement(true);
            xmlSchema.addElement(this.outPutElement);

            xmlType = new XmlTypeImpl();
            xmlType.setAnonymous(true);
            xmlType.setSimpleType(false);
            if (this.outputParameter != null) {
                if (!this.outputParameter.isSchemaGenerated()){
                    this.outputParameter.generateSchema(configurator,schemaMap);
                }
                xmlType.addElement(this.outputParameter.getElement());
                QName elementTypeQName = this.outputParameter.getElement().getType().getQname();
                if (!xmlSchema.containsNamespace(elementTypeQName.getNamespaceURI())) {
                    // if the element namespace does not exists we have to add it
                    if (!elementTypeQName.getNamespaceURI().equals(Constants.URI_2001_SCHEMA_XSD)) {
                        XmlImport xmlImport = new XmlImport(elementTypeQName.getNamespaceURI());
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.