title: Error while creating JAXB classes from WSDL
body: <p>First of all,I have just started working on web services and I am stuck in the first step i.e creating the java classes from the provided wsdl/xsd . I am running the following ant task to create java classes and wrapp them up in the jar file in the given location.</p>
  
  <p><strong>Error :</strong> </p>
  
  <pre><code>[xjc] [ERROR] s4s-elt-schema-ns: The namespace of element 'definitions' must be from the schema namespace, 'http://www.w3.org/2001/XMLSchema'.
        [xjc]   line 2 of file:/Users/deblinakarmakar/Desktop/work/Wland/wonderland/hybris/bin/custom/wonderlandcore/resources/taxware/BatchTaxCalculationManagerService.wsdl
        [xjc] 
        [xjc] [ERROR] s4s-elt-invalid: Element 'definitions' is not a valid element in a schema document.
        [xjc]   line 2 of file:/Users/deblinakarmakar/Desktop/work/Wland/wonderland/hybris/bin/custom/wonderlandcore/resources/taxware/BatchTaxCalculationManagerService.wsdl
  </code></pre>
  
  <p><strong>This is my WSDL file :</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;wsdl:definitions targetNamespace="http://ws.taxware.com/service" xmlns:wns="http://ws.taxware.com/service" xmlns:tns="http://ws.taxwareenterprise.com" xmlns:ens="http://ws.taxware.com/exception" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"&gt;
  
   &lt;wsdl:types&gt;
    &lt;schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://ws.taxwareenterprise.com" elementFormDefault="qualified"&gt;
  
     &lt;!-- This schema import is for the common complex types for both batch and tax. --&gt;
     &lt;!-- PLEASE DO NOT OVVERRIDE THIS WSDL FILE WITH ANY COMMON COMPLEX TYPE USED BY BOTH TAX AND BATCH WSDLs --&gt;
     &lt;import namespace="http://ws.taxwareenterprise.com" schemaLocation="TaxBatchCommon.xsd"/&gt;
     &lt;import namespace="http://ws.taxwareenterprise.com" schemaLocation="BatchTaxCalculationTypes.xsd"/&gt;
  
    &lt;xs:element name="batchCalculateDocumentRequest" type="tns:BatchTaxCalculationRequest"/&gt;
    &lt;xs:element name="batchCalculateDocumentRequestResponse"/&gt;
    &lt;xs:element name="cancelBatchRequestResponse"/&gt;
    &lt;xs:element name="endBatchRequestResponse"/&gt;
    &lt;xs:element name="cancelBatchRequest" type="tns:BatchIdRequest"/&gt;
    &lt;xs:element name="endBatchRequest" type="tns:BatchIdRequest"/&gt;
    &lt;xs:element name="removeBatchResultsRequest" type="tns:BatchIdRequest"/&gt;
    &lt;xs:element name="getBatchExceptionsRequest" type="tns:BatchIdRangeRequest"/&gt;
    &lt;xs:element name="getBatchExceptionsResponse" type="tns:ExceptionsResponse"/&gt;
    &lt;xs:element name="getBatchResultsRequest" type="tns:BatchIdRangeRequest"/&gt;
    &lt;xs:element name="getBatchResultsResponse" type="tns:GetBatchResultsResponse"/&gt;
    &lt;xs:element name="getBatchSuccessCountRequest" type="tns:BatchIdRequest"/&gt;
    &lt;xs:element name="getBatchSuccessCountResponse" type="tns:CountResponse"/&gt;
    &lt;xs:element name="isBatchCompleteRequest" type="tns:BatchIdRequest"/&gt;
    &lt;xs:element name="isBatchCompleteResponse" type="tns:IsBatchCompleteResponse"/&gt;
    &lt;xs:element name="startBatchRequest" type="tns:StartBatchRequest"/&gt;
    &lt;xs:element name="startBatchResponse" type="tns:BatchIdResponse"/&gt;
    &lt;/schema&gt;
   &lt;/wsdl:types&gt;
  
  
   &lt;wsdl:message name="cbRequest"&gt;
     &lt;wsdl:part name="request" element="tns:cancelBatchRequest"/&gt;
    &lt;/wsdl:message&gt;
  
    &lt;wsdl:message name="cbResponse"&gt;
      &lt;wsdl:part name="request" element="tns:cancelBatchRequestResponse"/&gt;
    &lt;/wsdl:message&gt;
  
    &lt;wsdl:message name="ebRequest"&gt;
     &lt;wsdl:part name="request" element="tns:endBatchRequest"/&gt;
    &lt;/wsdl:message&gt;
  
    &lt;wsdl:message name="ebResponse"&gt;
     &lt;wsdl:part name="request" element="tns:endBatchRequestResponse"/&gt;
    &lt;/wsdl:message&gt;
  
    &lt;wsdl:message name="bcdRequest"&gt;
     &lt;wsdl:part name="request" element="tns:batchCalculateDocumentRequest"/&gt;
    &lt;/wsdl:message&gt;
  
    &lt;wsdl:message name="bcdResponse"&gt;
      &lt;wsdl:part name="request" element="tns:batchCalculateDocumentRequestResponse"/&gt;
   &lt;/wsdl:message&gt;
  
  
   &lt;wsdl:message name="gbeRequest"&gt;
    &lt;wsdl:part name="request" element="tns:getBatchExceptionsRequest"/&gt;
   &lt;/wsdl:message&gt;
  
   &lt;wsdl:message name="gbeResponse"&gt;
    &lt;wsdl:part name="result" element="tns:getBatchExceptionsResponse"/&gt;
   &lt;/wsdl:message&gt;
  
   &lt;wsdl:message name="gbrRequest"&gt;
    &lt;wsdl:part name="request" element="tns:getBatchResultsRequest"/&gt;
   &lt;/wsdl:message&gt;
  
   &lt;wsdl:message name="gbrResponse"&gt;
    &lt;wsdl:part name="result" element="tns:getBatchResultsResponse"/&gt;
   &lt;/wsdl:message&gt;
  
  
   &lt;wsdl:message name="gbscRequest"&gt;
    &lt;wsdl:part name="request" element="tns:getBatchSuccessCountRequest"/&gt;
   &lt;/wsdl:message&gt;
  
   &lt;wsdl:message name="gbscResponse"&gt;
    &lt;wsdl:part name="result" element="tns:getBatchSuccessCountResponse"/&gt;
   &lt;/wsdl:message&gt;
  
  
   &lt;wsdl:message name="ibcRequest"&gt;
    &lt;wsdl:part name="request" element="tns:isBatchCompleteRequest"/&gt;
   &lt;/wsdl:message&gt;
  
   &lt;wsdl:message name="ibcResponse"&gt;
    &lt;wsdl:part name="result" element="tns:isBatchCompleteResponse"/&gt;
   &lt;/wsdl:message&gt;
  
   &lt;wsdl:message name="rbrRequest"&gt;
    &lt;wsdl:part name="request" element="tns:removeBatchResultsRequest"/&gt;
   &lt;/wsdl:message&gt;
  
  
   &lt;wsdl:message name="sbRequest"&gt;
    &lt;wsdl:part name="request" element="tns:startBatchRequest"/&gt;
   &lt;/wsdl:message&gt;
  
   &lt;wsdl:message name="sbResponse"&gt;
    &lt;wsdl:part name="result" element="tns:startBatchResponse"/&gt;
   &lt;/wsdl:message&gt;
  
   &lt;wsdl:message name="twFault"&gt;
    &lt;wsdl:part name="fault" element="tns:tweFault"/&gt;
   &lt;/wsdl:message&gt;
  
   &lt;wsdl:portType name="BatchTaxCalculationManagerServiceInterface"&gt;
   &lt;wsdl:operation name="calculateDocument"&gt;
      &lt;wsdl:input message="wns:bcdRequest"/&gt;
      &lt;wsdl:fault name="twFault" message="wns:twFault"/&gt;
    &lt;/wsdl:operation&gt;
  
     &lt;wsdl:operation name="cancelBatch"&gt;
      &lt;wsdl:input message="wns:cbRequest"/&gt;
      &lt;wsdl:fault name="twFault" message="wns:twFault"/&gt;
     &lt;/wsdl:operation&gt;
  
     &lt;wsdl:operation name="endBatch"&gt;
      &lt;wsdl:input message="wns:ebRequest"/&gt;
      &lt;wsdl:fault name="twFault" message="wns:twFault"/&gt;
     &lt;/wsdl:operation&gt;
  
     &lt;wsdl:operation name="getBatchExceptions"&gt;
      &lt;wsdl:input message="wns:gbeRequest"/&gt;
      &lt;wsdl:output message="wns:gbeResponse"/&gt;
      &lt;wsdl:fault name="twFault" message="wns:twFault"/&gt;
     &lt;/wsdl:operation&gt;
  
     &lt;wsdl:operation name="getBatchResults"&gt;
      &lt;wsdl:input message="wns:gbrRequest"/&gt;
      &lt;wsdl:output message="wns:gbrResponse"/&gt;
      &lt;wsdl:fault name="twFault" message="wns:twFault"/&gt;
     &lt;/wsdl:operation&gt;
  
     &lt;wsdl:operation name="getBatchSuccessCount"&gt;
      &lt;wsdl:input message="wns:gbscRequest"/&gt;
      &lt;wsdl:output message="wns:gbscResponse"/&gt;
      &lt;wsdl:fault name="twFault" message="wns:twFault"/&gt;
     &lt;/wsdl:operation&gt;
  
     &lt;wsdl:operation name="isBatchComplete"&gt;
      &lt;wsdl:input message="wns:ibcRequest"/&gt;
      &lt;wsdl:output message="wns:ibcResponse"/&gt;
      &lt;wsdl:fault name="twFault" message="wns:twFault"/&gt;
     &lt;/wsdl:operation&gt;
  
     &lt;wsdl:operation name="removeBatchResults"&gt;
      &lt;wsdl:input message="wns:rbrRequest"/&gt;
       &lt;!--&lt;wsdl:output message="wns:ibcResponse"/&gt;--&gt;
      &lt;wsdl:fault name="twFault" message="wns:twFault"/&gt;
     &lt;/wsdl:operation&gt;
  
     &lt;wsdl:operation name="startBatch"&gt;
      &lt;wsdl:input message="wns:sbRequest"/&gt;
      &lt;wsdl:output message="wns:sbResponse"/&gt;
      &lt;wsdl:fault name="twFault" message="wns:twFault"/&gt;
    &lt;/wsdl:operation&gt;
  
   &lt;/wsdl:portType&gt;
  
   &lt;wsdl:binding name="BatchTaxCalculationManagerServiceSoapBinding" type="wns:BatchTaxCalculationManagerServiceInterface"&gt;
      &lt;soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/&gt;
      &lt;wsdl:operation name="calculateDocument"&gt;
          &lt;soap:operation soapAction="http://ws.taxwareenterprise.com/calculateDocument"  style="document" /&gt; 
          &lt;wsdl:input&gt;
              &lt;soap:body use="literal"/&gt;
           &lt;/wsdl:input&gt;
           &lt;wsdl:fault name="twFault"&gt;
              &lt;soap:fault name="twFault" use="literal"/&gt;
          &lt;/wsdl:fault&gt;   
      &lt;/wsdl:operation&gt;
  
      &lt;wsdl:operation name="cancelBatch"&gt;
          &lt;soap:operation soapAction="http://ws.taxwareenterprise.com/cancelBatch"  style="document" /&gt;   
          &lt;wsdl:input&gt;
          &lt;soap:body use="literal"/&gt;
      &lt;/wsdl:input&gt;
      &lt;wsdl:fault name="twFault"&gt;
          &lt;soap:fault name="twFault" use="literal"/&gt;
          &lt;/wsdl:fault&gt;   
      &lt;/wsdl:operation&gt;
  
      &lt;wsdl:operation name="endBatch"&gt;
          &lt;soap:operation soapAction="http://ws.taxwareenterprise.com/endBatch"  style="document" /&gt;  
          &lt;wsdl:input&gt;
          &lt;soap:body use="literal"/&gt;
      &lt;/wsdl:input&gt;
      &lt;wsdl:fault name="twFault"&gt;
          &lt;soap:fault name="twFault" use="literal"/&gt;
          &lt;/wsdl:fault&gt;   
       &lt;/wsdl:operation&gt;
  
       &lt;wsdl:operation name="getBatchExceptions"&gt;
          &lt;soap:operation soapAction="http://ws.taxwareenterprise.com/getBatchExceptions"  style="document" /&gt;
          &lt;wsdl:input&gt;
                &lt;soap:body use="literal"/&gt;
           &lt;/wsdl:input&gt;
          &lt;wsdl:output&gt;
              &lt;soap:body use="literal"/&gt;
           &lt;/wsdl:output&gt;
           &lt;wsdl:fault name="twFault"&gt;
              &lt;soap:fault name="twFault" use="literal"/&gt;
          &lt;/wsdl:fault&gt;
       &lt;/wsdl:operation&gt;
  
       &lt;wsdl:operation name="getBatchResults"&gt;
          &lt;soap:operation soapAction="http://ws.taxwareenterprise.com/getBatchResults"  style="document" /&gt;
          &lt;wsdl:input&gt;
              &lt;soap:body use="literal"/&gt;
           &lt;/wsdl:input&gt;
          &lt;wsdl:output&gt;
              &lt;soap:body use="literal"/&gt;
           &lt;/wsdl:output&gt;
           &lt;wsdl:fault name="twFault"&gt;
              &lt;soap:fault name="twFault" use="literal"/&gt;
          &lt;/wsdl:fault&gt;
       &lt;/wsdl:operation&gt;
  
       &lt;wsdl:operation name="getBatchSuccessCount"&gt;
          &lt;soap:operation soapAction="http://ws.taxwareenterprise.com/getBatchSuccessCount"  style="document" /&gt;
          &lt;wsdl:input&gt;
                &lt;soap:body use="literal"/&gt;
            &lt;/wsdl:input&gt;
          &lt;wsdl:output&gt;
              &lt;soap:body use="literal"/&gt;
           &lt;/wsdl:output&gt;
           &lt;wsdl:fault name="twFault"&gt;
              &lt;soap:fault name="twFault" use="literal"/&gt;
          &lt;/wsdl:fault&gt;
       &lt;/wsdl:operation&gt;
  
      &lt;wsdl:operation name="isBatchComplete"&gt;
          &lt;soap:operation soapAction="http://ws.taxwareenterprise.com/isBatchComplete"  style="document" /&gt;
          &lt;wsdl:input&gt;
              &lt;soap:body use="literal"/&gt;
           &lt;/wsdl:input&gt;
          &lt;wsdl:output&gt;
              &lt;soap:body use="literal"/&gt;
           &lt;/wsdl:output&gt;
           &lt;wsdl:fault name="twFault"&gt;
              &lt;soap:fault name="twFault" use="literal"/&gt;
          &lt;/wsdl:fault&gt;
      &lt;/wsdl:operation&gt;
  
      &lt;wsdl:operation name="removeBatchResults"&gt;
          &lt;soap:operation soapAction="http://ws.taxwareenterprise.com/removeBatchResults"  style="document" /&gt;
          &lt;wsdl:input&gt;
               &lt;soap:body use="literal"/&gt;
           &lt;/wsdl:input&gt;
           &lt;wsdl:fault name="twFault"&gt;
              &lt;soap:fault name="twFault" use="literal"/&gt;
          &lt;/wsdl:fault&gt;
      &lt;/wsdl:operation&gt;
  
      &lt;wsdl:operation name="startBatch"&gt;
          &lt;soap:operation soapAction="http://ws.taxwareenterprise.com/startBatch"  style="document" /&gt;
          &lt;wsdl:input&gt;
              &lt;soap:body use="literal"/&gt;
           &lt;/wsdl:input&gt;
          &lt;wsdl:output&gt;
              &lt;soap:body use="literal"/&gt;
           &lt;/wsdl:output&gt;
           &lt;wsdl:fault name="twFault"&gt;
              &lt;soap:fault name="twFault" use="literal"/&gt;
          &lt;/wsdl:fault&gt;
      &lt;/wsdl:operation&gt;
    &lt;/wsdl:binding&gt;
  
    &lt;wsdl:service name="BatchTaxCalculationManagerServiceService"&gt;
     &lt;wsdl:port name="BatchTaxCalculationManagerService" binding="wns:BatchTaxCalculationManagerServiceSoapBinding"&gt;
      &lt;soap:address location="http://localhost:8086/twe/services/BatchTaxCalculationManagerService"/&gt;
     &lt;/wsdl:port&gt;
    &lt;/wsdl:service&gt;
  
  &lt;/wsdl:definitions&gt;
  </code></pre>