SchemaBinding schema = XsdBinder.bind(new StringReader(XSD), null);
// get bound components
TypeBinding type = schema.getType(new QName("http://org.jboss.ws/jbws434/types", "ArrayOfAny"));
WildcardBinding wildcard = type.getWildcard();
ElementBinding e = schema.getElement(new QName("http://org.jboss.ws/jbws434/types", "e"));
// adjust binding
ParticleHandler unresolvedElementHandler;
CharactersHandler unresolvedCharactersHandler;
if(genericElement)
{
unresolvedElementHandler = new GenericElementHandler();
unresolvedCharactersHandler = new GenericCharactersHandler();
}
else
{
unresolvedElementHandler = DomParticleHandler.INSTANCE;
unresolvedCharactersHandler = DomCharactersHandler.INSTANCE;
}
wildcard.setUnresolvedElementHandler(unresolvedElementHandler);
wildcard.setUnresolvedCharactersHandler(unresolvedCharactersHandler);
PropertyMetaData property = new PropertyMetaData();
property.setName("_any");
wildcard.setPropertyMetaData(property);
ClassMetaData clsBinding = new ClassMetaData();
clsBinding.setImpl(ArrayOfAny.class.getName());
e.setClassMetaData(clsBinding);
// to fail the resolution quickly
schema.setSchemaResolver(new SchemaBindingResolver()
{
public String getBaseURI()