title: Calling PHP webservice from .Net
body: <p>I have created a Webservice in PHP and I'm trying to call it from my C# code.</p>
  
  <p>When I try to create a proxy using wsdl utility</p>
  
  <blockquote>
    <p>wsdl <a href="http://localhost:5365/DemoService.php?wsdl" rel="nofollow">http://localhost:5365/DemoService.php?wsdl</a></p>
  </blockquote>
  
  <p>I get this errors</p>
  
  <blockquote>
    <p>Error: Cannot find definition for  <a href="http://myserver.co.za/sayHello:sayHelloPortType" rel="nofollow">http://myserver.co.za/sayHello:sayHelloPortType</a>.<br>
    Service Description with namespace  <a href="http://myserver.co.za/sayHello" rel="nofollow">http://myserver.co.za/sayHello</a> is missing.<br>
    Parameter name: name</p>
  </blockquote>
  
  <p>Here's my Webservice code (DemoService.php)</p>
  
  <pre><code>&lt;?php
  
      function sayHello($name){
          $salutation = "Hi $name !";
          return $salutation;
      }
  
      $server = new SoapServer("greetings.wsdl");
      $server-&gt;addFunction("sayHello");
      $server-&gt;handle();
  
  ?&gt;
  </code></pre>
  
  <p>and my WSDL code (greetings.wsdl)</p>
  
  <pre><code>&lt;?xml version ='1.0' encoding ='UTF-8' ?&gt; 
  
  &lt;definitions name='greetings' 
    targetNamespace='http://myserver.co.za/sayHello' 
    xmlns:tns=' http://myserver.co.za/sayHello' 
    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='http://schemas.xmlsoap.org/wsdl/'&gt; 
  
    &lt;message name='sayHelloRequest'&gt; 
      &lt;part name='name' type='xsd:string'/&gt; 
    &lt;/message&gt; 
  
    &lt;message name='sayHelloResponse'&gt; 
      &lt;part name='salutation' type='xsd:string'/&gt; 
    &lt;/message&gt; 
  
    &lt;portType name='sayHelloPortType'&gt; 
      &lt;operation name='sayHello'&gt; 
        &lt;input message='tns:sayHelloRequest'/&gt; 
        &lt;output message='tns:sayHelloResponse'/&gt; 
      &lt;/operation&gt; 
    &lt;/portType&gt; 
  
    &lt;binding name='sayHelloBinding' type='tns:sayHelloPortType'&gt; 
      &lt;soap:binding style='rpc' 
        transport='http://schemas.xmlsoap.org/soap/http'/&gt; 
      &lt;operation name='sayHello'&gt; 
        &lt;soap:operation soapAction=''/&gt; 
        &lt;input&gt; 
          &lt;soap:body use='encoded' namespace='' 
            encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/&gt; 
        &lt;/input&gt; 
        &lt;output&gt; 
          &lt;soap:body use='encoded' namespace='' 
            encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/&gt; 
        &lt;/output&gt; 
      &lt;/operation&gt; 
    &lt;/binding&gt; 
  
    &lt;documentation&gt;This is Wiley's SOAP server Example&lt;/documentation&gt;
  
    &lt;service name='sayHelloService'&gt; 
      &lt;port name='sayHelloPort' binding='sayHelloBinding'&gt; 
        &lt;soap:address location='http://localhost:5365/DemoService.php'/&gt; 
      &lt;/port&gt; 
    &lt;/service&gt; 
  
  &lt;/definitions&gt;
  </code></pre>
  
  <p>I really don't understand what it is trying to say. Can some one point me in a right direction?</p>