You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Venkat Reddy <vr...@gmail.com> on 2005/07/25 16:26:06 UTC

WrapArray support breaks symbol table?

Glen:

I think SchemaUtils.getCollectionComponentQName() is skipping some
complex types from being added to Symbol table, and may be the root
cause of the series of WSDL2Java bugs that look like -

java.io.IOException: Type {.... }SomeType is referenced but not defined.
    at o.a.a.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:663)
    at o.a.a..wsdl.symbolTable.SymbolTable.add(SymbolTable.java:543)
    at o.a.a.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:516)

Also the above stacktrace is misleading while the root cause sits like
needle in haystack.

The code i'm referring to, which is added by the huge checkin for
wrapped array support, is the following:

SchemaUtils.java (lines 1380-1393)
NodeList children = sequence.getChildNodes();
Node element = null;
for (int i = 0; i < children.getLength(); i++) {
	if (children.item(i).getNodeType() == Node.ELEMENT_NODE) {
		if (element == null) {
			element = children.item(i);
		} else {
			return null;
		}
	}
}

When the code above is commented out, all the complex types seem to be
added to symbol table, and the exception is not seen. For a test case,
please try the paypal WSDL mentioned in AXIS-2113 report. I'm not able
to add this as comment to the JIRA issue, since JIRA site seems to be
down at the moment.

any comments?
- venkat