How to send Hash from PHP to Perl using Soap::Lite
| From: | Sukumar .S | Date: | Mon, 07 Oct 2002 08:25:04 +0000 |
| Subject: | How to send Hash from PHP to Perl using Soap::Lite | ||
| Groups: | php.soap | ||
| Request: | Send a blank email to php-soap+get-277@lists.php.net to get a copy of this message | ||
Dear all,
I'm very new to SOAP.
I'm using Pear::SOAP in PHP and SOAP::Lite in perl.
I have to send a Hash from PHP to Perl. But when i send the hash it goes
as an List. How can get the php hash as Perl Hash ?.
Please Help me...
with regards,
S. Sukumar
Here is my code on PHP
SendHash.php
<?php
include("SOAP/Client.php");
$Inputs = array (
'USER_NAME' => "S. Sukumar",
'GROUP_NAME' => "Administrator"
);
$S = new SOAP_Client("http://sukumar.bksys.co.in/cgi-bin/Hello.pl");
$Result = $S->Call("User_Info",$Inputs,"urn:Hello");
print_r($Result)
?>
The corresponding Perl Package Hello.pm is
-------------------------------------------
package Hello;
use Data::Dumper;
sub User_Info
{
my ($Class,@Info) = @_;
my $Key = "";
my $Data = "";
foreach $Key (@Info)
{
$Data .= $Key . ";";
}
return "Received the User Information $Data";
}
1;