Hello ,
I am in need of cnt id to be able to create tickets for a respective group. So far this is what i have managed and looks like it isnt working. Please help.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://www.ca.com/UnicenterServicePlus/ServiceDesk"> <soapenv:Header/> <soapenv:Body> <ser:doSelect> <sid>285455323</sid> <objectType>cnt</objectType> <whereClause>group='Engineering Support'</whereClause> <maxRows>1</maxRows> <attributeNames> <!--1 or more repetitions:--> <string>last_name</string> </attributeNames> </ser:doSelect> </soapenv:Body></soapenv:Envelope>
Here you go :
Changed the whereClause, group name is in "last_name" attribute.
Changed attributeNames to get the persistent_id, you will need it to create a ticket
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://www.ca.com/UnicenterServicePlus/ServiceDesk"><soapenv:Header/><soapenv:Body><ser:doSelect><sid>285455323</sid><objectType>cnt</objectType><whereClause>last_name='Engineering Support'</whereClause><maxRows>1</maxRows><attributeNames><string>persistent_id</string></attributeNames></ser:doSelect></soapenv:Body></soapenv:Envelope>
But here is the problem, the values returned are in XML string format . In order for me to extract the cnt id or the persistent_id . i will need to convert the xml string to xml node and then to a document to extract that one ID. Is there a better way to do this ?
thanks for the quick reply pier-olivier.tremblay
No, this is a soap API wich rely entirely on XML.
Depending on the language used, it should be easy to extract.