Hello fellow monks!

I'm trying to create a Webservice with Perl and I'm using some code I found that uses WSDL::Generator to create the wsdl. I have Perl 5.10.0 in the server. This is the code: WebserviceFunctions.pm
package WebserviceFunctions; sub new { bless {}, shift; } sub Hello { my ($s, $name) = @_; return "Hello, $name".$/; } sub Goodbye { my ($s, $name) = @_; return "Goodbye, $name".$/; } 1;
In the same directory:
webservice.cgi
#!/usr/bin/perl -w use WSDL::Generator; use CGI; print CGI->header('text/xml'); my $init = { 'schema_namesp' => "http://192.168.11.73/~efuentes/webservice/Webs +erviceFunctions.xsd", 'services' => "WebserviceFunctions", 'service_name' => "WebserviceFunctions", 'target_namesp' => "http://192.168.11.73/~efuentes/webservice/", 'documentation' => "Testing CGI SOAP Service", 'location' => "http://192.168.11.73/~efuentes/webservice" }; my $w = WSDL::Generator->new($init); WebserviceFunctions->Hello('Joe'); WebserviceFunctions->Goodbye('Joe'); print $w->get(WebserviceFunctions);
Now, I used the

"use CGI; print CGI->header('text/xml');"

part because without it it gave me an error. Anyway, now I'm trying to call this Webservice from a PHP client, I call "http://heresmyhost/webservice/webservice.cgi" but it replies

wsdl error: Getting http://heresmyhost/webservice/webservice.cgi - HTTP ERROR: Unsupported HTTP response status 404 Not Found (soapclient->response has contents of the response)

I need help with that, what I am doing wrong?

In reply to WSDL::Generator I can't see the wsdl from the client by Max_Kooler

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.