title: Impossible to add web reference
body: <p>I'm tryin to use soap service in Visual Studio 2010 with c#. I go ad try new service reference but I always get that error</p>
  <blockquote>
  <p>Custom tool error: Failed to generate code for the service reference
  'easyZM'.  Please check other error and warning messages for
  details.  path\Service References\serviceTest\Reference.svcmap</p>
  </blockquote>
  <p>with those warning:</p>
  <blockquote>
  <p>Warning   13  Custom tool warning: Cannot import wsdl:portType</p>
  <p>Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter</p>
  <p>Error: Cannot find definition for <a href="http://schemas.xmlsoap.org/wsdl/:putDkm" rel="nofollow noreferrer">http://schemas.xmlsoap.org/wsdl/:putDkm</a>.  Service Description with namespace <a href="http://schemas.xmlsoap.org/wsdl/" rel="nofollow noreferrer">http://schemas.xmlsoap.org/wsdl/</a> is missing.</p>
  <p>Parameter name: name</p>
  <p>XPath to Error Source: //wsdl:definitions[@targetNamespace='urn:Easy']/wsdl:portType[@name='EasyPort']    path\Service References\serviceTest\Reference.svcmap</p>
  </blockquote>
  <p>I have no idea what to do. I have looked at that question <a href="https://stackoverflow.com/questions/1872865/what-does-this-wcf-error-mean-custom-tool-warning-cannot-import-wsdlporttype">What does this WCF error mean: &quot;Custom tool warning: Cannot import wsdl:portType&quot;</a> but none of solutions provided there worked for me.</p>
  <p>Path to wsdl: <a href="https://ews.zav-mb.si/easy/wsdl/easy.wsdl" rel="nofollow noreferrer">https://ews.zav-mb.si/easy/wsdl/easy.wsdl</a></p>
  <p>Any ideas?</p>
  <p>Can somebody else try and report his results?</p>
  <p>I found out that problem is likely with the wsdl file itself. But I have no idea how to fix it.</p>
  <pre><code>&lt;definitions xmlns:tns=&quot;urn:Easy&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:soap=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot; xmlns:soapenc=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot; xmlns:wsdl=&quot;http://schemas.xmlsoap.org/wsdl/&quot; xmlns=&quot;http://schemas.xmlsoap.org/wsdl/&quot; name=&quot;Easy&quot; targetNamespace=&quot;urn:Easy&quot;&gt;
  &lt;types&gt;
      &lt;xsd:schema xmlns=&quot;http://www.w3.org/2001/XMLSchema&quot; targetNamespace=&quot;urn:Hello&quot;&gt;
      &lt;xsd:element name=&quot;fileName&quot; type=&quot;xsd:string&quot;/&gt;
      &lt;xsd:element name=&quot;fileContent&quot; type=&quot;xsd:string&quot;/&gt;
      &lt;xsd:element name=&quot;fileSize&quot; type=&quot;xsd:int&quot;/&gt;
      &lt;xsd:element name=&quot;easyDocRef&quot; type=&quot;xsd:string&quot;/&gt;
      &lt;xsd:element name=&quot;message&quot; type=&quot;xsd:string&quot;/&gt;
      &lt;xsd:element name=&quot;result&quot; type=&quot;xsd:boolean&quot;/&gt;
      &lt;/xsd:schema&gt;
  &lt;/types&gt;
  
  &lt;message name=&quot;putDkm&quot;&gt;
      &lt;part name=&quot;fileName&quot; type=&quot;tns:fileName&quot;/&gt;
      &lt;part name=&quot;fileContentBase64Encoded&quot; type=&quot;tns:fileContent&quot;/&gt;
      &lt;part name=&quot;fileSize&quot; type=&quot;tns:fileSize&quot;/&gt;
  &lt;/message&gt;
  &lt;message name=&quot;putDkmResponse&quot;&gt;
      &lt;part name=&quot;result&quot; type=&quot;tns:result&quot;/&gt;
      &lt;part name=&quot;message&quot; type=&quot;tns:message&quot;/&gt;
      &lt;part name=&quot;easyDocref&quot; type=&quot;tns:easyDocRef&quot;/&gt;
  &lt;/message&gt;
  &lt;!--  get stuff  --&gt;
  &lt;message name=&quot;get&quot;&gt;
      &lt;part name=&quot;easyDocRef&quot; type=&quot;tns:getEasyDocRef&quot;/&gt;
  &lt;/message&gt;
  &lt;message name=&quot;getResponse&quot;&gt;
      &lt;part name=&quot;result&quot; type=&quot;tns:result&quot;/&gt;
      &lt;part name=&quot;message&quot; type=&quot;tns:message&quot;/&gt;
      &lt;part name=&quot;fileContentBase64Encoded&quot; type=&quot;tns:fileContent&quot;/&gt;
      &lt;part name=&quot;fileName&quot; type=&quot;tns:fileName&quot;/&gt;
  &lt;/message&gt;
  &lt;portType name=&quot;EasyPort&quot;&gt;
      &lt;operation name=&quot;putDkm&quot;&gt;
          &lt;input message=&quot;putDkm&quot;/&gt;
          &lt;output message=&quot;tns:putDkmResponse&quot;/&gt;
      &lt;/operation&gt;
      &lt;operation name=&quot;get&quot;&gt;
          &lt;input message=&quot;get&quot;/&gt;
          &lt;output message=&quot;tns:getResponse&quot;/&gt;
      &lt;/operation&gt;
  &lt;/portType&gt;
  &lt;binding name=&quot;EasyBinding&quot; type=&quot;tns:EasyPort&quot;&gt;
      &lt;soap:binding style=&quot;rpc&quot; transport=&quot;http://schemas.xmlsoap.org/soap/http&quot;/&gt;
      &lt;operation name=&quot;putDkm&quot;&gt;
          &lt;soap:operation soapAction=&quot;urn:putDkmAction&quot;/&gt;
          &lt;input&gt;
              &lt;soap:body use=&quot;encoded&quot; namespace=&quot;urn:Easy&quot; encodingStyle=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;/&gt;
          &lt;/input&gt;
          &lt;output&gt;
              &lt;soap:body use=&quot;encoded&quot; namespace=&quot;urn:Easy&quot; encodingStyle=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;/&gt;
          &lt;/output&gt;
      &lt;/operation&gt;
      &lt;operation name=&quot;get&quot;&gt;
          &lt;soap:operation soapAction=&quot;urn:getAction&quot;/&gt;
          &lt;input&gt;
              &lt;soap:body use=&quot;encoded&quot; namespace=&quot;urn:Easy&quot; encodingStyle=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;/&gt;
          &lt;/input&gt;
          &lt;output&gt;
              &lt;soap:body use=&quot;encoded&quot; namespace=&quot;urn:Easy&quot; encodingStyle=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;/&gt;
          &lt;/output&gt;
      &lt;/operation&gt;
  &lt;/binding&gt;
  &lt;service name=&quot;EasyService&quot;&gt;
      &lt;port name=&quot;EasyPort&quot; binding=&quot;tns:EasyBinding&quot;&gt;
          &lt;soap:address location=&quot;https://ews.zav-mb.si/easy/index.php&quot;/&gt;
      &lt;/port&gt;
  &lt;/service&gt;
  &lt;/definitions&gt;
  </code></pre>