I'm using a recent build of WSDL2Java and I'm getting an Exception:

java.lang.NullPointerException
        at
org.apache.axis.wsdl.toJava.TypeEntry.<init>(TypeEntry.java:139)
        at org.apache.axis.wsdl.toJava.Element.<init>(Element.java:74)
        at
org.apache.axis.wsdl.toJava.DefinedElement.<init>(DefinedElement.java:73
)
        at
org.apache.axis.wsdl.toJava.SymbolTable.createTypeFromDef(SymbolTable.ja
va:627)
        at
org.apache.axis.wsdl.toJava.SymbolTable.addTypes(SymbolTable.java:535)
        at
org.apache.axis.wsdl.toJava.SymbolTable.addTypes(SymbolTable.java:584)
        at
org.apache.axis.wsdl.toJava.SymbolTable.addTypes(SymbolTable.java:584)
        at
org.apache.axis.wsdl.toJava.SymbolTable.addTypes(SymbolTable.java:584)
        at
org.apache.axis.wsdl.toJava.SymbolTable.addTypes(SymbolTable.java:584)
        at
org.apache.axis.wsdl.toJava.SymbolTable.populateTypes(SymbolTable.java:4
99)
        at
org.apache.axis.wsdl.toJava.SymbolTable.populate(SymbolTable.java:406)
        at
org.apache.axis.wsdl.toJava.SymbolTable.add(SymbolTable.java:329)
        at org.apache.axis.wsdl.toJava.Emitter.emit(Emitter.java:175)
        at org.apache.axis.wsdl.toJava.Emitter.emit(Emitter.java:143)
        at org.apache.axis.wsdl.WSDL2Java.emit(WSDL2Java.java:382)
        at org.apache.axis.wsdl.WSDL2Java.main(WSDL2Java.java:531)

The offending part of the WSDL is:
<definitions ... xmlns:xs="http://www.w3.org/2001/XMLSchema";
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns="http://schemas.xmlsoap.org/wsdl/";>
...
        <types>
                <schema ... xmlns="http://www.w3.org/2001/XMLSchema"; >
...
                        <xs:complexType name="ArrayOfoption_type"
base="soap:Array">
                                <sequence>
                                        <element name="option"
type="ts:option_type" minOccurs="0" maxOccurs="unbounded"/>
                                </sequence>
                        </xs:complexType>



Trying to debug this, from what I can tell the DefinedElement is being
instantiated with a null TypeEntry. The TypeEntry for Array is not in
the SymbolTable anywhere.

Am I not creating the schema in my WSDL correctly? Regardless, WSDL2Java
needs to provide a more descriptive error!

cheers,
        Simon

Reply via email to