AnsweredAssumed Answered

Parsing the returned XML from SOAP WS getListValues

Question asked by davethecoder on May 6, 2013
Latest reply on May 7, 2013 by davethecoder
Hi all, getting close to my goal of querying SD for the data I need and then I can move on to actually automating some processes! I have some experience with XPath and XML parsing however I can’t figure out and/or find anything out there on how to parse the relatively hideous return from the WS call, I am returning all attributes as an exercise. Any help would be appreciated … obviously I am befuddled by the formatting. (snippet below)

<soapenv:Body>
<getListValuesResponse xmlns="http://www.ca.com/UnicenterServicePlus/ServiceDesk">
<getListValuesReturn xmlns="">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;UDSObjectList&gt;
&lt;UDSObject&gt;
&lt;Handle&gt;cnt:02752626B3FA044A9F50020D97CF2F40&lt;/Handle&gt;
&lt;Attributes&gt;
&lt;Attribute DataType="2002"&gt;
&lt;AttrName&gt;pgroups&lt;/AttrName&gt;
&lt;AttrValue&gt;(0)&lt;/AttrValue&gt;
&lt;/Attribute&gt;
&lt;Attribute DataType="2002"&gt;
&lt;AttrName&gt;userid&lt;/AttrName&gt;
&lt;AttrValue&gt;donaldB&lt;/AttrValue&gt;
&lt;/Attribute&gt; …

Thank you!!

David

Outcomes