Does MyEclipse have any way of building using…
com.sun.tools.jxc.SchemaGeneratorFacade
… on the code below, the way the JWSDP 2.0 does using schemagen, to create an .XSD schema file?
This file has no errors in MyEclipse when using JDK 1.6. I hate to develop the code in MyEclipse, then have to execute schemagen in a dos box.
package generated;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = “address”, propOrder = {“name”,”street”,”city”,”state”,”zip”})
public class Address {
@XmlElement(required = true)
private String name;
@XmlElement(required = true)
private String street;
@XmlElement(required = true)
private String city;
@XmlElement(required = true)
private String state;
@XmlElement(required = true)
private short zip;
public Address() {}
public Address(String name, String street, String city, String state, short zip) {
this.name = name;
this.street = street;
this.city = city;
this.state = state;
this.zip = zip;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getStreet() {
return street;
}
public void setStreet(String street) {
this.street = street;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public short getZip() {
return zip;
}
public void setZip(short zip) {
this.zip = zip;
}
public String toString() {
StringBuilder s = new StringBuilder();
if(name!=null) s.append(name).append(‘\n’);
s.append(street).append(‘\n’).append(city).append(“, “).append(state).append(” “).append(zip);
return s.toString();
}
}