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

Problems with multiRef response - duplicate elements in array

Expand Messages
  • hpeemrod
    Hi, I am trying to use SOAP::Lite to communicate with an existing webservice over which I have no control. The web service is expected to return an array with
    Message 1 of 1 , Aug 21 2:36 AM
    • 0 Attachment
      Hi,

      I am trying to use SOAP::Lite to communicate with an existing
      webservice over which I have no control.
      The web service is expected to return an array with 2 elements, but
      for a strange reason I get 4 elements in the perl array, the last two
      being a reference to the first two elements.

      I tried writting the same client with PHP5 and Java (Axix 1.4) and
      both languages return an array with 2 elements.


      Here is the value of Data::Dumper on the data structure returned by
      SOAP::Lite :

      $VAR1 = [
      bless( {
      'resourceType' => 'NETWORK',
      'resourceName' => 'HP It (Don\'t do change)',
      'resourceKey' => '0f8001a2e7a7c53f214d96fc0c010000'
      }, 'ResourceIdentityInfo' ),
      bless( {
      'resourceType' => 'NETWORK',
      'resourceName' => 'Test',
      'resourceKey' => '0f8001a2898ae83f4ee4bcf20c010000'
      }, 'ResourceIdentityInfo' ),
      $VAR1->[0],
      $VAR1->[1]
      ];



      Here is the SOAP response returned by the server:
      ------------------------------------------------
      <?xml version="1.0" encoding="utf-8"?>
      <soapenv:Envelope
      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <soapenv:Body>
      <ns1:getAllNetworksResponse xmlns:ns1="Urn:ApiService"
      soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <getAllNetworksReturn href="#id0"/>
      </ns1:getAllNetworksResponse>
      <multiRef
      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" id="id0"
      soapenc:root="0"
      soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      soapenc:arrayType="xsd:anyType[2]" xsi:type="soapenc:Array">
      <multiRef href="#id1"/>
      <multiRef href="#id2"/>
      </multiRef>
      <multiRef xmlns:ns2="http://api.common.configmgr.powerup.com"
      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" id="id2"
      soapenc:root="0"
      soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xsi:type="ns2:ResourceIdentityInfo">
      <resourceKey
      xsi:type="soapenc:string">0f8001a2898ae83f4ee4bcf20c010000</resourceKey>
      <resourceName xsi:type="soapenc:string">Test</resourceName>
      <resourceType xsi:type="soapenc:string">NETWORK</resourceType>
      </multiRef>
      <multiRef xmlns:ns3="http://api.common.configmgr.powerup.com"
      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" id="id1"
      soapenc:root="0"
      soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xsi:type="ns3:ResourceIdentityInfo">
      <resourceKey
      xsi:type="soapenc:string">0f8001a2e7a7c53f214d96fc0c010000</resourceKey>
      <resourceName xsi:type="soapenc:string">HP It (Don't do
      change)</resourceName>
      <resourceType xsi:type="soapenc:string">NETWORK</resourceType>
      </multiRef>
      </soapenv:Body>
      </soapenv:Envelope>


      Is this a bug? Is there a way to fix this behaviour?
    Your message has been successfully submitted and would be delivered to recipients shortly.