title: How to create pojo classes from XSD?
body: <p>I am using Spring maven plugin, I want to create POJO classes from specified xml schema in particular folder. I tried with <code>xjc</code> command through java code, but its not generating that classes. secondly, I tried with <code>jaxb</code>, but its dealing with <code>xml</code> file not a <code>xsd</code> schema while marshell/unmarshelling. I think this not a way to create POJO from <code>xsd</code>.</p>
  
  <p>What is a correct way to generate classes from xsd in java?</p>
  
  <p>below is XSD</p>
  
  <pre><code>   &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;
     &lt;xs:element name="Employee"&gt;
     &lt;xs:complexType&gt;
     &lt;xs:sequence&gt;
      &lt;xs:element name="empId" type="xs:long"/&gt;
      &lt;xs:element name="lastName" type="xs:string"/&gt;
      &lt;xs:element name="title" type="xs:string"/&gt;
      &lt;xs:element name="salary" type="xs:integer"/&gt;
      &lt;xs:element name="address"&gt;
      &lt;xs:complexType&gt;
         &lt;xs:sequence&gt;
           &lt;xs:element name="city" type="xs:string"/&gt;
           &lt;xs:element name="street" type="xs:string"/&gt;
           &lt;xs:element name="zipcode" type="xs:integer"/&gt;
           &lt;xs:element name="privatePhoneNo"&gt;
             &lt;xs:complexType&gt;
               &lt;xs:sequence&gt;
                   &lt;xs:element name="privateMobile" type="xs:string"/&gt;
                   &lt;xs:element name="privateLandline" type="xs:string"/&gt;
               &lt;/xs:sequence&gt;
             &lt;/xs:complexType&gt;
           &lt;/xs:element&gt;
          &lt;/xs:sequence&gt;
       &lt;/xs:complexType&gt;
      &lt;/xs:element&gt;
   &lt;/xs:sequence&gt;
   &lt;/xs:complexType&gt;
   &lt;/xs:element&gt;
   &lt;/xs:schema&gt;
  </code></pre>