CA Service Management

 View Only
  • 1.  Create a CI and relationship with a Change Order using Webservices

    Posted Aug 02, 2016 10:06 AM

    Hello,

    I need create a process that create a CI in CMDB and make a relationship with a Change Order.

     

    The first step its working, I am using CreateAsset method and the CI is created normally, but I dont know as to do a relationship with the Change Order.

     

    Its possible to make it using CreateAsset Method or createLrelRelationships?

     

    Someone have a sample or idea that make it ?

     

    CREATEASSET CODE

     

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://www.ca.com/UnicenterServicePlus/ServiceDesk">

       <soapenv:Header/>

       <soapenv:Body>

          <ser:createAsset>

             <sid>930096233</sid>

             <attrVals>

              <string>name</string>

      <string>TestcreateAsset4</string>

      <string>class</string>

      <string>grc:300063</string>

      <string>serial_number</string>

      <string>001336</string>

      <string>description</string>

      <string>'teste de web'</string>

      <string>zSO1</string>

      <string>LINUX</string>       

              </attrVals>

      <attributes></attributes>

          </ser:createAsset>

       </soapenv:Body>

    </soapenv:Envelope>

     

    Thanks



  • 2.  Re: Create a CI and relationship with a Change Order using Webservices
    Best Answer

    Posted Aug 02, 2016 10:13 AM

    hi,

     

    you can create LRELs using createObject function.

    Or check this thread : WebService: createLrelRelationships - Syntax - Product Integration - ServiceDeskUsers  for createLrelRelationships example.

     

    Regards,

    cdtj



  • 3.  Re: Create a CI and relationship with a Change Order using Webservices

    Posted Aug 02, 2016 10:51 AM

    Thanks

     

     

    I created the code, but I trust that have any problem with parameter. Its necessary to input <string></string> in the code, but my doubt its where I need to make this.

     

    Can you help me?

     

    REgards

     

     

     

    <?xml version="1.0" encoding="utf-8"?>

     

     

    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

     

     

        <soap:Body>

     

     

            <createLrelRelationships xmlns="http://www.ca.com/UnicenterServicePlus/ServiceDesk">

     

     

                <sid>421964921</sid>

     

     

                <contextObject>chg:402717</contextObject>

     

     

                <lrelName>asset</lrelName>

     

     

                <addObjectHandles>nr:EEF41D54C2C99A4DBBF6D81E10BFF8B3</addObjectHandles>

      <string>nr:EEF41D54C2C99A4DBBF6D81E10BFF8B3</string>

     

     

            </createLrelRelationships>

     

     

        </soap:Body>

     

     

    </soap:Envelope>



  • 4.  Re: Create a CI and relationship with a Change Order using Webservices

    Posted Aug 02, 2016 12:27 PM

    Its working

     

    with this code:

     

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://www.ca.com/UnicenterServicePlus/ServiceDesk">

       <soapenv:Header/>

       <soapenv:Body>

          <ser:createLrelRelationships>

             <sid>1690482264</sid>

             <contextObject>chg:400051</contextObject>

          

             <lrelName>asset</lrelName>

             <addObjectHandles>

                <!--1 or more repetitions:-->

                <string>nr:579FEDE91B68B44994300B0526492D42</string>

             </addObjectHandles>

          </ser:createLrelRelationships>

       </soapenv:Body>

    </soapenv:Envelope>

     

     

    Thanks