title: wsdl2java error on generating the java classes
body: <p>I'm trying to write a java SOAP client for a PHP SOAP server. For an easier start I would like to generate the java classes via wsdl2java, but unfortunately I'm getting the following error from wsdl2java.</p>
  
  <p>[edit]
  I forgot to mention, that I'm using wsdl2java from Axis2 1.6.2 to generate the java classes.
  [/edit]</p>
  
  <pre><code>I:\&gt;axis2\bin\wsdl2java -uri i:\axis2\result\tatoo.wsdl -o i:\axis2\result -d adb -s
  Using AXIS2_HOME:   i:\axis2
  Using JAVA_HOME:    c:\Program Files\Java\jdk1.6.0_33
  Retrieving document at 'i:\axis2\result\tatoo.wsdl'.
  log4j:WARN No appenders could be found for logger (org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder).
  log4j:WARN Please initialize the log4j system properly.
  Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
          at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.&lt;init&gt;(CodeGenerationEngine.java:175)
          at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
          at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
  Caused by: org.apache.axis2.AxisFault
          at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
          at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:411)
          at org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServices(WSDL11ToAllAxisServicesBuilder.java:107)
          at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.&lt;init&gt;(CodeGenerationEngine.java:169)
          ... 2 more
  Caused by: java.lang.NullPointerException
          at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.findBinding(WSDL11ToAxisServiceBuilder.java:1084)
          at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:341)
          ... 4 more
  </code></pre>
  
  <p>Here is my wsdl file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;definitions name="TatooWebserviceDefinition" xmlns:tns="http://wafriv.de/tatoo_webservice/wsdl.php" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/"&gt;
      &lt;types&gt;
          &lt;xsd:schema&gt;
              &lt;xsd:complexType name="gameList"&gt;
                  &lt;xsd:sequence&gt;
                      &lt;xsd:element name="game" type="game" minOccurs="1" maxOccurs="unbounded" /&gt;
                  &lt;/xsd:sequence&gt;
              &lt;/xsd:complexType&gt;
              &lt;xsd:complexType name="game"&gt;
                  &lt;xsd:sequence&gt;
                      &lt;xsd:element name="name" type="xsd:string" /&gt;
                      &lt;xsd:element name="version" type="xsd:integer" /&gt;
                      &lt;xsd:element name="edition" type="xsd:integer" /&gt;
                      &lt;xsd:element name="gameID" type="xsd:string" /&gt;
                      &lt;xsd:element name="creator" type="xsd:string" /&gt;
                  &lt;/xsd:sequence&gt;
              &lt;/xsd:complexType&gt;
              &lt;xsd:complexType name="codexList"&gt;
                  &lt;xsd:sequence&gt;
                      &lt;xsd:element name="codex" type="codex" minOccurs="1" maxOccurs="unbounded" /&gt;
                  &lt;/xsd:sequence&gt;
              &lt;/xsd:complexType&gt;
              &lt;xsd:complexType name="codex"&gt;
                  &lt;xsd:sequence&gt;
                      &lt;xsd:element name="name" type="xsd:string" /&gt;
                      &lt;xsd:element name="version" type="xsd:integer" /&gt;
                      &lt;xsd:element name="edition" type="xsd:integer" /&gt;
                      &lt;xsd:element name="codexID" type="xsd:string" /&gt;
                      &lt;xsd:element name="creator" type="xsd:string" /&gt;
                  &lt;/xsd:sequence&gt;
              &lt;/xsd:complexType&gt;
          &lt;/xsd:schema&gt;
      &lt;/types&gt;
      &lt;message name="gameUploadRequest"&gt;
          &lt;part name="name" type="xsd:string" /&gt;
          &lt;part name="gameID" type="xsd:string" /&gt;
          &lt;part name="version" type="xsd:integer" /&gt;
          &lt;part name="edition" type="xsd:integer" /&gt;
          &lt;part name="creator" type="xsd:string" /&gt;
          &lt;part name="createDateTime" type="xsd:dateTime" /&gt;
          &lt;part name="gameData" type="xsd:string" /&gt;
      &lt;/message&gt;
      &lt;message name="gameUploadResponse"&gt;
          &lt;part name="response" type="xsd:string" /&gt;
      &lt;/message&gt;
      &lt;message name="codexUploadRequest"&gt;
          &lt;part name="name" type="xsd:string" /&gt;
          &lt;part name="gameID" type="xsd:string" /&gt;
          &lt;part name="gameVersion" type="xsd:integer" /&gt;
          &lt;part name="gameEdition" type="xsd:integer" /&gt;
          &lt;part name="codexID" type="xsd:string" /&gt;
          &lt;part name="version" type="xsd:integer" /&gt;
          &lt;part name="edition" type="xsd:integer" /&gt;
          &lt;part name="creator" type="xsd:string" /&gt;
          &lt;part name="createDateTime" type="xsd:dateTime" /&gt;
          &lt;part name="codexData" type="xsd:string" /&gt;
      &lt;/message&gt;
      &lt;message name="codexUploadResponse"&gt;
          &lt;part name="response" type="xsd:string" /&gt;
      &lt;/message&gt;
      &lt;message name="getGameListRequest"&gt;
          &lt;part name="versions" type="xsd:string" /&gt;
      &lt;/message&gt;
      &lt;message name="getGameListResponse"&gt;
          &lt;part name="gameList" type="tns:gameList" /&gt;
      &lt;/message&gt;
      &lt;message name="getCodexListRequest"&gt;
          &lt;part name="gameID" type="xsd:string" /&gt;
          &lt;part name="gameVersion" type="xsd:integer" /&gt;
          &lt;part name="gameEdition" type="xsd:integer" /&gt;
          &lt;part name="versions" type="xsd:string" /&gt;
      &lt;/message&gt;
      &lt;message name="getCodexListResponse"&gt;
          &lt;part name="codexList" type="tns:codexList" /&gt;
      &lt;/message&gt;
      &lt;message name="getGameRequest"&gt;
          &lt;part name="gameID" type="xsd:string" /&gt;
          &lt;part name="version" type="xsd:integer" /&gt;
          &lt;part name="edition" type="xsd:integer" /&gt;
      &lt;/message&gt;
      &lt;message name="getGameResponse"&gt;
          &lt;part name="gameData" type="xsd:string" /&gt;
      &lt;/message&gt;
      &lt;message name="getCodexRequest"&gt;
          &lt;part name="codexID" type="xsd:string" /&gt;
          &lt;part name="version" type="xsd:integer" /&gt;
          &lt;part name="edition" type="xsd:integer" /&gt;
      &lt;/message&gt;
      &lt;message name="getCodexResponse"&gt;
          &lt;part name="codexData" type="xsd:string" /&gt;
      &lt;/message&gt;
      &lt;portType name="TatooWebservicePortType"&gt;
          &lt;operation name="gameUpload"&gt;
              &lt;input message="gameUploadRequest" /&gt;
              &lt;output message="gameUploadResponse" /&gt;
          &lt;/operation&gt;
          &lt;operation name="codexUpload"&gt;
              &lt;input message="codexUploadRequest" /&gt;
              &lt;output message="codexUploadResponse" /&gt;
          &lt;/operation&gt;
          &lt;operation name="getGameList"&gt;
              &lt;input message="getGameListRequest" /&gt;
              &lt;output message="getGameListResponse" /&gt;
          &lt;/operation&gt;
          &lt;operation name="getCodexList"&gt;
              &lt;input message="getCodexListRequest" /&gt;
              &lt;output message="getCodexListResponse" /&gt;
          &lt;/operation&gt;
          &lt;operation name="getGame"&gt;
              &lt;input message="getGameRequest" /&gt;
              &lt;output message="getGameResponse" /&gt;
          &lt;/operation&gt;
          &lt;operation name="getCodex"&gt;
              &lt;input message="getCodexRequest" /&gt;
              &lt;output message="getCodexResponse" /&gt;
          &lt;/operation&gt;
      &lt;/portType&gt;
      &lt;binding name="TatooWebserviceBinding" type="tns:TatooWebservicePortType"&gt;
          &lt;soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" /&gt;
          &lt;operation name="gameUpload"&gt;
              &lt;soap:operation soapAction="urn:gameUpload" /&gt;
              &lt;input&gt;
                  &lt;soap:body
                      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                      namespace="urn:xmethodsTatooWebservice"
                      use="encoded" /&gt;
              &lt;/input&gt;
              &lt;output&gt;
                  &lt;soap:body
                      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                      namespace="urn:xmethodsTatooWebservice"
                      use="encoded" /&gt;
              &lt;/output&gt;
          &lt;/operation&gt;
          &lt;operation name="codexUpload"&gt;
              &lt;soap:operation soapAction="urn:codexUpload" /&gt;
              &lt;input&gt;
                  &lt;soap:body
                      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                      namespace="urn:xmethodsTatooWebservice"
                      use="encoded" /&gt;
              &lt;/input&gt;
              &lt;output&gt;
                  &lt;soap:body
                      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                      namespace="urn:xmethodsTatooWebservice"
                      use="encoded" /&gt;
              &lt;/output&gt;
          &lt;/operation&gt;
          &lt;operation name="getGameList"&gt;
              &lt;soap:operation soapAction="urn:getGameList" /&gt;
              &lt;input&gt;
                  &lt;soap:body
                      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                      namespace="urn:xmethodsTatooWebservice"
                      use="encoded" /&gt;
              &lt;/input&gt;
              &lt;output&gt;
                  &lt;soap:body
                      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                      namespace="urn:xmethodsTatooWebservice"
                      use="encoded" /&gt;
              &lt;/output&gt;
          &lt;/operation&gt;
          &lt;operation name="getCodexList"&gt;
              &lt;soap:operation soapAction="urn:getCodexList" /&gt;
              &lt;input&gt;
                  &lt;soap:body
                      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                      namespace="urn:xmethodsTatooWebservice"
                      use="encoded" /&gt;
              &lt;/input&gt;
              &lt;output&gt;
                  &lt;soap:body
                      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                      namespace="urn:xmethodsTatooWebservice"
                      use="encoded" /&gt;
              &lt;/output&gt;
          &lt;/operation&gt;
          &lt;operation name="getGame"&gt;
              &lt;soap:operation soapAction="urn:getGame" /&gt;
              &lt;input&gt;
                  &lt;soap:body
                      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                      namespace="urn:xmethodsTatooWebservice"
                      use="encoded" /&gt;
              &lt;/input&gt;
              &lt;output&gt;
                  &lt;soap:body
                      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                      namespace="urn:xmethodsTatooWebservice"
                      use="encoded" /&gt;
              &lt;/output&gt;
          &lt;/operation&gt;
          &lt;operation name="getCodex"&gt;
              &lt;soap:operation soapAction="urn:getCodex" /&gt;
              &lt;input&gt;
                  &lt;soap:body
                      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                      namespace="urn:xmethodsTatooWebservice"
                      use="encoded" /&gt;
              &lt;/input&gt;
              &lt;output&gt;
                  &lt;soap:body
                      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                      namespace="urn:xmethodsTatooWebservice"
                      use="encoded" /&gt;
              &lt;/output&gt;
          &lt;/operation&gt;
      &lt;/binding&gt;
      &lt;service name="TatooWebservice"&gt;
          &lt;port name="TatooWebservicePort" binding="tns:TatooWebserviceBinding"&gt;
              &lt;soap:address location="http://wafriv.de/tatoo_webservice/index.php" /&gt;
          &lt;/port&gt;
      &lt;/service&gt;
  &lt;/definitions&gt;
  </code></pre>
  
  <p>I've already searched stackoverflow and various other pages but can't find anything helpful. It would be really great if anybody can help me with this problem.</p>
  
  <p>Greetings Neithan</p>
  
  <p>[edit]</p>
  
  <p>I tried to validate the WSDL with the Apache CXF validator. It throws the following error:</p>
  
  <pre><code>WSIBP Validator found &lt;{http://wafriv.de/tatoo_webservice/wsdl.php}blaBinding&gt; is NOT a SOAP binding
  WSDLValidator Error :
   Summary:  Failures: 1, Warnings: 0
  
   &lt;&lt;&lt; ERROR!
  file:/c:/Users/Neithan/Desktop/bla/tatoo.wsdl:[214,3]
   Caused by {http://wafriv.de/tatoo_webservice/wsdl.php}[binding:blaBinding] not exist.
  </code></pre>