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

Deserialisation

Expand Messages
  • sjhthorn@micronet.fr
    Is there a way to get the uuid out of the following response:
    Message 1 of 2 , Nov 28, 2001
    • 0 Attachment
      Is there a way to get the uuid out of the following response:

      <SOAP-ENV:Envelope xmlns:SOAP-ENV=...>
      <SOAP-ENV:Body>
      <ns1:getDeviceProfileResponse xmlns ...>
      <return>
      <profile uuid="{88888888-CCCC-5555-6666-EEB9E0B72145}"
      ctiid="1557331997">
      <name>name</name>
      <description></description>
      <product>product name</product>
      <model>model name</model>
      </profile>
      </return>
      </ns1:getDeviceProfileResponse>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>

      I am getting close: the profile object below is the hash containing
      name, description, model etc. but no handle to the uuid:

      my $method = SOAP::Data
      ->name("axl:getDeviceProfile")
      ->attr($attributes);
      my $params = SOAP::Data
      ->name("profileName")
      ->value($name);
      my $profileObj = $soap->call($method, $params);
      // profileObj is the response shown above
      my $profile = $profileObj->valueOf("//profile");

      Thanks,
      Stuart.
    • Paul Kulchenko
      Hi, Stuart! ... dataof() instead of valueof() will return SOAP::Data object for you where you can access all attributes (- attr returns hash with all
      Message 2 of 2 , Nov 28, 2001
      • 0 Attachment
        Hi, Stuart!

        > Is there a way to get the uuid out of the following response:
        > <profile uuid="{88888888-CCCC-5555-6666-EEB9E0B72145}"
        > ctiid="1557331997">
        > my $profile = $profileObj->valueOf("//profile");
        dataof() instead of valueof() will return SOAP::Data object for you
        where you can access all attributes (->attr returns hash with all
        attributes):

        print $profileObj->dataof("//profile")->attr->{uuid};

        Hope it helps.

        Best wishes, Paul.

        --- sjhthorn@... wrote:
        > Is there a way to get the uuid out of the following response:
        >
        > <SOAP-ENV:Envelope xmlns:SOAP-ENV=...>
        > <SOAP-ENV:Body>
        > <ns1:getDeviceProfileResponse xmlns ...>
        > <return>
        > <profile uuid="{88888888-CCCC-5555-6666-EEB9E0B72145}"
        > ctiid="1557331997">
        > <name>name</name>
        > <description></description>
        > <product>product name</product>
        > <model>model name</model>
        > </profile>
        > </return>
        > </ns1:getDeviceProfileResponse>
        > </SOAP-ENV:Body>
        > </SOAP-ENV:Envelope>
        >
        > I am getting close: the profile object below is the hash containing
        >
        > name, description, model etc. but no handle to the uuid:
        >
        > my $method = SOAP::Data
        > ->name("axl:getDeviceProfile")
        > ->attr($attributes);
        > my $params = SOAP::Data
        > ->name("profileName")
        > ->value($name);
        > my $profileObj = $soap->call($method, $params);
        > // profileObj is the response shown above
        > my $profile = $profileObj->valueOf("//profile");
        >
        > Thanks,
        > Stuart.
        >
        >
        >
        > ------------------------ Yahoo! Groups Sponsor
        >
        > To unsubscribe from this group, send an email to:
        > soaplite-unsubscribe@yahoogroups.com
        >
        >
        >
        > Your use of Yahoo! Groups is subject to
        > http://docs.yahoo.com/info/terms/
        >
        >


        __________________________________________________
        Do You Yahoo!?
        Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
        http://geocities.yahoo.com/ps/info1
      Your message has been successfully submitted and would be delivered to recipients shortly.