title: Generate java classes from a wsdl url with basic authentication
body: <p>I am trying to generate the java classes from a WSLD file, that uses basic authentication.</p>
  
  <p>Although there are many plugins out there, I have to use the following one: <code>org.jvnet.jaxb2.maven2:maven-jaxb2-plugin</code> </p>
  
  <p>With <code>wsimport</code> or <code>wsdl2java</code> i have found the way to configure the basic authentication parameters. Using the <code>maven-jaxb2-plugin</code> i had no luck.</p>
  
  <p>My configuration follows:</p>
  
  <pre><code>       &lt;plugin&gt;
              &lt;groupId&gt;org.jvnet.jaxb2.maven2&lt;/groupId&gt;
              &lt;artifactId&gt;maven-jaxb2-plugin&lt;/artifactId&gt;
              &lt;version&gt;0.13.2&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;generate&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;packageName&gt;com.mycompany&lt;/packageName&gt;
                          &lt;sourceType&gt;wsdl&lt;/sourceType&gt;
                          &lt;specVersion&gt;2.2&lt;/specVersion&gt;
                          &lt;schemas&gt;
                              &lt;schema&gt;
                                  &lt;url&gt;https://some-url?wsdl&lt;/url&gt;
                              &lt;/schema&gt;
                          &lt;/schemas&gt;
  
                          &lt;outputDirectory&gt;target/generated-sources/xjb&lt;/outputDirectory&gt;
                          &lt;clearOutputDir&gt;false&lt;/clearOutputDir&gt;
                          &lt;useActiveProxyAsHttpproxy&gt;true&lt;/useActiveProxyAsHttpproxy&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
  </code></pre>
  
  <p>As expected, the build fails with the following message:</p>
  
  <pre><code>Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL: https://some-url?wsdl
  at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1840)
  at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
  at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
  at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:647)
  at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:189)
  at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:812)
  at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
  at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
  at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
  at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument(XSDHandler.java:2275)
  ... 36 more
  </code></pre>
  
  <p>Any ideas about the basic authentication configuration? Thank's in advance!</p>
  
  <p><em>Note: <a href="https://username:pass@some-url?wsdl" rel="nofollow noreferrer">https://username:pass@some-url?wsdl</a>, i still get an IOException because of the unauthorized request.</em></p>