title: Referenced type can not be found while trying to import WSDL
body: <p>I'm trying to generate a Java Service Class in Mule from this WSDL using the SOAP component's Import WSDL and generate JAX-WS classes feature: <a href="https://www.tracegains.net/api/scsi.asmx?WSDL" rel="nofollow noreferrer">https://www.tracegains.net/api/scsi.asmx?WSDL</a></p>
  
  <p><img src="https://i.stack.imgur.com/jWMvs.png" alt="Generate from WSDL Dialog"></p>
  
  <p>But I'm getting an <code>undefined element declaration 's:schema' at line xx column yy of schema</code> (error repeated quite a few times).</p>
  
  <p><img src="https://i.stack.imgur.com/RR88T.png" alt="XML Schema Error"></p>
  
  <p>So, based on this answer: <a href="https://stackoverflow.com/questions/6209583/error-when-using-jax-to-generate-proxy-web-service-client">Error when using Jax to generate Proxy web service client</a> I saved the WSDL file locally and changed the reference from <a href="http://www.w3.org/2001/XMLSchema" rel="nofollow noreferrer">http://www.w3.org/2001/XMLSchema</a> to <a href="http://www.w3.org/2001/XMLSchema.xsd" rel="nofollow noreferrer">http://www.w3.org/2001/XMLSchema.xsd</a></p>
  
  <p>Now I'm getting a <code>Part &lt;parameters&gt; in Message &lt;{http://www.tracegains.net/Services}GetAttributesByIngredientSoapOut&gt; referenced Type &lt;{http://www.tracegains.net/Services}GetAttributesByIngredientResponse&gt; can not be found in the schemas.</code></p>
  
  <p><img src="https://i.stack.imgur.com/Qe5qC.png" alt="referenced Type can not be found in the schemas"></p>
  
  <p>I also tried the wsimport tool from Apache CXF 3.0.0 but I'm getting similar results there:</p>
  
  <pre><code>[ERROR] Schema descriptor {http://www.tracegains.net/Services}Version in message part "parameters" is not defined and could not be bound to Java. Perhaps the schema descriptor {http://www.tracegains.net/Services}Version is not defined in the schema imported/included in the WSDL. You can either add such imports/includes or run wsimport and provide the schema location using -b switch.  line 774 of file:/D:/tg/tg_modified.wsdl
  </code></pre>
  
  <p>It appears to me that the import is failing on the tns namespace, but when I try to browse the tns namespace uri I'm getting a 404: <a href="http://www.tracegains.net/Services" rel="nofollow noreferrer">http://www.tracegains.net/Services</a>  Is this the problem or is there something else I can do to get this to work?</p>