Hi,
I am basically new to wbeservices using PERL. I have a perl script
that I need to service enable and this service nneeds to be called by
a non-PERL client.
Can someone please walk me through the steps. This is what I have
done so far.
1) Created a class called Demo(.pm) with two methods hello and bye.
---- Demo.pm ----
#! C:\Perl\bin\perl
package Demo;
sub hello {
shift;
$name = shift;
return "Hello there, $name";
}
sub bye {
shift;
$name = shift;
return "Goodbye, $name";
}
sub languages {
return ("Perl", "C", "sh");
}
1;
----
2) Created a SOAP server called TestDemo.cgi
**** TestDemo.cgi ****
#! C:\Perl\bin\perl
use SOAP::Transport::HTTP;
use Demo;
SOAP::Transport::HTTP::CGI
-> dispatch_to('Demo')
-> handle;
****
3) When I call this server using a PerlClient it works fine and
returns the "Hello <NAME>" statement.
******TestDemo.pl*****
#!C:\Perl\bin
use SOAP::Lite;
# Instantiate a new SOAP::Lite object
my $service = new SOAP::Lite
->uri('->proxy('
# Remotely call the getTemp method
$name = shift;
my $result = $service->hello(SOAP:ata->type(string => $name));
unless ($result->fault) {
print $result->result();
} else {
print join ', ',
$result->faultcode,
$result->faultstring,
$result->faultdetail;
}
*********
>TestDemo.pl Joe
>Hello there, Joe
**
4) How to I call this service from a non-PERL(say Java) client.
I am basically new to wbeservices using PERL. I have a perl script
that I need to service enable and this service nneeds to be called by
a non-PERL client.
Can someone please walk me through the steps. This is what I have
done so far.
1) Created a class called Demo(.pm) with two methods hello and bye.
---- Demo.pm ----
#! C:\Perl\bin\perl
package Demo;
sub hello {
shift;
$name = shift;
return "Hello there, $name";
}
sub bye {
shift;
$name = shift;
return "Goodbye, $name";
}
sub languages {
return ("Perl", "C", "sh");
}
1;
----
2) Created a SOAP server called TestDemo.cgi
**** TestDemo.cgi ****
#! C:\Perl\bin\perl
use SOAP::Transport::HTTP;
use Demo;
SOAP::Transport::HTTP::CGI
-> dispatch_to('Demo')
-> handle;
****
3) When I call this server using a PerlClient it works fine and
returns the "Hello <NAME>" statement.
******TestDemo.pl*****
#!C:\Perl\bin
use SOAP::Lite;
# Instantiate a new SOAP::Lite object
my $service = new SOAP::Lite
->uri('->proxy('
# Remotely call the getTemp method
$name = shift;
my $result = $service->hello(SOAP:ata->type(string => $name));
unless ($result->fault) {
print $result->result();
} else {
print join ', ',
$result->faultcode,
$result->faultstring,
$result->faultdetail;
}
*********
>TestDemo.pl Joe
>Hello there, Joe
**
4) How to I call this service from a non-PERL(say Java) client.