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

xml to perl: help!

Expand Messages
  • jigsaw9876
    Hi, Client sends a SOAP::Data like: { app= [ app1 . app2 ], crc= 1 , outformat= raw } Now the soap message itself looks like:
    Message 1 of 1 , Jul 20, 2004
    • 0 Attachment
      Hi,

      Client sends a SOAP::Data like:

      { app=>["app1"."app2"],
      crc=>"1",
      outformat=>"raw"}

      Now the soap message itself looks like:

      <SOAP-ENV:Body>
      <namesp1:doTest xmlns:namesp1="http://myurl/Test">
      <c-gensym3>
      <app xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[2]">
      <item xsi:type="xsd:string">app1</item>
      <item xsi:type="xsd:string">app2</item>
      </app>
      <crc xsi:type="xsd:int">1</crc>
      <outformat xsi:type="xsd:string">raw</outformat>
      </c-gensym3>
      </namesp1:doTest>
      </SOAP-ENV:Body>

      I am happy with the above.
      Now at the server:
      sub doTest {
      my ($self, $params) = @_;
      my $result;

      print STDERR "Keys and values after processing: \n";
      foreach my $key (sort keys %{$params}) {
      print STDERR "key: $key \t ";
      print STDERR "value: $params->{$key}\n";
      }
      return $result;
      }

      I get
      key:crc value: 1
      key:outformat value: raw
      key:app value: ARRAY(0x8c3f754)

      What do I do to get the values in the array?
      Please help!
      Thanks in advance,
      JS
    Your message has been successfully submitted and would be delivered to recipients shortly.