axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukasz Michalski ...@zork.pl>
Subject null pointer exception
Date Thu, 09 Mar 2006 17:10:17 GMT

I have problems creating c++ stubs from wsdl file using axis-c-1.6b (binaries). 
I get nullPointerException. Any idea what is causing this?

[zork@zulu version]$ java org.apache.axis.wsdl.wsdl2ws.WSDL2Ws version.wsdl -lc++ -sclient
-v
java.lang.NullPointerException
        at org.apache.axis.wsdl.symbolTable.Utils.getNodeNameQName(Utils.java:271)
        at org.apache.axis.wsdl.symbolTable.SchemaUtils.getElementAnonQName(SchemaUtils.java:742)
        at org.apache.axis.wsdl.symbolTable.Utils.getTypeQNameFromAttr(Utils.java:469)
        at org.apache.axis.wsdl.symbolTable.Utils.getTypeQName(Utils.java:332)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.createTypeFromRef(SymbolTable.java:1255)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.addTypes(SymbolTable.java:958)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.addTypes(SymbolTable.java:1078)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.addTypes(SymbolTable.java:1078)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.addTypes(SymbolTable.java:1078)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.addTypes(SymbolTable.java:1078)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.populateTypes(SymbolTable.java:894)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:692)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:531)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:506)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:483)
        at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:356)
        at java.lang.Thread.run(Thread.java:595)
org.apache.axis.wsdl.wsdl2ws.WrapperFault: java.lang.NullPointerException
        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.<init>(Unknown Source)
        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.main(Unknown Source)
Caused by: java.lang.NullPointerException
        at org.apache.axis.wsdl.symbolTable.Utils.getNodeNameQName(Utils.java:271)
        at org.apache.axis.wsdl.symbolTable.SchemaUtils.getElementAnonQName(SchemaUtils.java:742)
        at org.apache.axis.wsdl.symbolTable.Utils.getTypeQNameFromAttr(Utils.java:469)
        at org.apache.axis.wsdl.symbolTable.Utils.getTypeQName(Utils.java:332)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.createTypeFromRef(SymbolTable.java:1255)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.addTypes(SymbolTable.java:958)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.addTypes(SymbolTable.java:1078)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.addTypes(SymbolTable.java:1078)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.addTypes(SymbolTable.java:1078)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.addTypes(SymbolTable.java:1078)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.populateTypes(SymbolTable.java:894)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:692)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:531)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:506)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:483)
        at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:356)
        at java.lang.Thread.run(Thread.java:595)

Code generation failed. Please see errors above.
------------------------------------------------------------------

I copied wsdl file from axis2 version service, that installs with axis2 war file by default:

<wsdl:definitions xmlns:ns1="http://org.apache.axis2/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://org.apache.axis2/" targetNamespace="http://org.apache.axis2/">
  <wsdl:types>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://www.w3.org/2001/XMLSchema"
xmlns:ns0="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://www.w3.org/2001/XMLSchema"
ns1:elementFormDefault="qualified" ns0:attributeFormDefault="unqualified" ns2:targetNamespace="http://org.apache.axis2/xsd">
      <xs:element ns0:name="getVersionRequest">
        <xs:complexType />
      </xs:element>
      <xs:element ns0:name="getVersionResponse">
        <xs:complexType>
          <xs:sequence>
            <xs:element ns0:name="return" ns1:type="xs:string" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>
  </wsdl:types>
  <wsdl:message name="getVersionResponseMessage">
    <wsdl:part name="part1" element="ns1:getVersionResponse" />
  </wsdl:message>
  <wsdl:message name="getVersionRequestMessage">
    <wsdl:part name="part1" element="ns1:getVersionRequest" />
  </wsdl:message>
  <wsdl:portType name="versionPort">
    <wsdl:operation name="getVersion">
      <wsdl:input message="tns:getVersionRequestMessage" />
      <wsdl:output message="tns:getVersionResponseMessage" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="versionBinding" type="tns:versionPort">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
    <wsdl:operation name="getVersion">
      <soap:operation name="operation" soapAction="getVersion" style="document" />
      <wsdl:input>
        <soap:body use="literal" namespace="http://www.org.apache.axis2" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" namespace="http://www.org.apache.axis2" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="version">
    <wsdl:port name="versionPortType" binding="tns:versionBinding">
      <soap:address location="http://localhost:8080/axis2/services/version" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

My java version is:
[zork@zulu version]$ java -version
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)


Thanks.
Ɓukasz

Mime
View raw message