Late last year I submitted some patches to make WSDL2Java run faster when large schemas are imported in a WSDL file. Those helped for a while, but now I'm running with a different data set and once again WSDL2Java takes far too long.
To put this in context: after parsing, I have just over 1,000 entries in the SymbolTable [That is, 1,000 Qnames -> vectors]. The bottleneck I'm seeing, courtesy of my debugger, is in the SymbolTable, specifically in the setTypeReferences method, which uses Utils.getNestedTypes() and some ancillary SchemaUtils functions to resolve references between types (up and down). On my data set, it can run for an hour or more -- lots of recursive calls, iteration over the entire symbol table, etc. I find myself wondering if there isn't a Better Way to do this. Has anyone on the Axis team looked closely at the work that's been done with schema parsing in Xerces-J ? That gives you an AST in which the type hierarchy is already laid out, presumably because it doesn't go through the intermediate processes that WSDL2Java does (several recursive passes, including the construction of a DOM). It's possible to make simple queries of the schema and then walk up the type hierarchy from any arbitrary point. Further, the schema model produced by xerces bears all of the "facets" needed to support constraint checking (maxlength, pattern, etc) if one wanted to include such things in the generated code. Eric
