views:

35

answers:

0

I am using Eclipse to build a Android application. Because I use intensely web service I want to be able to create from XML schema some pojos

For instance:

<xs:schema xmlns:tns="http://schemas.datacontract.org/2004/07/VO.Service.Entities" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/VO.Service.Entities" xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;
  <xs:complexType name="TrackCategories">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="Category" nillable="true" type="tns:CategoryInfo" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="TrackCategories" nillable="true" type="tns:TrackCategories" />
  <xs:complexType name="CategoryInfo">
    <xs:sequence>
      <xs:element minOccurs="0" name="CategoryName" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="Id" type="xs:int" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="CategoryInfo" nillable="true" type="tns:CategoryInfo" />
</xs:schema>

I want to be able to create the following class

public class CategoryInfo {

 public String CategoryName;
 public Integer Id;

 public String getCategoryName() {
     return CategoryName;
 }


 public void setCategoryName(String value) {
     this.CategoryName =  value;
 }

 public Integer getId() {
     return Id;
 }

 public void setId(Integer value) {
     this.Id = value;
 }

}

As simple as that. No binding, no comments just a plain class. I've tried the JABX plugin for Eclipse but the generated classes have a lot of comments and types that I don't need.

Any solution ?