Hi all!
I'm trying to get a list of Entities/CIs using WS-MAN Webservice but the only way I'm able to do it is using the filter //*, that brings me all CIs.
Anyone here knows how can I create a XPath filter to select only a piece of information from CIs?
Actually I have knowledge about XPath convention but I don't know the "XML structure" of data stored in SOI so I don't know how do build the XPath query i.e.: Entity/ComputerSystem[starts-with(item-name,'app')]
Follow the XML I'm using:
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:mdo="http://schemas.wiseman.dev.java.net/metadata/messagetypes" xmlns:mex="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wse="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:wsen="http://schemas.xmlsoap.org/ws/2004/09/enumeration" xmlns:wsman="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns:wsmeta="http://schemas.dmtf.org/wbem/wsman/1/wsman/version1.0.0.a/default-addressing-model.xsd" xmlns:wxf="http://schemas.xmlsoap.org/ws/2004/09/transfer" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<env:Header>
<wsa:Action env:mustUnderstand="true" xmlns:ns13="http://ns.ca.com/2009/01/usm-data">http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</wsa:Action>
<wsa:ReplyTo xmlns:ns13="http://ns.ca.com/2009/01/usm-data">
<wsa:Address env:mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>
</wsa:ReplyTo>
<wsa:MessageID env:mustUnderstand="true" xmlns:ns13="http://ns.ca.com/2009/01/usm-data">uuid:3e75e154-e0be-4468-b340-f935d21caaa4</wsa:MessageID>
<wsa:To env:mustUnderstand="true" xmlns:ns13="http://ns.ca.com/2009/01/usm-data">http://app1casoism1p.sicredi.net:7090/sam/webservice</wsa:To>
<wsman:ResourceURI xmlns:ns13="http://ns.ca.com/2009/01/usm-data">http://ns.ca.com/2009/07/usm-core/Entity</wsman:ResourceURI>
<wsman:RequestTotalItemsCountEstimate xmlns:ns13="http://ns.ca.com/2009/01/usm-data"/>
</env:Header>
<env:Body>
<wsen:Enumerate xmlns:ns13="http://ns.ca.com/2009/01/usm-data">
<wsman:Filter Dialect="http://www.w3.org/TR/1999/REC-xpath-19991116">//*</wsman:Filter>
<wsman:EnumerationMode>EnumerateObjectAndEPR</wsman:EnumerationMode>
</wsen:Enumerate>
</env:Body>
</env:Envelope>
Thanks for your help!!
Rodrigo Werle