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

Strange behavior in SOAP

Expand Messages
  • Bouche
    Hi, I m experiencing some strange things in SOAP which i have trouble fixing. The response i get from the soap-server looks good....and there is some info i
    Message 1 of 3 , Sep 11, 2002
    • 0 Attachment
      Melding
      Hi,
       
      I'm experiencing some strange things in SOAP which i have trouble fixing.
       
      The response i get from the soap-server looks good....and there is some info i need to extract *look below, a cutout of the response*
      One should belive that when it would be possible to access these elements (resultCauseText & resultCauseCode ), but when i try i only get the
      last element (<resultCauseText xsi:type="xsd:string">Tilgjengelig produktklasse: ADSL 2048/256</resultCauseText>).
       
      I found this pretty strange, and ran a Dumper on the respons-hash, and saw this :
       
      'listOfResultCause' => bless( {
          'item' => bless( {
              'resultCauseText' => 'Tilgjengelig produktklasse: ADSL 2048/256',
              'resultCauseCode' => '180'
          }, 'ResultCause' )
      }, 'Vector' )
       
       
      And this is where it all stops because to me it seemes that the other elements in this Vector is overwriten or something,
      anyone got a clue on what is going on here??
       
       
       
      ***** response ******
       
      <listOfResultCause xsi:type="ns3:Vector">
      <item xmlns:ns9="urn:soap-kapaks-response-ResultCause-kapaksm2minterface" xsi:type="ns9:ResultCause">
      <resultCauseText xsi:type="xsd:string">Linjen har produktet ISDN GT</resultCauseText>
      <resultCauseCode xsi:type="xsd:int">30</resultCauseCode>
      </item>
      <item xmlns:ns10="urn:soap-kapaks-response-ResultCause-kapaksm2minterface" xsi:type="ns10:ResultCause">
      <resultCauseText xsi:type="xsd:string">Total linjelengde inkludert inntak: 496 meter</resultCauseText>
      <resultCauseCode xsi:type="xsd:int">110</resultCauseCode>
      </item>
      <item xmlns:ns11="urn:soap-kapaks-response-ResultCause-kapaksm2minterface" xsi:type="ns11:ResultCause">
      <resultCauseText xsi:type="xsd:string">Lengde på inntak: 100 meter (standard)</resultCauseText>
      <resultCauseCode xsi:type="xsd:int">111</resultCauseCode>
      </item>
      <item xmlns:ns12="urn:soap-kapaks-response-ResultCause-kapaksm2minterface" xsi:type="ns12:ResultCause">
      <resultCauseText xsi:type="xsd:string">Linjestatus: Ukjent</resultCauseText>
      <resultCauseCode xsi:type="xsd:int">122</resultCauseCode>
      </item>
      <item xmlns:ns13="urn:soap-kapaks-response-ResultCause-kapaksm2minterface" xsi:type="ns13:ResultCause">
      <resultCauseText xsi:type="xsd:string">Fabrikat på utstyr: ALCASH</resultCauseText>
      <resultCauseCode xsi:type="xsd:int">150</resultCauseCode>
      </item>
      <item xmlns:ns14="urn:soap-kapaks-response-ResultCause-kapaksm2minterface" xsi:type="ns14:ResultCause">
      <resultCauseText xsi:type="xsd:string">Tilgjengelig produktklasse: ADSL 2048/256</resultCauseText>
      <resultCauseCode xsi:type="xsd:int">180</resultCauseCode>
      </item>
      </listOfResultCause>
       
       
      --
      Med vennlig hilsen / Kind regards
      Stig Woxholt - Senior Programmer
      Tiscali Norway AS
      P.O. Box 598, Skøyen - N-0214 Oslo
      Tel + 47 24 11 24 00 - Fax + 47 24 11 24 11
      Dir + 47 24 11 28 25 - Mob + 47 99 21 76 45
       
    • rjray@blackperl.com
      Can you show us the code you were running? Some of the data-retrieval calls behave differently in scalar vs. list context. Randy --
      Message 2 of 3 , Sep 13, 2002
      • 0 Attachment
        Can you show us the code you were running? Some of the data-retrieval calls
        behave differently in scalar vs. list context.

        Randy
        --
        """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
        Randy J. Ray rjray@...
        Campbell, CA rjray@...
        <A HREF="http://www.svsm.org">Silicon Valley Scale Modelers</A>
      • Bouche
        I cant cut and paste all the code here, because it s a a big app.. ..but what happens is I call the remote soap-server and I get the response in $response , I
        Message 3 of 3 , Sep 16, 2002
        • 0 Attachment
          I cant cut and paste all the code here, because it's a a big app..

          ..but what happens is I call the remote soap-server and I get the
          response in $response , I don't extract all the info from the respone,
          just the things I need.

          The resultCauseText I have problems with I get this way :

          my $utf8_resultCauseText =
          utf8(&KAPAKSfunc::strip_blanks($response->{'listOfProductReplies'}->{'it
          em'}->{'connectionProperties'}->{'listofLinePartProperties'}->{'item'}->
          {'service'}->{'listOfResultCause'}->{'item'}->{'resultCauseText'}));
          my $resultCauseText = $utf8_resultCauseText->latin1;

          I understand that this will never work so I tried looping through it
          (each item), since I had several items......but that would'nt work
          either...

          Any help is deeply appreciated :)

          -Stig



          -----Opprinnelig melding-----
          Fra: rjray@... [mailto:rjray@...]
          Sendt: 13. september 2002 10:59
          Til: Bouche
          Kopi: soaplite@yahoogroups.com
          Emne: Re: [soaplite] Strange behavior in SOAP


          Can you show us the code you were running? Some of the data-retrieval
          calls behave differently in scalar vs. list context.

          Randy
          --
          """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
          """""""
          Randy J. Ray
          rjray@...
          Campbell, CA
          rjray@...
          <A HREF="http://www.svsm.org">Silicon Valley Scale Modelers</A>
        Your message has been successfully submitted and would be delivered to recipients shortly.