Loading ...
Sorry, an error occurred while loading the content.

5670Re: [soaplite] sending multiple hashes from client to server over SOAP

Expand Messages
  • Rohitashva Sharma
    Oct 13, 2006
    • 0 Attachment
      Hi Sebastian,

      Thanks a lot...

      regards
      Sharma

      On 10/12/06, Sebastian Jaenicke
      <sjaenick+SOAPLITE@...-bielefeld.de> wrote:
      > On Thu, Oct 12, 2006 at 09:04:52PM +0200, Rohitashva Sharma wrote:
      > [..]
      > > CLIENT SIDE:
      > [..]
      > > eval '$soap_response = $soap_handle->handle_hash(%hash);';
      >
      > Use
      >
      > ->handle_hash(\%hash); # note the '\'
      >
      > here, which results in
      >
      > <handle_hash xmlns="http://localhost/Notd">
      > <c-gensym3>
      > <hashh2>
      > <RRohit xsi:type="xsd:int">31</RRohit>
      > <RPoney xsi:type="xsd:int">5</RPoney>
      > </hashh2>
      > <hashh1>
      > <Rohit xsi:type="xsd:int">31</Rohit>
      > <Poney xsi:type="xsd:int">5</Poney>
      > </hashh1>
      > </c-gensym3>
      > </handle_hash>
      >
      > > SERVER SIDE:
      >
      > sub handle_hash {
      > my ($self, $hash_ref) = @_;
      > my %hash = %$hash_ref;
      > open (DATA, ">>/tmp/data");
      > foreach my $key (keys %hash) {
      > print DATA "HASH: $key\n";
      > my %entry = %{$hash{$key}};
      > foreach my $k (keys %entry) {
      > print DATA " $k -> $entry{$k}\n";
      > }
      > }
      > close(DATA);
      > return 1;
      > }
      >
      > Works for me:
      >
      > $ cat /tmp/data
      > HASH: hashh2
      > RRohit -> 31
      > RPoney -> 5
      > HASH: hashh1
      > Rohit -> 31
      > Poney -> 5
      >
      >
      > - Sebastian
      > -
      > Progress (n.): The process through which Usenet has evolved from
      > smart people in front of dumb terminals to dumb people in front
      > of smart terminals.
      > -- obs@...
      >
    • Show all 6 messages in this topic