Thank you!
I've used Pod::WSDL as you sugested but I still get the error, however I've managed to find something that I think might be the issue.
First of all, this is my new code:
WebserviceFunctions.pm
package WebserviceFunctions;
=begin WSDL
_DOC Hello
_IN name $string this is the name
_OUT text $string return text
=end WSDL
sub Hello {
my ($s, $name) = @_;
return "Hello, $name".$/;
}
=begin WSDL
_DOC Goodbye
_IN name $string this is the name
_OUT text $string return text
=end WSDL
sub Goodbye {
my ($s, $name) = @_;
return "Goodbye, $name".$/;
}
1;
webservice.cgi
#!/usr/bin/perl -w
use Pod::WSDL;
use CGI;
print CGI->header('text/xml');
my $pod = new Pod::WSDL(source=> 'WebserviceFunctions.pm',
location=>'http://192.168.11.73/~efuentes/webs
+ervice',
pretty=>1,
withDocumentation=>1);
$pod->addNamespace('http://192.168.11.73/~efuentes/webservice/','Webse
+rviceFunctions');
print $pod->WSDL;
Now, you can see the full address where I generate the Webservice is
"http://192.168.11.73/~efuentes/cgi-bin/webservice/webservice.cgi", if I put that on my browser I get my wsdl, but now, I've found in that wsdl this code
"targetNamespace="http://192.168.11.73/WebserviceFunctions" wish differs from my full path, I've tried to change it with
"$pod->addNamespace('http://192.168.11.73/~efuentes/webservice/','WebserviceFunctions');" as you can see in the code, but I get the same targetNamespace on the wsdl.
Any suggestions to fix that?
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.