Error in generation of wsdl client using wsdl2java
<p>I am trying to generate a webservice client from a wsdl. I am not sure whats wrong with the WSDL. Any help is appreciated!...
Below is the error message:</p>

<pre>
[echo] Generating jpl_farmersfinance's WSDL stub classes for WSDL 'client_1'.
     [java] Retrieving document at 'C:/ISH_Code/jpl_1134/source/jpl_farmersfinance/staticfiles/wsdl/getPaymentStatus.wsdl'.
     [java] Retrieving schema at 'getPaymentStatus.xsd', relative to 'file:/C:/ISH_Code/jpl_1134/source/jpl_farmersfinance/staticfiles/wsdl/getPaymentStatus.wsdl'.
     [java] Retrieving schema at 'Envelope.xsd', relative to 'file:/C:/ISH_Code/jpl_1134/source/jpl_farmersfinance/staticfiles/wsdl/getPaymentStatus.wsdl'.
     [java] Retrieving schema at 'ApplicationError.xsd', relative to 'file:/C:/ISH_Code/jpl_1134/source/jpl_farmersfinance/staticfiles/wsdl/getPaymentStatus.wsdl'.
     [java] [2016-05-26 14:00:24.001 EST] [main] INFO  o.a.a.xmlbeans.CodeGenerationUtility - Resolving schema with publicId [http://paymentsystem.fpf.co.nz/] and systemId [getPaymentStatus.xsd]
     [java] [2016-05-26 14:00:24.046 EST] [main] INFO  o.a.a.xmlbeans.CodeGenerationUtility - Resolving schema with publicId [http://schemas.xmlsoap.org/soap/envelope/] and systemId [Envelope.xsd]
     [java] [2016-05-26 14:00:24.065 EST] [main] INFO  o.a.a.xmlbeans.CodeGenerationUtility - Resolving schema with publicId [http://paymentsystem.fpf.co.nz/] and systemId [ApplicationError.xsd]
     [java] Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: Element QName is null for getPaymentStatus_ApplicationErrorMessage!
     [java]     at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:293)
     [java]     at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
     [java]     at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
     [java] Caused by: org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: Element QName is null for getPaymentStatus_ApplicationErrorMessage!
     [java]     at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.emitStub(AxisServiceBasedMultiLanguageEmitter.java:537)
     [java]     at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:282)
     [java]     ... 2 more
     [java] Caused by: java.lang.RuntimeException: Element QName is null for getPaymentStatus_ApplicationErrorMessage!
     [java]     at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.getFaultParamElements(AxisServiceBasedMultiLanguageEmitter.java:2925)
     [java]     at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.getFaultElement(AxisServiceBasedMultiLanguageEmitter.java:2844)
     [java]     at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.generateMethodElement(AxisServiceBasedMultiLanguageEmitter.java:2366)
     [java]     at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.loadOperations(AxisServiceBasedMultiLanguageEmitter.java:2242)
     [java]     at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.createDOMDocumentForCallbackHandler(AxisServiceBasedMultiLanguageEmitter.java:1232)
     [java]     at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.writeCallBackHandlers(AxisServiceBasedMultiLanguageEmitter.java:1198)
     [java]     at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.emitStub(AxisServiceBasedMultiLanguageEmitter.java:460)
     [java]     ... 3 more
</pre>

<p>WSDL </p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;WL5G3N0:definitions name="GetPaymentStatus" targetNamespace="http://paymentsystem.fpf.co.nz/" xmlns:WL5G3N0="http://schemas.xmlsoap.org/wsdl/" xmlns:WL5G3N1="http://paymentsystem.fpf.co.nz/" xmlns:WL5G3N2="http://schemas.xmlsoap.org/soap/envelope/" xmlns:WL5G3N3="http://schemas.xmlsoap.org/wsdl/soap/"&gt;
  &lt;WL5G3N0:documentation&gt;rd_20141210_v3_bd_20141201_ltfo&lt;/WL5G3N0:documentation&gt;
  &lt;WL5G3N0:types&gt;
    &lt;xsd:schema xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="http://paymentsystem.fpf.co.nz/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsp1_3="http://paymentsystem.fpf.co.nz/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
      &lt;xsd:import namespace="http://paymentsystem.fpf.co.nz/" schemaLocation="getPaymentStatus.xsd"/&gt;
      &lt;xsd:import namespace="http://schemas.xmlsoap.org/soap/envelope/" schemaLocation="Envelope.xsd"/&gt;
    &lt;/xsd:schema&gt;
    &lt;xsd:schema xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="http://paymentsystem.fpf.co.nz/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsp1_3="http://paymentsystem.fpf.co.nz/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
      &lt;xsd:import namespace="http://paymentsystem.fpf.co.nz/" schemaLocation="ApplicationError.xsd"/&gt;
    &lt;/xsd:schema&gt;
  &lt;/WL5G3N0:types&gt;
  &lt;WL5G3N0:message name="getPaymentStatus"&gt;
    &lt;WL5G3N0:part element="WL5G3N1:getPaymentStatus" name="parameters"/&gt;
  &lt;/WL5G3N0:message&gt;
  &lt;WL5G3N0:message name="getPaymentStatusResponse"&gt;
    &lt;WL5G3N0:part element="WL5G3N1:getPaymentStatusResponse" name="parameters"/&gt;
  &lt;/WL5G3N0:message&gt;
  &lt;WL5G3N0:message name="getPaymentStatus_ApplicationErrorMessage"&gt;
    &lt;WL5G3N0:part element="WL5G3N1:ApplicationError" name="fault_ApplicationError"/&gt;
  &lt;/WL5G3N0:message&gt;
  &lt;WL5G3N0:message name="getPaymentStatus_SystemErrorMessage"&gt;
    &lt;WL5G3N0:part element="WL5G3N1:SystemError" name="fault_SystemError"/&gt;
  &lt;/WL5G3N0:message&gt;
  &lt;WL5G3N0:message name="getPaymentStatusFault"&gt;
    &lt;WL5G3N0:part element="WL5G3N2:Fault" name="fault"/&gt;
  &lt;/WL5G3N0:message&gt;
  &lt;WL5G3N0:portType name="PaymentStatusWS"&gt;
    &lt;WL5G3N0:operation name="getPaymentStatus"&gt;
      &lt;WL5G3N0:input message="WL5G3N1:getPaymentStatus"/&gt;
      &lt;WL5G3N0:output message="WL5G3N1:getPaymentStatusResponse"/&gt;
      &lt;WL5G3N0:fault message="WL5G3N1:getPaymentStatus_ApplicationErrorMessage" name="ApplicationError"/&gt;
      &lt;WL5G3N0:fault message="WL5G3N1:getPaymentStatus_SystemErrorMessage" name="SystemError"/&gt;
      &lt;WL5G3N0:fault message="WL5G3N1:getPaymentStatusFault" name="fault"/&gt;
    &lt;/WL5G3N0:operation&gt;
  &lt;/WL5G3N0:portType&gt;
  &lt;WL5G3N0:binding name="PaymentStatusWSPortBinding" type="WL5G3N1:PaymentStatusWS"&gt;
    &lt;WL5G3N3:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/&gt;
    &lt;WL5G3N0:operation name="getPaymentStatus"&gt;
      &lt;WL5G3N3:operation/&gt;
      &lt;WL5G3N0:input&gt;
        &lt;WL5G3N3:body use="literal"/&gt;
      &lt;/WL5G3N0:input&gt;
      &lt;WL5G3N0:output&gt;
        &lt;WL5G3N3:body use="literal"/&gt;
      &lt;/WL5G3N0:output&gt;
      &lt;WL5G3N0:fault name="fault"&gt;
        &lt;WL5G3N3:fault name="fault" use="literal"/&gt;
      &lt;/WL5G3N0:fault&gt;
    &lt;/WL5G3N0:operation&gt;
  &lt;/WL5G3N0:binding&gt;
  &lt;WL5G3N0:service name="PaymentStatusWS"&gt;
    &lt;WL5G3N0:documentation&gt;OSB Service&lt;/WL5G3N0:documentation&gt;
    &lt;WL5G3N0:port binding="WL5G3N1:PaymentStatusWSPortBinding" name="PaymentStatusWSPort"&gt;
      &lt;WL5G3N3:address location="https://ltfotst.rfs.co.nz:443/API/FpfPaymentSystem/getPaymentStatus"/&gt;
    &lt;/WL5G3N0:port&gt;
  &lt;/WL5G3N0:service&gt;
&lt;/WL5G3N0:definitions&gt;
</code></pre>

<p>ApplicationError.xsd</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;xsd:schema targetNamespace="http://paymentsystem.fpf.co.nz/" elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://paymentsystem.fpf.co.nz/"&gt;
  &lt;xsd:element name="ApplicationError" type="detail"/&gt;
  &lt;xsd:element name="SystemError" type="detail"/&gt;
  &lt;xsd:complexType name="detail"&gt;
    &lt;xsd:sequence&gt;
      &lt;xsd:any namespace="##any" minOccurs="0" maxOccurs="unbounded" processContents="lax"/&gt;
    &lt;/xsd:sequence&gt;
    &lt;xsd:anyAttribute namespace="##any" processContents="lax"/&gt;
  &lt;/xsd:complexType&gt;
&lt;/xsd:schema&gt;
</code></pre>

<p>Envelope.xsd</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;

  &lt;xs:element name="Envelope" type="tns:Envelope"/&gt;
  &lt;xs:complexType name="Envelope"&gt;
    &lt;xs:sequence&gt;
      &lt;xs:element ref="tns:Header" minOccurs="0"/&gt;
      &lt;xs:element ref="tns:Body" minOccurs="1"/&gt;
      &lt;xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="lax"/&gt;
    &lt;/xs:sequence&gt;
    &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:element name="Header" type="tns:Header"/&gt;
  &lt;xs:complexType name="Header"&gt;
    &lt;xs:sequence&gt;
      &lt;xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="lax"/&gt;
    &lt;/xs:sequence&gt;
    &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:element name="Body" type="tns:Body"/&gt;
  &lt;xs:complexType name="Body"&gt;
    &lt;xs:sequence&gt;
      &lt;xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded" processContents="lax"/&gt;
    &lt;/xs:sequence&gt;
    &lt;xs:anyAttribute namespace="##any" processContents="lax"&gt;
      &lt;xs:annotation&gt;
        &lt;xs:documentation&gt;Prose in the spec does not specify that attributes are allowed on the Body element&lt;/xs:documentation&gt;
      &lt;/xs:annotation&gt;
    &lt;/xs:anyAttribute&gt;
  &lt;/xs:complexType&gt;
  &lt;!--Global Attributes.  The following attributes are intended to be usable via qualified attribute names on any complex type referencing them.--&gt;
  &lt;xs:attribute name="mustUnderstand"&gt;
    &lt;xs:simpleType&gt;
      &lt;xs:restriction base="xs:boolean"&gt;
        &lt;xs:pattern value="0|1"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:simpleType&gt;
  &lt;/xs:attribute&gt;
  &lt;xs:attribute name="actor" type="xs:anyURI"/&gt;
  &lt;xs:simpleType name="encodingStyle"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;'encodingStyle' indicates any canonicalization conventions followed in the contents of the containing element.  For example, the value 'http://schemas.xmlsoap.org/soap/encoding/' indicates the pattern described in SOAP specification&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:list itemType="xs:anyURI"/&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:attribute name="encodingStyle" type="tns:encodingStyle"/&gt;
  &lt;xs:attributeGroup name="encodingStyle"&gt;
    &lt;xs:attribute ref="tns:encodingStyle"/&gt;
  &lt;/xs:attributeGroup&gt;
  &lt;xs:element name="Fault" type="tns:Fault"/&gt;
  &lt;xs:complexType name="Fault" final="extension"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;Fault reporting structure&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:sequence&gt;
      &lt;xs:element name="faultcode" type="xs:QName"/&gt;
      &lt;xs:element name="faultstring" type="xs:string"/&gt;
      &lt;xs:element name="faultactor" type="xs:anyURI" minOccurs="0"/&gt;
      &lt;xs:element name="detail" type="tns:detail" minOccurs="0"/&gt;
    &lt;/xs:sequence&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="detail"&gt;
    &lt;xs:sequence&gt;
      &lt;xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded" processContents="lax"/&gt;
    &lt;/xs:sequence&gt;
    &lt;xs:anyAttribute namespace="##any" processContents="lax"/&gt;
  &lt;/xs:complexType&gt;
&lt;/xs:schema&gt;
</code></pre>

<p>getPaymentStatus.xsd</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;xsd:schema targetNamespace="http://paymentsystem.fpf.co.nz/" xmlns:ns0="http://paymentsystem.fpf.co.nz/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
  &lt;xsd:complexType name="Result"&gt;
    &lt;xsd:sequence&gt;
      &lt;xsd:element name="resultCode" type="xsd:string"/&gt;
      &lt;xsd:element name="resultDesc" type="xsd:string"/&gt;
    &lt;/xsd:sequence&gt;
  &lt;/xsd:complexType&gt;
  &lt;xsd:complexType name="PaymentStatus"&gt;
    &lt;xsd:sequence&gt;
      &lt;xsd:element name="statusCode" type="xsd:string"/&gt;
      &lt;xsd:element name="statusDesc" type="xsd:string"/&gt;
    &lt;/xsd:sequence&gt;
  &lt;/xsd:complexType&gt;
  &lt;xsd:complexType name="PaymentStatusRequest"&gt;
    &lt;xsd:sequence&gt;
      &lt;xsd:element name="user_id" type="xsd:int"/&gt;
      &lt;xsd:element name="user_name" type="ns0:NotEmptyString"/&gt;
      &lt;xsd:element name="user_password" type="ns0:NotEmptyString"/&gt;
      &lt;xsd:element name="api_key" type="ns0:NotEmptyString"/&gt;
      &lt;xsd:element name="voucherNo" type="xsd:int"/&gt;
      &lt;xsd:element name="traceAuditNumber" type="ns0:NotEmptyString"/&gt;
      &lt;xsd:element name="transmissionDateTime"&gt;
        &lt;xsd:simpleType&gt;
          &lt;xsd:restriction base="xsd:string"&gt;
            &lt;xsd:pattern value="(2[0-9][0-9][0-9])(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])"/&gt;
          &lt;/xsd:restriction&gt;
        &lt;/xsd:simpleType&gt;
      &lt;/xsd:element&gt;
    &lt;/xsd:sequence&gt;
  &lt;/xsd:complexType&gt;
  &lt;xsd:complexType name="PaymentStatusResponse"&gt;
    &lt;xsd:sequence&gt;
      &lt;xsd:element name="result" type="ns0:Result"/&gt;
      &lt;xsd:element name="paymentStatus" type="ns0:PaymentStatus" minOccurs="0"/&gt;
      &lt;xsd:element name="retrievalReferenceNumber" type="xsd:int" minOccurs="0"/&gt;
      &lt;xsd:element name="traceAuditNumber" type="xsd:string"/&gt;
      &lt;xsd:element name="transmissionDateTime" type="xsd:string"/&gt;
    &lt;/xsd:sequence&gt;
  &lt;/xsd:complexType&gt;
  &lt;xsd:simpleType name="NotEmptyString"&gt;
    &lt;xsd:restriction base="xsd:string"&gt;
      &lt;xsd:pattern value="(\s*[^\s]\s*)+"/&gt;
    &lt;/xsd:restriction&gt;
  &lt;/xsd:simpleType&gt;
  &lt;xsd:element name="getPaymentStatus" type="ns0:PaymentStatusRequest"/&gt;
  &lt;xsd:element name="getPaymentStatusResponse" type="ns0:PaymentStatusResponse"/&gt;
&lt;/xsd:schema&gt;
</code></pre>