schemagen for nested objects withoug ant task
===

I have the following class structure:

    @XmlRootElement
    public class A{
    private String s;
    private B b;
    //getter and setter
    }
    @XmlRootElement
    public class B{
    private String ss;
    //getter and setter
    }

How to use schemagen to generate schema for class A ?

I am able to generate schema for class B as:

    schemagen B.java

at cmd , but when I use same for class A , i.e.:

    schemagen A.java

I got following error:

    Problem encountered during annotation processing;
    see stacktrace below for more information.
    java.lang.NullPointerException
    .
    .
    .

    A.java:14: cannot find symbol
    symbol  : class B
    location: class beans.A
        public B getB() {
               ^
    A.java:18: cannot find symbol
    symbol  : class B
    location: class beans.A
        public void setB(B b) {
                         ^
    A.java:22: cannot find symbol
    symbol  : class B
    location: class beans.A
        private B b;
                ^
    3 errors
