Package org.apache.axis2.rmi.metadata

Examples of org.apache.axis2.rmi.metadata.AttributeField.generateSchema()


            ElementField elementField;
            for (Iterator iter = this.elementFields.iterator();iter.hasNext();){
                elementField = (ElementField) iter.next();
                if (!elementField.isSchemaGenerated()){
                    // if it is not already processed process it.
                    elementField.generateSchema(configurator,schemaMap);
                }
                this.xmlType.addElement(elementField.getElement());
                // we have to set the namespaces of these element complex types properly
                QName elementTypeQName = elementField.getElement().getType().getQname();
                if (!xmlSchema.containsNamespace(elementTypeQName.getNamespaceURI())){
View Full Code Here


            Map processedTypeMap = new HashMap();
            Map processedSchemaMap = new HashMap();
            Parameter parameter = new Parameter(Config.class, "config");
            parameter.setNamespace("http://ws.apache.org/axis2/rmi");
            parameter.populateMetaData(configurator, processedTypeMap);
            parameter.generateSchema(configurator, processedSchemaMap);

            XmlStreamParser xmlStreamParser = new XmlStreamParser(processedTypeMap, configurator, processedSchemaMap);
            return (Config) xmlStreamParser.getObjectForParameter(xmlReader, parameter);
        } catch (IOException e) {
            throw new ConfigFileReadingException("Can not read configuration file", e);
View Full Code Here

        try {
            this.configurator.addPackageToNamespaceMaping("org.apache.axis2.rmi.deploy.config",
                    "http://ws.apache.org/axis2/rmi");
            parameter.populateMetaData(configurator, processedMap);
            parameter.generateSchema(configurator, schemaMap);
            StringWriter configXmlWriter = new StringWriter();
            XMLStreamWriter writer = StAXUtils.createXMLStreamWriter(configXmlWriter);
            JavaObjectSerializer javaObjectSerializer = new JavaObjectSerializer(this.processedMap, this.configurator, this.schemaMap);
            javaObjectSerializer.serializeParameter(config, parameter, writer, new NamespacePrefix());
            writer.flush();
View Full Code Here

    public void deployClass(Class serviceClass) throws AxisFault {
        Service service = new Service(serviceClass, this.configurator);
        try {
            service.populateMetaData();
            service.generateSchema();
            WSDL11DefinitionBuilder definitionBuilder = new WSDL11DefinitionBuilder(service);
            Definition definition = definitionBuilder.generateWSDL();

            WSDL11ToAxisServiceBuilder builder = new WSDL11ToAxisServiceBuilder(definition, null, null);
            AxisService axisService = builder.populateService();
View Full Code Here

    private void testWSDL() {
        Configurator configurator = new Configurator();
        Service service = new Service(Service1.class, configurator);
        try {
            service.populateMetaData();
            service.generateSchema();
            WSDL11DefinitionBuilder definitionBuilder = new WSDL11DefinitionBuilder(service);
            Definition definition = definitionBuilder.generateWSDL();

            WSDLWriter wsdlWriter = WSDLFactory.newInstance().newWSDLWriter();
            FileWriter fileWriter = new FileWriter("test.wsdl");
View Full Code Here

             // set the parent type for this type
            if (this.parentType != null){
                Type parentType = this.parentType;
                if (!parentType.isSchemaGenerated()){
                    parentType.generateSchema(configurator,schemaMap);
                }
                this.xmlType.setParentType(parentType.getXmlType());
                // import the complex type namespace if needed.
                if (!xmlSchema.containsNamespace(this.xmlType.getParentType().getQname().getNamespaceURI())){
                    // if the element namespace does not exists we have to add it
View Full Code Here

            typeClass = (Class) iter.next();
            if (!processedTypeMap.containsKey(typeClass)) {
                Type newType = new TypeImpl(typeClass);
                processedTypeMap.put(typeClass, newType);
                newType.populateMetaData(this.configurator, processedTypeMap);
                newType.generateSchema(this.configurator, schemaMap);
            }
        }
        this.qNameToTypeMap = new HashMap();
        Type type = null;
        for (Iterator iter = processedTypeMap.values().iterator(); iter.hasNext();) {
View Full Code Here

                    if (!processedTypeMap.containsKey(object.getClass())) {
                        Type newType = new TypeImpl(object.getClass());
                        processedTypeMap.put(object.getClass(), newType);
                        try {
                            newType.populateMetaData(this.configurator, this.processedTypeMap);
                            newType.generateSchema(this.configurator, this.schemaMap);
                        } catch (MetaDataPopulateException e) {
                            new XmlSerializingException("Problem in processing new type", e);
                        } catch (SchemaGenerationException e) {
                            new XmlSerializingException("Problem in processing new type", e);
                        }
View Full Code Here

            typeClass = (Class) iter.next();
            if (!processedTypeMap.containsKey(typeClass)) {
                Type newType = new TypeImpl(typeClass);
                processedTypeMap.put(typeClass, newType);
                newType.populateMetaData(this.configurator, processedTypeMap);
                newType.generateSchema(this.configurator, schemaMap);
            }
        }
        this.qNameToTypeMap = new HashMap();
        Type type = null;
        for (Iterator iter = processedTypeMap.values().iterator(); iter.hasNext();) {
View Full Code Here

                    if (!processedTypeMap.containsKey(object.getClass())) {
                        Type newType = new TypeImpl(object.getClass());
                        processedTypeMap.put(object.getClass(), newType);
                        try {
                            newType.populateMetaData(this.configurator, this.processedTypeMap);
                            newType.generateSchema(this.configurator, this.schemaMap);
                        } catch (MetaDataPopulateException e) {
                            new XmlSerializingException("Problem in processing new type", e);
                        } catch (SchemaGenerationException e) {
                            new XmlSerializingException("Problem in processing new type", e);
                        }
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.