title: Referencing xml schema element from other WSDL file
body: <p>I have two WSDL files.
  I'm trying to use an element defined in one WSDL type in another WSDL file within a complexType element.</p>
  
  <p>For this, I have included the other WSDL file using an import element (otherfile.wsdl is within the same folder).
  Furthermore I set the namespaces and used the ref attribute (plus namespace) to reference the element from the other WSDL file.</p>
  
  <p>However, it complains that elements from the othertest namespace are not referencable from this test.wsdl xml schema.
  Does someone know how to solve this problem?</p>
  
  <p>Below you will find the code for the two files:</p>
  
  <p><strong>test.wsdl</strong></p>
  
  <pre><code>&lt;definitions xmlns="http://schemas.xmlsoap.org/wsdl/" 
     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
     xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
     xmlns:tns="http://www.example.com/test/" 
     xmlns:ot="http://www.example.com/othertest/" 
     targetNamespace="http://www.example.com/test/" &gt;
  
  &lt;import namespace="http://www.example.com/othertest/" location="othertest.wsdl"/&gt;
  
  &lt;types&gt;
      &lt;xsd:schema targetNamespace="http://www.example.com/test/"&gt;     
          &lt;xsd:element name="ResultElement2"&gt;
              &lt;xsd:complexType&gt;
                  &lt;xsd:sequence&gt;
                      &lt;xsd:element ref="ot:othertest_element" /&gt; 
                  &lt;/xsd:sequence&gt;
              &lt;/xsd:complexType&gt;
          &lt;/xsd:element&gt;      
      &lt;/xsd:schema&gt;
  &lt;/types&gt;
  
  &lt;/definitions&gt;
  </code></pre>
  
  <p><strong>othertest.wsdl</strong></p>
  
  <pre><code>&lt;definitions xmlns="http://schemas.xmlsoap.org/wsdl/" 
     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
     xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" 
     xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
     xmlns:tns="http://www.example.com/othertest/" 
     targetNamespace="http://www.example.com/othertest/" &gt;
  
  &lt;types&gt;
      &lt;xsd:schema targetNamespace="http://www.example.com/othertest/"&gt;
          &lt;xsd:element name="othertest_element"&gt;
              &lt;xsd:simpleType&gt;
                  &lt;xsd:restriction base="xsd:int"/&gt;
              &lt;/xsd:simpleType&gt;
          &lt;/xsd:element&gt;      
      &lt;/xsd:schema&gt;
  &lt;/types&gt;
  
  &lt;/definitions&gt;  
  </code></pre>