So we have an XSD type in the form:
Maybe below sample helps.
XML Schema
Java class :
public class Test {
protected List dataList;
protected String str;
public List getDataList() {
if (dataList == null) {
dataList = new ArrayList();
}
return this.dataList;
}
public String getStr() {
return str;
}
public void setStr(String value) {
this.str = value;
}
}
EDIT 1:
You can reverse engineer from java code to xsd. in JAVA_HOME/bin there is schemagen executable.
Give your java code and it will create the XSD schema for you using your java class.
see this link
schemagen myObj1.java myObj2.java