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

Client parsing question

Expand Messages
  • bigel0w21
    Hello, Should the response being set as a xsi:type=xsd:string affect how I access sub-items? If I remove that from the test script below I am able to get the
    Message 1 of 1 , Apr 6, 2005
    • 0 Attachment
      Hello,

      Should the response being set as a "xsi:type=xsd:string" affect how I
      access sub-items?

      If I remove that from the test script below I am able to get the data
      I need. But since I am
      accessing a 3rd party web-service I have no control over that type
      being set. Should I be
      accessing it differently?

      Sorry for the newbie question and thanks in advance for any help.

      Alex,

      ------------- test Perl client -----------------
      #!/usr/bin/perl -w

      use 5.008;
      use warnings;
      use SOAP::Lite
      trace=>'all',
      ;

      use Data::Dumper;
      $Data::Dumper::Terse = 1;
      $Data::Dumper::Indent = 1;

      my $xml = <<'END';
      <?xml version="1.0" encoding="UTF-8"?>
      <soapenv:Envelope xmlns:soapenv="http://schemas.xm
      lsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns
      :xsi="http://www.w3.org/
      1999/XMLSchema-instance"><soapenv:Body>
      <OpGetListResponse xsi:type="xsd:string" xmlns="ur
      n:HPD_Helpdesk_WSDL" xmlns:
      xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="
      http://www.w3.org/2001/
      XMLSchema-instance">
      #<getListValues>
      <Case_ID xsi:type="xsd:string">HD00000000243243</Case_ID>
      </getListValues>
      <getListValues>
      <Case_ID xsi:type="xsd:string">HD00000000243245</Case_ID>
      </getListValues>
      <getListValues>
      <Case_ID xsi:type="xsd:string">HD0000000243246</Case_ID>
      </getListValues>
      </OpGetListResponse>
      </soapenv:Body>
      </soapenv:Envelope>
      END

      my $s = SOAP::Deserializer->new;
      my $result = $s->deserialize($xml);

      foreach $caseID ($result->valueof("//OpGetListResponse/*")) {
      print Dumper($caseID->{'Case_ID'});
      }
      ----------------- end test perl client ----------
    Your message has been successfully submitted and would be delivered to recipients shortly.