Search the web
Sign In
New User? Sign Up
Perl_Official · Perl . CGI . Shell script
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Service enabling PERL and accessing it from a non-PERL client   Message List  
Reply | Forward Message #2061 of 2062 |
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('http://www.myurl.com/Demo')
->proxy('http://www.myurl.com/WS/TestDemo.cgi');

# Remotely call the getTemp method
$name = shift;

my $result = $service->hello(SOAP::Data->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.




Thu May 29, 2008 5:28 pm

ragus22
Offline Offline

Forward
Message #2061 of 2062 |
Expand Messages Author Sort by Date

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....
ragus22
Offline
May 29, 2008
5:28 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help