Element complexType = xmldoc.createElement("xs:complexType");
classElement.appendChild(complexType);
// the protocol has its own subtree
XmlElement el=Util.getAnnotation(clazz, XmlElement.class);
if(el != null) {
Element choice=xmldoc.createElement("xs:choice");
choice.setAttribute("minOccurs", "0");
choice.setAttribute("maxOccurs", "unbounded");
complexType.appendChild(choice);
Element tmp=xmldoc.createElement("xs:element");
tmp.setAttribute("name", el.name());
tmp.setAttribute("type", el.type());
choice.appendChild(tmp);
}
XmlAttribute xml_attr=Util.getAnnotation(clazz, XmlAttribute.class);
if(xml_attr != null) {