Examples of SchemaCompiler


Examples of com.sun.tools.xjc.api.SchemaCompiler

        Service svc = client.getEndpoint().getService();
        //all SI's should have the same schemas
        Collection<SchemaInfo> schemas = svc.getServiceInfos().get(0).getSchemas();

        SchemaCompiler compiler = XJC.createSchemaCompiler();
        ErrorListener elForRun = new InnerErrorListener(wsdlUrl);
        compiler.setErrorListener(elForRun);

        addSchemas(wsdlUrl, schemas, compiler);
       
        S2JJAXBModel intermediateModel = compiler.bind();
        JCodeModel codeModel = intermediateModel.generateCode(null, elForRun);
        StringBuilder sb = new StringBuilder();
        boolean firstnt = false;

        for (Iterator<JPackage> packages = codeModel.packages(); packages.hasNext();) {
View Full Code Here

Examples of com.sun.tools.xjc.api.SchemaCompiler

    }

    public void initialize(ToolContext c) throws ToolException {
        this.context = c;

        SchemaCompiler schemaCompiler = XJC.createSchemaCompiler();
        Bus bus = context.get(Bus.class);
        OASISCatalogManager catalog = bus.getExtension(OASISCatalogManager.class);
        hackInNewInternalizationLogic(schemaCompiler, catalog);

        ClassCollector classCollector = context.get(ClassCollector.class);

        ClassNameAllocatorImpl allocator
            = new ClassNameAllocatorImpl(classCollector,
                                         c.optionSet(ToolConstants.CFG_AUTORESOLVE));

        schemaCompiler.setClassNameAllocator(allocator);

        listener = new JAXBBindErrorListener(context.isVerbose());
        schemaCompiler.setErrorListener(listener);
        // Collection<SchemaInfo> schemas = serviceInfo.getSchemas();
        List<InputSource> jaxbBindings = context.getJaxbBindingFile();
        SchemaCollection schemas = (SchemaCollection) context.get(ToolConstants.XML_SCHEMA_COLLECTION);

        Options opts = null;
        opts = getOptions(schemaCompiler);

        List<String> args = new ArrayList<String>();

        if (context.get(ToolConstants.CFG_NO_ADDRESS_BINDING) == null) {
            //hard code to enable jaxb extensions
            args.add("-extension");
            String name = "/org/apache/cxf/tools/common/jaxb/W3CEPRJaxbBinding.xml";
            if (isJAXB22()) {
                name = "/org/apache/cxf/tools/common/jaxb/W3CEPRJaxbBinding_jaxb22.xml";
            }
            URL bindingFileUrl = getClass().getResource(name);
            InputSource ins = new InputSource(bindingFileUrl.toString());
            opts.addBindFile(ins);
        }

        if (context.get(ToolConstants.CFG_XJC_ARGS) != null) {
            Object o = context.get(ToolConstants.CFG_XJC_ARGS);
            if (o instanceof String) {
                o = new String[] {(String)o};
            }
            String[] xjcArgss = (String[])o;
            for (String xjcArgs : xjcArgss) {
                StringTokenizer tokenizer = new StringTokenizer(xjcArgs, ",", false);
                while (tokenizer.hasMoreTokens()) {
                    String arg = tokenizer.nextToken();
                    args.add(arg);
                    LOG.log(Level.FINE, "xjc arg:" + arg);
                }
            }
        }

        if (context.get(ToolConstants.CFG_NO_ADDRESS_BINDING) == null
            || context.get(ToolConstants.CFG_XJC_ARGS) != null) {
            try {
                // keep parseArguments happy, supply dummy required command-line
                // opts
                opts.addGrammar(new InputSource("null"));
                opts.parseArguments(args.toArray(new String[] {}));
            } catch (BadCommandLineException e) {
                String msg = "XJC reported 'BadCommandLineException' for -xjc argument:";
                for (String arg : args) {
                    msg = msg + arg + " ";
                }
                LOG.log(Level.FINE, msg, e);
                if (opts != null) {
                    String pluginUsage = getPluginUsageString(opts);
                    msg = msg + System.getProperty("line.separator");
                    if (args.contains("-X")) {
                        msg = pluginUsage;
                    } else {
                        msg += pluginUsage;
                    }
                }

                throw new ToolException(msg, e);
            }
        }
       
        if (context.optionSet(ToolConstants.CFG_MARK_GENERATED)) {
            // Add the @Generated annotation in the Java files generated. This is done by passing
            // '-mark-generated' attribute to jaxb xjc.
            try {
                opts.parseArgument(new String[] {"-mark-generated" }, 0);
            } catch (BadCommandLineException e) {
                LOG.log(Level.SEVERE, e.getMessage());
                throw new ToolException(e);
            }
        }
        addSchemas(opts, schemaCompiler, schemas);
        addBindingFiles(opts, jaxbBindings, schemas);


        for (String ns : context.getNamespacePackageMap().keySet()) {
            File file = JAXBUtils.getPackageMappingSchemaBindingFile(ns, context.mapPackageName(ns));
            try {
                InputSource ins = new InputSource(file.toURI().toString());
                schemaCompiler.parseSchema(ins);
            } finally {
                FileUtils.delete(file);
            }
        }

        if (context.getPackageName() != null) {
            schemaCompiler.setDefaultPackageName(context.getPackageName());
        }

       
        rawJaxbModelGenCode = schemaCompiler.bind();

        addedEnumClassToCollector(schemas, allocator);

        if (context.get(ToolConstants.CFG_DEFAULT_VALUES) != null) {
            String cname = (String)context.get(ToolConstants.CFG_DEFAULT_VALUES);
View Full Code Here

Examples of com.sun.tools.xjc.api.SchemaCompiler


    public void initialize(ToolContext c) throws ToolException {
        this.context = c;
       
        SchemaCompiler schemaCompiler = XJC.createSchemaCompiler();
        ClassCollector classCollector = context.get(ClassCollector.class);
       
        ClassNameAllocatorImpl allocator
            = new ClassNameAllocatorImpl(classCollector,
                                         c.optionSet(ToolConstants.CFG_AUTORESOLVE));

        schemaCompiler.setClassNameAllocator(allocator);
          
        JAXBBindErrorListener listener = new JAXBBindErrorListener(context.isVerbose());
        schemaCompiler.setErrorListener(listener);
        // Collection<SchemaInfo> schemas = serviceInfo.getSchemas();
        List<InputSource> jaxbBindings = context.getJaxbBindingFile();
        Map<String, Element> schemaLists = CastUtils.cast((Map<?, ?>)context.get(ToolConstants.SCHEMA_MAP));

       
        Options opts = null;
        opts = getOptions(schemaCompiler);
        List<String> args = new ArrayList<String>();
       
        if (context.get(ToolConstants.CFG_NO_ADDRESS_BINDING) == null) {
            //hard code to enable jaxb extensions
            args.add("-extension");
            URL bindingFileUrl = getClass().getResource("W3CEPRJaxbBinding.xml");
            InputSource ins = new InputSource(bindingFileUrl.toString());
            opts.addBindFile(ins);
        }
       
        if (context.get(ToolConstants.CFG_XJC_ARGS) != null) {
            String xjcArgs = (String)context.get(ToolConstants.CFG_XJC_ARGS);
            StringTokenizer tokenizer = new StringTokenizer(xjcArgs, ",", false);
            while (tokenizer.hasMoreTokens()) {
                String arg = tokenizer.nextToken();
                args.add(arg);
                LOG.log(Level.FINE, "xjc arg:" + arg);
            }
        }

        if (context.get(ToolConstants.CFG_NO_ADDRESS_BINDING) == null
            || context.get(ToolConstants.CFG_XJC_ARGS) != null) {
            try {
                // keep parseArguments happy, supply dummy required command-line
                // opts
                opts.addGrammar(new InputSource("null"));
                opts.parseArguments(args.toArray(new String[] {}));
            } catch (BadCommandLineException e) {
                String msg = "XJC reported 'BadCommandLineException' for -xjc argument:";
                for (String arg : args) {
                    msg = msg + arg + " ";
                }
                LOG.log(Level.FINE, msg, e);
                if (opts != null) {
                    String pluginUsage = getPluginUsageString(opts);
                    msg = msg + System.getProperty("line.separator");
                    if (args.contains("-X")) {
                        msg = pluginUsage;
                    } else {
                        msg += pluginUsage;
                    }
                }

                throw new ToolException(msg, e);
            }
        }
       
       
        addSchemas(opts, schemaCompiler, schemaLists);

        for (InputSource binding : jaxbBindings) {
            opts.addBindFile(binding);
        }

                      
        for (String ns : context.getNamespacePackageMap().keySet()) {
            File file = JAXBUtils.getPackageMappingSchemaBindingFile(ns, context.mapPackageName(ns));
            try {
                InputSource ins = new InputSource(file.toURI().toString());
                schemaCompiler.parseSchema(ins);
            } finally {
                FileUtils.delete(file);               
            }
        }
       
        if (context.getPackageName() != null) {
            schemaCompiler.setDefaultPackageName(context.getPackageName());
       
       

        rawJaxbModelGenCode = schemaCompiler.bind();

        addedEnumClassToCollector(schemaLists, allocator);

        if (context.get(ToolConstants.CFG_DEFAULT_VALUES) != null) {
            String cname = (String)context.get(ToolConstants.CFG_DEFAULT_VALUES);
View Full Code Here

Examples of com.sun.tools.xjc.api.SchemaCompiler

    }

    public void initialize(ToolContext c) throws ToolException {
        this.context = c;

        SchemaCompiler schemaCompiler = XJC.createSchemaCompiler();
        Bus bus = context.get(Bus.class);
        OASISCatalogManager catalog = bus.getExtension(OASISCatalogManager.class);
        hackInNewInternalizationLogic(schemaCompiler, catalog);

        ClassCollector classCollector = context.get(ClassCollector.class);

        ClassNameAllocatorImpl allocator
            = new ClassNameAllocatorImpl(classCollector,
                                         c.optionSet(ToolConstants.CFG_AUTORESOLVE));

        schemaCompiler.setClassNameAllocator(allocator);

        listener = new JAXBBindErrorListener(context.isVerbose());
        schemaCompiler.setErrorListener(listener);
        // Collection<SchemaInfo> schemas = serviceInfo.getSchemas();
        List<InputSource> jaxbBindings = context.getJaxbBindingFile();
        SchemaCollection schemas = (SchemaCollection) context.get(ToolConstants.XML_SCHEMA_COLLECTION);

        Options opts = null;
        opts = getOptions(schemaCompiler);

        List<String> args = new ArrayList<String>();

        if (context.get(ToolConstants.CFG_NO_ADDRESS_BINDING) == null) {
            //hard code to enable jaxb extensions
            args.add("-extension");
            String name = "/org/apache/cxf/tools/common/jaxb/W3CEPRJaxbBinding.xml";
            if (isJAXB22()) {
                name = "/org/apache/cxf/tools/common/jaxb/W3CEPRJaxbBinding_jaxb22.xml";
            }
            URL bindingFileUrl = getClass().getResource(name);
            InputSource ins = new InputSource(bindingFileUrl.toString());
            opts.addBindFile(ins);
        }

        if (context.get(ToolConstants.CFG_XJC_ARGS) != null) {
            Object o = context.get(ToolConstants.CFG_XJC_ARGS);
            if (o instanceof String) {
                o = new String[] {(String)o};
            }
            String[] xjcArgss = (String[])o;
            for (String xjcArgs : xjcArgss) {
                StringTokenizer tokenizer = new StringTokenizer(xjcArgs, ",", false);
                while (tokenizer.hasMoreTokens()) {
                    String arg = tokenizer.nextToken();
                    args.add(arg);
                    LOG.log(Level.FINE, "xjc arg:" + arg);
                }
            }
        }

        if (context.get(ToolConstants.CFG_NO_ADDRESS_BINDING) == null
            || context.get(ToolConstants.CFG_XJC_ARGS) != null) {
            try {
                // keep parseArguments happy, supply dummy required command-line
                // opts
                opts.addGrammar(new InputSource("null"));
                opts.parseArguments(args.toArray(new String[] {}));
            } catch (BadCommandLineException e) {
                String msg = "XJC reported 'BadCommandLineException' for -xjc argument:";
                for (String arg : args) {
                    msg = msg + arg + " ";
                }
                LOG.log(Level.FINE, msg, e);
                if (opts != null) {
                    String pluginUsage = getPluginUsageString(opts);
                    msg = msg + System.getProperty("line.separator");
                    if (args.contains("-X")) {
                        msg = pluginUsage;
                    } else {
                        msg += pluginUsage;
                    }
                }

                throw new ToolException(msg, e);
            }
        }
       
        if (context.optionSet(ToolConstants.CFG_MARK_GENERATED)) {
            // Add the @Generated annotation in the Java files generated. This is done by passing
            // '-mark-generated' attribute to jaxb xjc.
            try {
                opts.parseArgument(new String[] {"-mark-generated" }, 0);
            } catch (BadCommandLineException e) {
                LOG.log(Level.SEVERE, e.getMessage());
                throw new ToolException(e);
            }
        }
        addSchemas(opts, schemaCompiler, schemas);
        addBindingFiles(opts, jaxbBindings, schemas);


        for (String ns : context.getNamespacePackageMap().keySet()) {
            File file = JAXBUtils.getPackageMappingSchemaBindingFile(ns, context.mapPackageName(ns));
            try {
                InputSource ins = new InputSource(file.toURI().toString());
                schemaCompiler.parseSchema(ins);
            } finally {
                FileUtils.delete(file);
            }
        }

        if (context.getPackageName() != null) {
            schemaCompiler.setDefaultPackageName(context.getPackageName());
        }

       
        rawJaxbModelGenCode = schemaCompiler.bind();

        addedEnumClassToCollector(schemas, allocator);

        if (context.get(ToolConstants.CFG_DEFAULT_VALUES) != null) {
            String cname = (String)context.get(ToolConstants.CFG_DEFAULT_VALUES);
View Full Code Here

Examples of com.sun.tools.xjc.api.SchemaCompiler

    }

    public void initialize(ToolContext c) throws ToolException {
        this.context = c;

        SchemaCompiler schemaCompiler = XJC.createSchemaCompiler();
        Bus bus = context.get(Bus.class);
        OASISCatalogManager catalog = bus.getExtension(OASISCatalogManager.class);
        hackInNewInternalizationLogic(schemaCompiler, catalog);

        ClassCollector classCollector = context.get(ClassCollector.class);

        ClassNameAllocatorImpl allocator
            = new ClassNameAllocatorImpl(classCollector,
                                         c.optionSet(ToolConstants.CFG_AUTORESOLVE));

        schemaCompiler.setClassNameAllocator(allocator);

        listener = new JAXBBindErrorListener(context.isVerbose());
        schemaCompiler.setErrorListener(listener);
        // Collection<SchemaInfo> schemas = serviceInfo.getSchemas();
        List<InputSource> jaxbBindings = context.getJaxbBindingFile();
        SchemaCollection schemas = (SchemaCollection) context.get(ToolConstants.XML_SCHEMA_COLLECTION);

        Options opts = null;
        opts = getOptions(schemaCompiler);

        List<String> args = new ArrayList<String>();

        if (context.get(ToolConstants.CFG_NO_ADDRESS_BINDING) == null) {
            //hard code to enable jaxb extensions
            args.add("-extension");
            String name = "/org/apache/cxf/tools/common/jaxb/W3CEPRJaxbBinding.xml";
            if (isJAXB22()) {
                name = "/org/apache/cxf/tools/common/jaxb/W3CEPRJaxbBinding_jaxb22.xml";
            }
            URL bindingFileUrl = getClass().getResource(name);
            InputSource ins = new InputSource(bindingFileUrl.toString());
            opts.addBindFile(ins);
        }

        if (context.get(ToolConstants.CFG_XJC_ARGS) != null) {
            Object o = context.get(ToolConstants.CFG_XJC_ARGS);
            if (o instanceof String) {
                o = new String[] {(String)o};
            }
            String[] xjcArgss = (String[])o;
            for (String xjcArgs : xjcArgss) {
                StringTokenizer tokenizer = new StringTokenizer(xjcArgs, ",", false);
                while (tokenizer.hasMoreTokens()) {
                    String arg = tokenizer.nextToken();
                    args.add(arg);
                    LOG.log(Level.FINE, "xjc arg:" + arg);
                }
            }
        }

        if (context.get(ToolConstants.CFG_NO_ADDRESS_BINDING) == null
            || context.get(ToolConstants.CFG_XJC_ARGS) != null) {
            try {
                // keep parseArguments happy, supply dummy required command-line
                // opts
                opts.addGrammar(new InputSource("null"));
                opts.parseArguments(args.toArray(new String[] {}));
            } catch (BadCommandLineException e) {
                String msg = "XJC reported 'BadCommandLineException' for -xjc argument:";
                for (String arg : args) {
                    msg = msg + arg + " ";
                }
                LOG.log(Level.FINE, msg, e);
                if (opts != null) {
                    String pluginUsage = getPluginUsageString(opts);
                    msg = msg + System.getProperty("line.separator");
                    if (args.contains("-X")) {
                        msg = pluginUsage;
                    } else {
                        msg += pluginUsage;
                    }
                }

                throw new ToolException(msg, e);
            }
        }
       
        if (context.optionSet(ToolConstants.CFG_MARK_GENERATED)) {
            // Add the @Generated annotation in the Java files generated. This is done by passing
            // '-mark-generated' attribute to jaxb xjc.
            try {
                opts.parseArgument(new String[] {"-mark-generated" }, 0);
            } catch (BadCommandLineException e) {
                LOG.log(Level.SEVERE, e.getMessage());
                throw new ToolException(e);
            }
        }
        addSchemas(opts, schemaCompiler, schemas);
        addBindingFiles(opts, jaxbBindings, schemas);


        for (String ns : context.getNamespacePackageMap().keySet()) {
            File file = JAXBUtils.getPackageMappingSchemaBindingFile(ns, context.mapPackageName(ns));
            try {
                InputSource ins = new InputSource(file.toURI().toString());
                schemaCompiler.parseSchema(ins);
            } finally {
                FileUtils.delete(file);
            }
        }

        if (context.getPackageName() != null) {
            schemaCompiler.setDefaultPackageName(context.getPackageName());
        }

       
        rawJaxbModelGenCode = schemaCompiler.bind();

        addedEnumClassToCollector(schemas, allocator);

        if (context.get(ToolConstants.CFG_DEFAULT_VALUES) != null) {
            String cname = (String)context.get(ToolConstants.CFG_DEFAULT_VALUES);
View Full Code Here

Examples of com.sun.tools.xjc.api.SchemaCompiler


    public void initialize(ToolContext c) throws ToolException {
        this.context = c;
       
        SchemaCompiler schemaCompiler = XJC.createSchemaCompiler();
        ClassCollector classCollector = context.get(ClassCollector.class);
       
        ClassNameAllocatorImpl allocator
            = new ClassNameAllocatorImpl(classCollector,
                                         c.optionSet(ToolConstants.CFG_AUTORESOLVE));

        schemaCompiler.setClassNameAllocator(allocator);
          
        JAXBBindErrorListener listener = new JAXBBindErrorListener(context.isVerbose());
        schemaCompiler.setErrorListener(listener);
        // Collection<SchemaInfo> schemas = serviceInfo.getSchemas();
        List<InputSource> jaxbBindings = context.getJaxbBindingFile();
        Map<String, Element> schemaLists = CastUtils.cast((Map<?, ?>)context.get(ToolConstants.SCHEMA_MAP));

       
        Options opts = null;
        opts = getOptions(schemaCompiler);
        List<String> args = new ArrayList<String>();
       
        if (context.get(ToolConstants.CFG_NO_ADDRESS_BINDING) == null) {
            //hard code to enable jaxb extensions
            args.add("-extension");
            URL bindingFileUrl = getClass().getResource("W3CEPRJaxbBinding.xml");
            InputSource ins = new InputSource(bindingFileUrl.toString());
            opts.addBindFile(ins);
        }
       
        if (context.get(ToolConstants.CFG_XJC_ARGS) != null) {
            String xjcArgs = (String)context.get(ToolConstants.CFG_XJC_ARGS);
            StringTokenizer tokenizer = new StringTokenizer(xjcArgs, ",", false);
            while (tokenizer.hasMoreTokens()) {
                String arg = tokenizer.nextToken();
                args.add(arg);
                LOG.log(Level.FINE, "xjc arg:" + arg);
            }
        }

        if (context.get(ToolConstants.CFG_NO_ADDRESS_BINDING) == null
            || context.get(ToolConstants.CFG_XJC_ARGS) != null) {
            try {
                // keep parseArguments happy, supply dummy required command-line
                // opts
                opts.addGrammar(new InputSource("null"));
                opts.parseArguments(args.toArray(new String[] {}));
            } catch (BadCommandLineException e) {
                String msg = "XJC reported 'BadCommandLineException' for -xjc argument:";
                for (String arg : args) {
                    msg = msg + arg + " ";
                }
                LOG.log(Level.FINE, msg, e);
                if (opts != null) {
                    String pluginUsage = getPluginUsageString(opts);
                    msg = msg + System.getProperty("line.separator");
                    if (args.contains("-X")) {
                        msg = pluginUsage;
                    } else {
                        msg += pluginUsage;
                    }
                }

                throw new ToolException(msg, e);
            }
        }
       
       
        addSchemas(opts, schemaCompiler, schemaLists);

        for (InputSource binding : jaxbBindings) {
            opts.addBindFile(binding);
        }

                      
        for (String ns : context.getNamespacePackageMap().keySet()) {
            File file = JAXBUtils.getPackageMappingSchemaBindingFile(ns, context.mapPackageName(ns));
            try {
                InputSource ins = new InputSource(file.toURI().toString());
                schemaCompiler.parseSchema(ins);
            } finally {
                FileUtils.delete(file);               
            }
        }
       
        if (context.getPackageName() != null) {
            schemaCompiler.setDefaultPackageName(context.getPackageName());
       
       

        rawJaxbModelGenCode = schemaCompiler.bind();

        addedEnumClassToCollector(schemaLists, allocator);

        if (context.get(ToolConstants.CFG_DEFAULT_VALUES) != null) {
            String cname = (String)context.get(ToolConstants.CFG_DEFAULT_VALUES);
View Full Code Here

Examples of com.sun.tools.xjc.api.SchemaCompiler

            XmlSchema key = null;
            for (Iterator schemaIter = schemaToInputSourceMap.keySet().iterator();
                 schemaIter.hasNext();) {

                SchemaCompiler sc = XJC.createSchemaCompiler();
                key = (XmlSchema) schemaIter.next();

                if (nsMap != null) {
                    Iterator iterator = nsMap.entrySet().iterator();
                    while(iterator.hasNext()){
                        Map.Entry entry = (Map.Entry) iterator.next();
                        String namespace = (String) entry.getKey();
                        String pkg = (String)nsMap.get(namespace);
                        registerNamespace(sc, namespace, pkg);
                    }
                }

                sc.setEntityResolver(resolver);

                sc.setErrorListener(new ErrorListener(){
                    public void error(SAXParseException saxParseException) {
                        log.error(saxParseException.getMessage());
                        log.debug(saxParseException.getMessage(), saxParseException);
                    }

                    public void fatalError(SAXParseException saxParseException) {
                        log.error(saxParseException.getMessage());
                        log.debug(saxParseException.getMessage(), saxParseException);
                    }

                    public void warning(SAXParseException saxParseException) {
                        log.warn(saxParseException.getMessage());
                        log.debug(saxParseException.getMessage(), saxParseException);
                    }

                    public void info(SAXParseException saxParseException) {
                        log.info(saxParseException.getMessage());
                        log.debug(saxParseException.getMessage(), saxParseException);
                    }
                });

                sc.parseSchema((InputSource) schemaToInputSourceMap.get(key));

                // Bind the XML
                S2JJAXBModel jaxbModel = sc.bind();

                if(jaxbModel == null){
                    throw new RuntimeException("Unable to generate code using jaxbri");
                }
View Full Code Here

Examples of com.volantis.mcs.xml.schema.compiler.SchemaCompiler

            SchemaCompilerFactory.getDefaultInstance();

    private CompiledSchema COMPILED_SCHEMA;

    protected ModelValidationTestAbstract(Schema schema) {
        SchemaCompiler compiler =
                SCHEMA_COMPILER_FACTORY.createSchemaCompiler();
        compiler.addSchema(schema);
        COMPILED_SCHEMA = compiler.getCompiledSchema();
    }
View Full Code Here

Examples of org.apache.axis2.databinding.schema.SchemaCompiler

    protected  XmlSchemaCollection getSchemaReader(){
        return new XmlSchemaCollection();
    }

    public void testSchema() throws Exception{
        SchemaCompiler compiler = new SchemaCompiler( new CompilerOptions().setOutputLocation(outputFolder));
        compiler.compile(currentSchema);
      
    }
View Full Code Here

Examples of org.apache.axis2.schema.SchemaCompiler

    /* compile schema */
    Map<QName, Document> modelMap;
    Map<QName, String> elementMap;
    try {
      CompilerOptions options = new CompilerOptions();
      SchemaCompiler schemaCompiler = new SchemaCompiler(options);
      schemaCompiler.compile(axisService.getSchema());
      modelMap = schemaCompiler.getProcessedModelMap();
      elementMap = schemaCompiler.getProcessedElementMap();
    } catch (SchemaCompilationException e) {
      throw new DataServiceFault(e, "Error in schema compile");
    }
   
    /* add queries/operations */
 
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.