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

xml -> perl structure problem

Expand Messages
  • ctcard_hotmail_com
    I have a SOAP::Lite client talking to a .NET server (this part is working fine), but I have a problem with the way SOAP::Lite converts the returned results
    Message 1 of 1 , Sep 19, 2003
    • 0 Attachment
      I have a SOAP::Lite client talking to a .NET server (this part is
      working fine), but I have a problem with the way SOAP::Lite converts
      the returned results into a native Perl structure.

      I get back xml which has the following form:

      <s>
      <e>
      <r>rval</r>
      <p>
      <x>xval0</x>
      <y>yval0</y>
      </p>
      <p>
      <x>...</x>
      <y>...</y>
      </p>
      .
      .
      .
      <p>
      <x>xvaln</x>
      <y>yvaln</y>
      </p>
      </e>
      </s>

      The problem is that the resulting Perl hash (in $result) looks like
      $result->{s}{e}{r => rval}
      $result->{s}{e}{p}{x => xvaln, y => xvaln}

      How can I get SOAP::Lite to make something like
      $result->{s}{e}{r => rval}
      $result->{s}{e}{p}->[0]{x => xval0, y => yval0}
      .
      .
      $result->{s}{e}{p}->[n]{x => xvaln, y => yvaln}
      ?

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