CA Service Management

Expand all | Collapse all

problem using removeLrelRelationships

Jump to Best Answer
  • 1.  problem using removeLrelRelationships

    Posted 03-24-2015 07:59 AM

    I need to remove the relationship between configuration items (nr) and maintenance windows (window) through the web service provided by the Service Desk. This relationship occurs in the table "ci_window" through fields of type BREL.

    Below illustrate what happens when you try to run the method "removeLrelRelationships" web service based on the table of maintenance windows:

    call:

    <ser:removeLrelRelationships>

             <sid>937280104</sid>

             <contextObject>window:400013</contextObject>

             <lrelName>ci</lrelName>

             <removeObjectHandles>

                <string>ci_window:400012</string>

             </removeObjectHandles>

    </ser:removeLrelRelationships>

     

    return:

          <soapenv:Fault>

             <faultcode>soapenv:Client</faultcode>

             <faultstring>Bad handle passed to update_handle for lrel 'ci' - it's of the wrong type!  Offending handle: ci_window:400012</faultstring>

             <faultactor/>

             <detail>

                <ErrorMessage>Bad handle passed to update_handle for lrel 'ci' - it's of the wrong type!  Offending handle: ci_window:400012</ErrorMessage>

                <ErrorCode>1000</ErrorCode>

             </detail>

          </soapenv:Fault>

     

    And then the same call type based on the configuration items below

    call:

          <ser:removeLrelRelationships>

             <sid>937280104</sid>

             <contextObject>nr:1B947EECD09DB148ABE8675FED5D006D</contextObject>

             <lrelName>window</lrelName>

             <removeObjectHandles>

                <string>window:400013</string>

             </removeObjectHandles>

          </ser:removeLrelRelationships>

    return:

          <soapenv:Fault>

             <faultcode>soapenv:Client</faultcode>

             <faultstring>Internal err with getCODob: NOT FOUND</faultstring>

             <faultactor/>

             <detail>

                <ErrorMessage>Internal err with getCODob: NOT FOUND</ErrorMessage>

                <ErrorCode>102</ErrorCode>

             </detail>

          </soapenv:Fault>

    :

    Can anyone help?



  • 2.  Re: problem using removeLrelRelationships
    Best Answer

    Posted 03-24-2015 12:54 PM

    In your first call, the removeObjectHandles should contain the CI persistent id's (nr:something....).

    Your second try seems to be correct, I just did the same, and it was working.

    Are you sure, you were using correct/existing persistent_id's ?

    In the second case, the contextObject must contain a valid "CI" persistent id.

    The removeObjectHandles must contain "window" persistent_id's, not "ci_window" persistent_id's!

    Hope that helps.

    Kind regards

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



  • 3.  Re: problem using removeLrelRelationships

    Posted 03-24-2015 02:06 PM

    Thanks Michael. Works!!!