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

Accessing Data in SOAP Envelope

Expand Messages
  • matt_germonprez
    Could someone give me some help on getting this data out with the perl code below. Not sure on this. Basically, I need all data inside of the root tag.
    Message 1 of 1 , Nov 29, 2005
    • 0 Attachment
      Could someone give me some help on getting this data out with the perl
      code below. Not sure on this.

      Basically, I need all data inside of the root <item> tag. I'll
      continue to work but thought two heads are better than one.

      Thanks as always,
      matt


      <SOAP-ENV:Body>
      <namesp1:spellcheckResponse
      xmlns:namesp1="http://itlab.musc.edu/spellcheck">

      <SOAP-ENC:Array xsi:type="SOAP-ENC:Array"
      SOAP-ENC:arrayType="xsd:anyType[1]">

      <item>
      <misses xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[4]">
      <item xsi:type="xsd:string">wick</item>
      <item xsi:type="xsd:string">quick</item>
      <item xsi:type="xsd:string">q wick</item>
      <item xsi:type="xsd:string">q-wick</item>
      </misses>
      <line_number xsi:type="xsd:int">0</line_number>
      <type xsi:type="xsd:string">miss</type>
      <offset xsi:type="xsd:int">6</offset>
      <term xsi:type="xsd:string">qwick</term>
      <line xsi:type="xsd:string">i am qwick</line>
      </item>

      </SOAP-ENC:Array>
      </namesp1:spellcheckResponse>
      </SOAP-ENV:Body>

      **************PERL CODE **************************

      #!/usr/bin/perl -w
      use CGI qw(:standard);
      use SOAP::Lite +trace => 'debug';

      $message = 'i am qwick';

      my $client = SOAP::Lite
      ->uri('http://itlab.musc.edu/spellcheck')
      ->proxy('http://rpc.itlab.musc.edu/cgi-bin/RPC/index.pl');

      my $resp = $client
      ->spellcheck($message, "array");
    Your message has been successfully submitted and would be delivered to recipients shortly.