CA Service Management

  • 1.  CMDBf web services

    Posted Nov 15, 2013 01:46 PM

    Hi all,

    I'm wondering if anyone is actually using the CMDBf web services, and if so, if they have any samples or real working code they would be willing to share on how the web service calls are made.  I'm currently working on integrating Microsoft's SCSM(Service Manager, their CMDB like tool) so I can populate the CA CMDB with CIs.  I've already successfully written a two way integration between SCOM (Operations Manager) Microsoft's monitoring solution and we are successfully opening tickets against CIs, but all the CIs are manually created in the CA CMDB at this time.  I would like to auto up a push mode style integration, where when SCSM discovers a new CI( like for example a new hard drive is added to an existing server) and push the creation of that CI.  I have it working fine via the USD_R11 web services but that doesn't allow me to create relationships, not to mention I would like to see if it's possible to display additional data values on the CMDBf viewer. My review of the documentation indicates the CMDBf registration web service SHOULD be able to what I want, but I cannot manage to build functional code that will actually register a CI.  I cannot get the code samples included in the CMDB Tech reference guide and the sdk samples directory to run to completion, not sure if they are missing something or I'm just doing something wrong but any assistance would be greatly appreciated. 

     

    Thanks,

    Shane Delight



  • 2.  RE: CMDBf web services

    Posted Nov 18, 2013 12:10 AM

    Hi Shane,

    Did you refer the sample code available in the NX_ROOT\sdk\websvc\CMDBF folder? Below are 2 sample code files:

    - RegistrationServiceTestCase.java shows you how to create two CIs and a Relationship.

    - QueryServiceTestCase.java shows you how to query your CMDB for all CIs.

    For more information, please refer SDM R12.7 CA_SDM_CMDB_Tech_Ref_ENU.PDF guide, chapter 5.

    Thanks,
    Naveen



  • 3.  RE: CMDBf web services

    Posted Nov 18, 2013 12:17 PM

    Hi Naveen,

    Like I said in my post above, I've tried working with the code samples but have been unable to successfully run them to a successful web service call, I either get a timeout on the web service call or invalid parameters error.  I've had to translate the code to powershell since that is the core language used under Microsoft's products so I'm not sure if I messed up on the translation or have some other error in my code.  I've also tried manually constructing a web service call in SoapUI and also have not been successful. I've been fairly successful before using the various R_11 web services but am missing something on the CMDBf calls.  If you can provide a packet capture of a successful web service call so I can see the underlying structure of the call itself, that would be very helpful to determine where I might be going wrong. 

    Thanks,

    Shane



  • 4.  RE: CMDBf web services

    Posted Feb 27, 2014 09:57 AM

    Hi Shane.

    Here is an example of fetching a CI for a given MDR name and its federated asset id. Hopt that helps a bit.

    Regards

    ..............Michael

    POST /axis/services/QueryPort HTTP/1.0
    Content-Type: text/xml; charset=utf-8
    Accept: application/soap+xml, application/dime, multipart/related, text/*
    User-Agent: Axis/1.4
    Host: 127.0.0.1:8081
    Cache-Control: no-cache
    Pragma: no-cache
    SOAPAction: "http://cmdbf.org/schema/1-0-0/query/GraphQuery"
    Content-Length: 932
    
    <?xml version="1.0" encoding="UTF-8"?>
       <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          <soapenv:Header>
             <sec:securityHeader sec:actor="http://schemas.xmlsoap.org/soap/actor/next" sec:mustUnderstand="0" xmlns:sec="http://schemas.xmlsoap.org/soap/envelope/">
                <sec:username>Your Userid</sec:username>
                <sec:password>Your Password</sec:password>
             </sec:securityHeader>
          </soapenv:Header>
          <soapenv:Body>
             <query xmlns="http://cmdbf.org/schema/1-0-0/datamodel">
                <itemTemplate id="TestIt">
                   <instanceIdConstraint>
                      <instanceId xsi:type="ns1:MdrScopedIdType" xmlns:ns1="http://cmdbf.org/schema/1-0-0/datamodel">
                         <ns1:mdrId xsi:type="xsd:string">Your MDR Name</ns1:mdrId>
                         <ns1:localId xsi:type="xsd:string">Your federated ID</ns1:localId>
                      </instanceId>
                   </instanceIdConstraint>
                </itemTemplate>
             </query>
          </soapenv:Body>
       </soapenv:Envelope>