How to create and update location in SDM using createObject & updateObject methods in SOAPUI?

Document ID : KB000044478
Last Modified Date : 14/02/2018
Show Technical Document Details

Introduction:

This document explains how user can access CA Service Desk Manager WebService and how to test WebService Methods createObject & UpdateObject Using SOAPUI.

Environment:  

CA Service desk Manager 14.1 
SOAPUI : 5.1.3

Instructions:

 

Step 1 : Install SOAP UI from http://www.soapui.org/downloads/soapui/open-source.html

 

Step 2 : Launch SOAP UI 
             File-> New SOAP Project 
             # Project Name: Provide an appropriate project Name    EX: CA SDM 
             # Initial  WSDL: Provide correct CA SDM Webservice Path 
             Example : http://<Server name >:8080/axis/services/USD_R11_WebService?WSDL
             You should be able to find all the available web Service Methods.

 

all services.png

 

Step 3: Select “Login”  Method, this is used to create Session ID 
Expand “login”->Request 1->Right Click and select “Show Request Editor”
Provide Appropriate Service Desk Credentials which has access to webservice Methods, Prefer Servicedesk  account. 
        <username>ServiceDesk</username>
         <password>SDM-Password</password>
Submit the request to Generate the Session Code.  Ex: 1134033917

login method.png

 

Step 4: Select “CreateObject” method to create a location in SDM. 
Expand “CreateObject”->Request 1->Right Click and select “Show Request Editor”
Provide these correct Details: 

<soapenv:Header/>

   <soapenv:Body>

      <ser:createObject>

         <sid>1134033917</sid>  (SESSION ID CREATED BY LOGIN METHOD)

         <objectType>loc</objectType>

         <attrVals>

           <string>name</string>

            <string>INDIA</string>  (NAME OF THE LOICATION)

             </attrVals>

         <attributes>

            <string>persistent_id</string>

           <string>name</string>

         </attributes>

 

Click on Submit Request Button submit.PNG   to Execute method.

 

 create object.png

 

Step 5: Updating the same location by using “updateobject method.

 

 loc:8FC098D56BEE0046868EA728BF936BBC is persid of location INDIA which we have created above.Now we are updating it to AMERICA

 

  <ser:updateObject>

         <sid>1134033917</sid>

         <objectHandle>loc:8FC098D56BEE0046868EA728BF936BBC</objectHandle>

         <attrVals>

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

            <string>name</string>

            <string>AMERICA</string>

         </attrVals>

         <attributes>

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

           <string>persistent_id</string>

              <string>name</string>

         </attributes>

      </ser:updateObject>

 

update object.png

 

 

These Above Steps can be used to check if CA SDM webservice methods are available. And this can be accessed on any system which can open CA SDM URL.