In the same directory:package WebserviceFunctions; sub new { bless {}, shift; } sub Hello { my ($s, $name) = @_; return "Hello, $name".$/; } sub Goodbye { my ($s, $name) = @_; return "Goodbye, $name".$/; } 1;
Now, I used the#!/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);
"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 replieswsdl 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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |