title: Wsdl2java behind a proxy: WSDLException: faultCode=PARSER_ERROR
body: <p>I am behind a proxy and the maven cxf plugin is failing to access the <code>wsdl</code> file.</p>
  
  <p><strong>The entry in the <code>pom.xml</code> is:</strong></p>
  
  <pre><code>&lt;plugin&gt;
                  &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
                  &lt;artifactId&gt;cxf-codegen-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.2.2&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;generate-sources&lt;/id&gt;
                          &lt;phase&gt;generate-sources&lt;/phase&gt;
                          &lt;configuration&gt;
                              &lt;!--&lt;sourceRoot&gt;${project.build.directory}/generated/cxf&lt;/sourceRoot&gt;--&gt;
                              &lt;sourceRoot&gt;${basedir}/src/main/java&lt;/sourceRoot&gt;
                              &lt;wsdlOptions&gt;
                                  &lt;wsdlOption&gt;
                                      &lt;!--&lt;bindingFiles&gt;--&gt;
                                      &lt;!--&lt;bindingFile&gt;${basedir}/src/main/resources/bind.xml&lt;/bindingFile&gt;--&gt;
                                      &lt;!--&lt;/bindingFiles&gt;--&gt;
  
  
  
                                      &lt;!--&lt;wsdl&gt;--&gt;
                                      &lt;!--${basedir}/src/CISInterfaceWSv24.wsdl--&gt;
                                      &lt;!--&lt;/wsdl&gt;--&gt;
  
                                      &lt;wsdl&gt;
                                          http://www.sometestsite.com/interface?wsdl
                                      &lt;/wsdl&gt;
  
                                  &lt;/wsdlOption&gt;
                              &lt;/wsdlOptions&gt;
                          &lt;/configuration&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;wsdl2java&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
  </code></pre>
  
  <p><strong>Below is the stacktrace:</strong></p>
  
  <pre><code>[ERROR] Failed to execute goal org.apache.cxf:cxf-codegen-plugin:3.2.2:wsdl2java (generate-sources) on project sg-decide-consult-proxy: Execution generate-sources of goal org.apache.cxf:cxf-codegen-plugin:3.2.2:wsdl2java failed: org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to create wsdl definition http://www.testdevelopment.com/interface?wsdl: WSDLException: faultCode=PARSER_ERROR: Problem parsing 'http://www.testdevelopment.com/interface?wsdl'.: java.net.SocketException: Connection reset -&gt; [Help 1]
  org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.cxf:cxf-codegen-plugin:3.2.2:wsdl2java (generate-sources) on project sg-decide-consult-proxy: Execution generate-sources of goal org.apache.cxf:cxf-codegen-plugin:3.2.2:wsdl2java failed: org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to create wsdl definition http://www.testdevelopment.com/interface?wsdl: WSDLException: faultCode=PARSER_ERROR: Problem parsing 'http://www.testdevelopment.com/interface?wsdl'.: java.net.SocketException: Connection reset
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
      at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
      at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
  Caused by: org.apache.maven.plugin.PluginExecutionException: Execution generate-sources of goal org.apache.cxf:cxf-codegen-plugin:3.2.2:wsdl2java failed: org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to create wsdl definition http://www.testdevelopment.com/interface?wsdl: WSDLException: faultCode=PARSER_ERROR: Problem parsing 'http://www.testdevelopment.com/interface?wsdl'.: java.net.SocketException: Connection reset
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      ... 21 more
  Caused by: org.apache.cxf.tools.common.ToolException: org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to create wsdl definition http://www.testdevelopment.com/interface?wsdl: WSDLException: faultCode=PARSER_ERROR: Problem parsing 'http://www.testdevelopment.com/interface?wsdl'.: java.net.SocketException: Connection reset
      at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:420)
      at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:105)
      at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
      at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
      at org.apache.cxf.maven_plugin.wsdl2java.WSDL2JavaMojo.generate(WSDL2JavaMojo.java:414)
      at org.apache.cxf.maven_plugin.AbstractCodegenMoho.execute(AbstractCodegenMoho.java:279)
      at org.apache.cxf.maven_plugin.wsdl2java.WSDL2JavaMojo.execute(WSDL2JavaMojo.java:511)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
      ... 22 more
  Caused by: org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to create wsdl definition http://www.testdevelopment.com/interface?wsdl: WSDLException: faultCode=PARSER_ERROR: Problem parsing 'http://www.testdevelopment.com/interface?wsdl'.: java.net.SocketException: Connection reset
      at org.apache.cxf.tools.wsdlto.core.WSDLDefinitionBuilder.parseWSDL(WSDLDefinitionBuilder.java:99)
      at org.apache.cxf.tools.wsdlto.core.WSDLDefinitionBuilder.build(WSDLDefinitionBuilder.java:71)
      at org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuilder.build(JAXWSDefinitionBuilder.java:83)
      at org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuilder.build(JAXWSDefinitionBuilder.java:60)
      at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:195)
      at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:164)
      at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:412)
      ... 29 more
  Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing 'http://www.testdevelopment.com/interface?wsdl'.: java.net.SocketException: Connection reset
      at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(WSDLReaderImpl.java:2198)
      at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2390)
      at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2422)
      at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:266)
      at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:165)
      at org.apache.cxf.tools.wsdlto.core.WSDLDefinitionBuilder.parseWSDL(WSDLDefinitionBuilder.java:80)
      ... 35 more
  Caused by: java.net.SocketException: Connection reset
      at java.net.SocketInputStream.read(SocketInputStream.java:209)
      at java.net.SocketInputStream.read(SocketInputStream.java:141)
      at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
      at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
      at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
      at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:704)
      at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:647)
      at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:675)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1535)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440)
      at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
      at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
      at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
      at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(WSDLReaderImpl.java:2188)
      ... 40 more
  [ERROR] 
  [ERROR] 
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
  </code></pre>