title: Can't get Perl web service running using WSDL::Generator
body: <p>I have been trying for two weeks to create a web service in Perl (with <a href="https://metacpan.org/module/WSDL%3a%3aGenerator"><code>WSDL::Generator</code></a>) and call it with a client written in Perl.</p>
  
  <p>Now I try the examples provided with the library specializes in WSDL: <a href="https://metacpan.org/module/Soap%3a%3aLite"><code>Soap::Lite</code></a>
  but I get an error that keeps appearing</p>
  
  <pre><code>404 file not found at c.PL at line 7.
  </code></pre>
  
  <p>Can you help me solve it?</p>
  
  <p>Here is my code:</p>
  
  <p><code>WorldFunctions.pm</code> (C:\Perl\SOAP-Lite\WorldFunctions.pm) : the class</p>
  
  <pre><code>package WorldFunctions;
      sub new { bless {}, shift; }
      sub Hello { my ($s, $name) = @_;
              return 'Hello, ' . $name . "\n";
      }
      sub GoodBye { my ($s, $name) = @_;
              return 'Goodbye, ' . $name . "\n";
      }
  </code></pre>
  
  <p><code>a.pl</code> (C:\Perl\SOAP-Lite\a.pl): to create the WSDL file of the class WorldFunctions.pm</p>
  
  <pre><code>#!/usr/bin/perl
  use WSDL::Generator;
  my $init = {
          'schema_namesp' =&gt; 'http://localhost/world/WorldFunctions.xsd',
          'services'      =&gt; 'WorldFunctions',
          'service_name'  =&gt; 'WorldFunctions',
          'target_namesp' =&gt; 'http://localhost/world',
          'documentation' =&gt; 'Simple Hello World SOAP Service.',
          'location'      =&gt; 'http://localhost/world'
  };
  my $w = WSDL::Generator-&gt;new($init);
  WorldFunctions-&gt;Hello('Joe');
  WorldFunctions-&gt;GoodBye('Joe');
  print $w-&gt;get(WorldFunctions); # Returns the WSDL code for a specific class
  open(TOTO,"&lt;a.wsdl");
  close(TOTO);
  open(TOTO,"&gt;a.wsdl");
  print TOTO $w-&gt;get(WorldFunctions);
  close(TOTO);
  </code></pre>
  
  <p><code>c.pl</code> (C:\Perl\SOAP-Lite\c.pl): perl client WSDL file</p>
  
  <pre><code>#!/usr/bin/perl 
  use DBI();
  use CGI;
  use SOAP::Lite;
  my $service = SOAP::Lite-&gt; service('file:a.wsdl');   
  print "test retour : |".$service-&gt; Hello('Joe')."|";
  </code></pre>
  
  <p>Knowing that I use a local server (with WAMP server) and I copied into my directory WorldFunctions.pm localhost / world.</p>
  
  <p>Here is the WSDL file: </p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;definitions name="WorldFunctions" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://localhost/world" xmlns:tns="http://localhost/world" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsdl="http://localhost/world/WorldFunctions.xsd"&gt;
      &lt;types&gt;
          &lt;xsd:schema targetNamespace="http://localhost/world/WorldFunctions.xsd"&gt;
              &lt;xsd:element name="GoodByeRequest" type="xsd:string" /&gt;
              &lt;xsd:element name="GoodByeResponse" type="xsd:string" /&gt;
              &lt;xsd:element name="HelloRequest" type="xsd:string" /&gt;
              &lt;xsd:element name="HelloResponse" type="xsd:string" /&gt;
          &lt;/xsd:schema&gt;
      &lt;/types&gt;
      &lt;message name="GoodByeRequest"&gt;
          &lt;part name="GoodByeRequestSoapMsg" element="xsdl:GoodByeRequest"/&gt;
      &lt;/message&gt;
      &lt;message name="GoodByeResponse"&gt;
          &lt;part name="GoodByeResponseSoapMsg" element="xsdl:GoodByeResponse"/&gt;
      &lt;/message&gt;
      &lt;message name="HelloRequest"&gt;
          &lt;part name="HelloRequestSoapMsg" element="xsdl:HelloRequest"/&gt;
      &lt;/message&gt;
      &lt;message name="HelloResponse"&gt;
          &lt;part name="HelloResponseSoapMsg" element="xsdl:HelloResponse"/&gt;
      &lt;/message&gt;
      &lt;portType name="WorldFunctionsWorldFunctionsPortType"&gt;
          &lt;operation name="GoodBye"&gt;
              &lt;input message="tns:GoodByeRequest" /&gt;
              &lt;output message="tns:GoodByeResponse" /&gt;
          &lt;/operation&gt;
          &lt;operation name="Hello"&gt;
              &lt;input message="tns:HelloRequest" /&gt;
              &lt;output message="tns:HelloResponse" /&gt;
          &lt;/operation&gt;
      &lt;/portType&gt;
      &lt;binding name="WorldFunctionsWorldFunctionsBinding" type="tns:WorldFunctionsWorldFunctionsPortType"&gt;
          &lt;soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/&gt;
              &lt;operation name="GoodBye"&gt;
                  &lt;soap:operation style="document" soapAction=""/&gt;
                  &lt;input&gt;
                      &lt;soap:body use="literal"/&gt;
                  &lt;/input&gt;
                  &lt;output&gt;
                      &lt;soap:body use="literal"/&gt;
                  &lt;/output&gt;
              &lt;/operation&gt;
              &lt;operation name="Hello"&gt;
                  &lt;soap:operation style="document" soapAction=""/&gt;
                  &lt;input&gt;
                      &lt;soap:body use="literal"/&gt;
                  &lt;/input&gt;
                  &lt;output&gt;
                      &lt;soap:body use="literal"/&gt;
                  &lt;/output&gt;
              &lt;/operation&gt;
      &lt;/binding&gt;
      &lt;service name="WorldFunctions"&gt;
          &lt;documentation&gt;
              Simple Hello World SOAP Service.
          &lt;/documentation&gt;
          &lt;port name="WorldFunctionsWorldFunctionsPort" binding="tns:WorldFunctionsWorldFunctionsBinding"&gt;
              &lt;soap:address location="http://localhost/world"/&gt;
          &lt;/port&gt;
      &lt;/service&gt;
  &lt;/definitions&gt;
  </code></pre>