title: Creating client jar from a WSDL
body: <p>I am supposed to consume a SOAP service exposed by a third party. I have 2 basic questions w.r.t that:</p>
  
  <p>Q1. The WSDL needs a basic authentication to access through the browser. Now when I try creating the client jar using <code>wsgen/WSDL2JAVA/</code> using <code>Eclipse Webservice</code> client, I get <code>HTTP 401 unauthorised</code>. If I download and save the WSDL locally and then use <code>axis's WSDL2JAVA</code>, I get</p>
  
  <hr>
  
  <pre><code>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:178)
      at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
      at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
  Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing 'file:/C:/TEST/TOOLS/Authentication.wsdl'.: org.xml.sax.SAXParseException: The prefix "wsdl" for element "wsdl:definitions" is not bound.
      at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source)
      at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
      at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
      at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.readInTheWSDLFile(CodeGenerationEngine.java:320)
      at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.&lt;init&gt;(CodeGenerationEngine.java:133)
      ... 2 more
  Caused by: org.xml.sax.SAXParseException: The prefix "wsdl" for element "wsdl:definitions" is not bound.
      at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:249)
      at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284)
      ... 7 more
  </code></pre>
  
  <hr>
  
  <p>Q2. How do we handle a frequently changing WSDL, do we generate the client jars everytime and redeploy the application?</p>
  
  <p>Any pointers in helping me create the <code>client.jar</code> would be great.</p>