} else {
output.startElement(element.getNamespace(), element.getName(), null);
Type type=element.getType();
if( type instanceof SimpleType ){
SimpleType simple=(SimpleType) type;
simple.encode(element, value, output, hints);
}else if (type instanceof ComplexType) {
ComplexType complex = (ComplexType) type;
Element[] children = complex.getChildElements();
boolean found=false;
for (int i = 0; i < children.length; i++) {