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

php associated array and perl soaplite hash

Expand Messages
  • John Liu
    I did a test,the php soap server returns associated array in the form - $res[$i] = array ( elem1 = $arr[0], elem2 = $arr[1], elem3 = $arr[2], elem4
    Message 1 of 6 , Sep 19, 2002
    • 0 Attachment
      I did a test,the php soap server returns
      associated array in the form -
      $res[$i] = array ( 'elem1' => $arr[0],
      'elem2' => $arr[1],
      'elem3' => $arr[2],
      'elem4' => $arr[3]);

      the WSDL file is similar to GoogleSearch.wsdl,
      I tried to use soaplite to do the following
      call -
      my $result= SOAP::Lite
      -> service('http://services/mkbt.wsdl');
      -> myCall($sec, '123', 'johnl');

      if(defined($result->{resultElements})) {
      print join "\n",
      "Found:",
      $result->{resultElements}->[0]->{elem1},
      $result->{resultElements}->[0]->{elem2} . "\n"
      }

      The error msg - Can't coerce array into hash.

      A year ago, I can't figure this out.
      Is any body find a way now to handle this?

      thanks.

      johnl
    Your message has been successfully submitted and would be delivered to recipients shortly.