Forum Discussion

Delta_Force_270's avatar
Delta_Force_270
Icon for Nimbostratus rankNimbostratus
Oct 01, 2007

querying iControl without parsing the response

Hello,

 

 

I would like to query iControl but not parse the response which comes back.

 

 

I am looking at the example scripts which come with the SDK and would like the raw data which comes back in the response to be shown instead of parsing it.

 

 

So basically I just want to go $soap->get_node_server_list() and see what is fed back.

 

 

The reason for this is I am new to programming and believe this would be easier for me to understand and a better starting point.

 

 

Many Thanks.

 

 

 

Paul

 

 

2 Replies

  • If that's really what you want to do, then you can bypass all deserializing on the response by using the outputxml(true) option on the SOAP::Lite object

    ...
    $soap = SOAP::Lite
      -> uri('urn:iControl/ITCMSystem/SystemInfo')
      -> outputxml(true)
      -> proxy("https://$sHost:$sPort/iControl/iControlPortal.cgi");
    $soapResponse = $soap->get_system_information();
    print "Response: $soapResponse\n";

    Keep in mind that once you go this route you cannot make use of the SOAP::Lite helpers to determine if faults occurred or help with deserializing structures and multideminsional arrays. You'll have to do the parsing yourself.

    If you are just interested in seeing the raw SOAP messages during debugging to help determine what the output looks like, you can turn on SOAP::Lite debugging by using the following "use" line at the top of your script

    use SOAP::Lite + trace => qw(method debug);

    This will dump to standard output a bunch of stuff including the request and response soap messages.

    Good luck!

    -Joe