title: WSDL Definition Problem
body: <p>We have been given a .wsdl file (listing below) which we will be using to generate c# code for use in our app. When I load the file into xmlspy I get the following error</p>
  
  <pre><code>attribute 'type' in message part 'organisation' (message 'getOrganisationResponse') refers to type 'organisation' which is not defined within the WSDL file!
  </code></pre>
  
  <p>It says it can't find the type but this is defined in the  section at the top of the file, so I'm not sure why it does not find it.</p>
  
  <p>Any help would be appreciated</p>
  
  <p>Cheers</p>
  
  <p>Richard</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;definitions 
      xmlns:tns="http://www.xxxx.com/epp/" 
      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
      xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
      xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
      xmlns:ns1="http://xml.apache.org/xml-soap/" 
      xmlns="http://schemas.xmlsoap.org/wsdl/" 
      name="Heiq" 
      targetNamespace="http://www.xxxx.com/epp/"&gt;
  
  
    &lt;types&gt;
    &lt;!-- Organisation object --&gt;
    &lt;xsd:element name="organisation"&gt;
    &lt;xsd:complexType&gt;
      &lt;xsd:sequence&gt;
       &lt;xsd:element name="id" type="xsd:string" minOccurs="0"/&gt;
       &lt;xsd:element name="componentID" type="xsd:string" minOccurs="0"/&gt;
       &lt;xsd:element name="name" type="xsd:string" minOccurs="0"/&gt;
       &lt;xsd:element name="suburb" type="xsd:string" minOccurs="0"/&gt;
       &lt;xsd:element name="address1" type="xsd:string" minOccurs="0"/&gt;
       &lt;xsd:element name="address2" type="xsd:string" minOccurs="0"/&gt;
       &lt;xsd:element name="postcode" type="xsd:string"/&gt;
       &lt;xsd:element name="phone" type="xsd:string"/&gt;
       &lt;xsd:element name="fax" type="xsd:string"/&gt;
       &lt;xsd:element name="emailAddress" type="xsd:string"/&gt;
       &lt;xsd:element name="website" type="xsd:string"/&gt;
       &lt;xsd:element name="contactPersonName" type="xsd:string"/&gt;
      &lt;/xsd:sequence&gt;
     &lt;/xsd:complexType&gt;
    &lt;/xsd:element&gt;
   &lt;/types&gt;
  
  
   &lt;message name="getOrganisationRequest"&gt;
    &lt;part name="token" type="xsd:string"/&gt;
    &lt;part name="organisationID" type="xsd:string"/&gt;
   &lt;/message&gt;
  
   &lt;message name="getOrganisationResponse"&gt;
    &lt;part name="organisation" type="organisation"/&gt;
   &lt;/message&gt;
  
  
    &lt;portType name="xxxxPortType"&gt;
    &lt;!-- Get organisation function --&gt;
    &lt;operation name="getOrganisation"&gt;
     &lt;input message="tns:getOrganisationRequest"/&gt;
     &lt;output message="tns:getOrganisationResponse"/&gt;
    &lt;/operation&gt;
   &lt;/portType&gt;
  
  
   &lt;binding name="xxxxBinding" type="tns:xxxxPortType"&gt;
    &lt;soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/&gt;
    &lt;!-- Get organisation function --&gt;
    &lt;operation name="getOrganisation"&gt;
     &lt;input&gt;
      &lt;soap:body use="encoded"        encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/&gt;
     &lt;/input&gt;
     &lt;output&gt;
      &lt;soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/&gt;
     &lt;/output&gt;
    &lt;/operation&gt;
   &lt;/binding&gt;
  
  
   &lt;service name="xxxxService"&gt;
    &lt;port name="xxxxPort" binding="tns:xxxxBinding"&gt;
     &lt;soap:address location="http://www.xxxx.com/xxxx/application/soap.php"/&gt;
    &lt;/port&gt;
   &lt;/service&gt;
  
  &lt;/definitions&gt;
  </code></pre>