title: Failed to parse the WSDL
body: <p>I am trying to generate src from wsdl using following tutorial but getting exception while wsimport.</p>
  
  <p><a href="http://www.mkyong.com/webservices/jax-ws/jax-ws-wsgen-tool-example/" rel="nofollow noreferrer">http://www.mkyong.com/webservices/jax-ws/jax-ws-wsgen-tool-example/</a></p>
  
  <blockquote>
    <p>wsimport -keep -verbose
    <a href="http://localhost:7001/poc-war/ServerInfoService?wsdl" rel="nofollow noreferrer">http://localhost:7001/poc-war/ServerInfoService?wsdl</a></p>
  </blockquote>
  
  <p>Getting following error : </p>
  
  <pre><code>C:\Program Files\Java\jdk1.8.0_102\bin&gt;wsimport -keep -verbose http://localhost:7001/poc-war/ServerInfoService?wsdl
  parsing WSDL...
  
  
  [ERROR] Server returned HTTP response code: 504 for URL: http://localhost:7001/poc-war/ServerInfoService?wsdl
  
  Failed to read the WSDL document: http://localhost:7001/poc-war/ServerInfoService?wsdl, because 1) could not find the document; /2) the document could not be read; 3) the root element of the document is not &lt;wsdl:definitions&gt;.
  
  
  [ERROR] Could not find wsdl:service in the provided WSDL(s):
  
   At least one WSDL with at least one service definition needs to be provided.
  
  
          Failed to parse the WSDL.
  </code></pre>
  
  <p>ServerInfoService?wsdl</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='UTF-8'?&gt;&lt;wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://ws.mkyong.com/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" name="ServerInfoService" targetNamespace="http://ws.mkyong.com/"&gt;
      &lt;wsdl:types&gt;
  &lt;xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://ws.mkyong.com/" targetNamespace="http://ws.mkyong.com/"&gt;
    &lt;xsd:complexType name="getIpAddressResponse"&gt;
      &lt;xsd:sequence&gt;
        &lt;xsd:element minOccurs="0" name="return" type="xsd:string"/&gt;
      &lt;/xsd:sequence&gt;
    &lt;/xsd:complexType&gt;
    &lt;xsd:complexType name="getIpAddress"/&gt;
    &lt;xsd:element name="getIpAddressResponse" type="ns0:getIpAddressResponse"/&gt;
    &lt;xsd:element name="getIpAddress" type="ns0:getIpAddress"/&gt;
  &lt;/xsd:schema&gt;
      &lt;/wsdl:types&gt;
      &lt;wsdl:message name="getIpAddress"&gt;
          &lt;wsdl:part element="tns:getIpAddress" name="parameters"/&gt;
      &lt;/wsdl:message&gt;
      &lt;wsdl:message name="getIpAddressResponse"&gt;
          &lt;wsdl:part element="tns:getIpAddressResponse" name="parameters"/&gt;
      &lt;/wsdl:message&gt;
      &lt;wsdl:portType name="ServerInfo"&gt;
          &lt;wsdl:operation name="getIpAddress"&gt;
              &lt;wsdl:input message="tns:getIpAddress" name="getIpAddress"/&gt;
              &lt;wsdl:output message="tns:getIpAddressResponse" name="getIpAddressResponse"/&gt;
          &lt;/wsdl:operation&gt;
      &lt;/wsdl:portType&gt;
      &lt;wsdl:binding name="ServerInfoServiceSoapBinding" type="tns:ServerInfo"&gt;
          &lt;soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/&gt;
          &lt;wsdl:operation name="getIpAddress"&gt;
              &lt;soap:operation soapAction="" style="document"/&gt;
              &lt;wsdl:input name="getIpAddress"&gt;
                  &lt;soap:body use="literal"/&gt;
              &lt;/wsdl:input&gt;
              &lt;wsdl:output name="getIpAddressResponse"&gt;
                  &lt;soap:body use="literal"/&gt;
              &lt;/wsdl:output&gt;
          &lt;/wsdl:operation&gt;
      &lt;/wsdl:binding&gt;
      &lt;wsdl:service name="ServerInfoService"&gt;
          &lt;wsdl:port binding="tns:ServerInfoServiceSoapBinding" name="ARMServicePortTypeImplPort"&gt;
              &lt;soap:address location="http://10.19.9.92:7001/poc-war/ServerInfoService"/&gt;
          &lt;/wsdl:port&gt;
      &lt;/wsdl:service&gt;
  &lt;/wsdl:definitions&gt;
  </code></pre>