Examples of generateSchema()


Examples of javax.xml.bind.JAXBContext.generateSchema()

                baseDir.mkdirs();

            System.out.println("Generating schema file in " + baseDir.getAbsolutePath());
            try {
                JAXBContext context = JAXBContext.newInstance(InfinispanConfiguration.class);
                context.generateSchema(new InfinispanSchemaOutputResolver(baseDir));
                System.out.println("Generated schema file successfully");
            } catch (Exception e) {
                System.err.println("Failed generating schema file " + e);
                e.printStackTrace(System.err);
            }
View Full Code Here

Examples of javax.xml.bind.JAXBContext.generateSchema()

public class JAXBReflectionTestCase extends TestCase {

    public void testGenerateSchema() throws Exception {
        JAXBContext context = JAXBContext.newInstance("com.example.ipo.jaxb");
        SchemaOutputResolverImpl resolver = new SchemaOutputResolverImpl();
        context.generateSchema(resolver);
        System.out.println(new Node2String().transform(resolver.getSchema(), null));
    }

    public static class SchemaOutputResolverImpl extends SchemaOutputResolver {
        private DOMResult result = new DOMResult();
View Full Code Here

Examples of javax.xml.bind.JAXBContext.generateSchema()

                baseDir.mkdirs();

            System.out.println("Generating schema file in " + baseDir.getAbsolutePath());
            try {
                JAXBContext context = JAXBContext.newInstance(InfinispanConfiguration.class);
                context.generateSchema(new InfinispanSchemaOutputResolver(baseDir));
                System.out.println("Generated schema file successfully");
            } catch (Exception e) {
                System.err.println("Failed generating schema file " + e);
                e.printStackTrace(System.err);
            }
View Full Code Here

Examples of javax.xml.bind.JAXBContext.generateSchema()

public class JAXBReflectionTestCase extends TestCase {

    public void testGenerateSchema() throws Exception {
        JAXBContext context = JAXBContext.newInstance("com.example.ipo.jaxb");
        SchemaOutputResolverImpl resolver = new SchemaOutputResolverImpl();
        context.generateSchema(resolver);
        System.out.println(new Node2String().transform(resolver.getSchema(), null));
    }

    public static class SchemaOutputResolverImpl extends SchemaOutputResolver {
        private DOMResult result = new DOMResult();
View Full Code Here

Examples of javax.xml.bind.JAXBContext.generateSchema()

       
        Class<?>[] classes = {ABean.class, BBean.class, CBean.class, DBean.class};
        context = contextHelper.createJAXBContext(classes);
  
        DOMResolverImpl resolver = new DOMResolverImpl();
        context.generateSchema(resolver);    
       
        String toNamespace = null;
        String fromNamespace = null;
        Document toDocument = null;
        Document fromDocument = null;
View Full Code Here

Examples of javax.xml.bind.JAXBContext.generateSchema()

                RestLogging.restLogger.log(Level.WARNING, null, ex);
            }
        }
        JAXBContext jc = JAXBContext.newInstance(classes.toArray(new Class<?>[classes.size()]));
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        jc.generateSchema(new MySchemaOutputResolver(baos));
        return new String(baos.toByteArray());
    }

    @GET
    @Path("test1")
View Full Code Here

Examples of javax.xml.bind.JAXBContext.generateSchema()

        } catch (ClassNotFoundException ex) {
            RestLogging.restLogger.log(Level.WARNING, null, ex);
        }
        JAXBContext jc = JAXBContext.newInstance(classes.toArray(new Class<?>[classes.size()]));
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        jc.generateSchema(new MySchemaOutputResolver(baos));
        return new String(baos.toByteArray());
    }

    @GET
    public String getSchemaManually() {
View Full Code Here

Examples of javax.xml.bind.JAXBContext.generateSchema()

        try {
            JAXBContext context = JAXBContext.newInstance( classSet.toArray( new Class[classSet.size()] ) );

            final List<StreamResult> results = new ArrayList<StreamResult>();

            context.generateSchema( new SchemaOutputResolver() {

                int counter = 0;

                @Override
                public Result createOutput( String namespaceUri, String suggestedFileName ) {
View Full Code Here

Examples of javax.xml.bind.JAXBContext.generateSchema()

        try {
            JAXBContext context = JAXBContext.newInstance(classSet.toArray(new Class[classSet.size()]));

            final List<StreamResult> results = new ArrayList<StreamResult>();

            context.generateSchema(new SchemaOutputResolver() {

                int counter = 0;

                @Override
                public Result createOutput(String namespaceUri, String suggestedFileName) {
View Full Code Here

Examples of javax.xml.bind.JAXBContext.generateSchema()

                baseDir.mkdirs();

            System.out.println("Generating schema file in " + baseDir.getAbsolutePath());
            try {
                JAXBContext context = JAXBContext.newInstance(InfinispanConfiguration.class);
                context.generateSchema(new InfinispanSchemaOutputResolver(baseDir));
                System.out.println("Generated schema file successfully");
            } catch (Exception e) {
                System.err.println("Failed generating schema file " + e);
                e.printStackTrace(System.err);
            }
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.