SOAP Web Services Demo using SOAPUI
search cancel

SOAP Web Services Demo using SOAPUI

book

Article ID: 40101

calendar_today

Updated On:

Products

CA Service Management - Service Desk Manager CA Service Desk Manager

Issue/Introduction

The following article describes a basic test of the SOAP web services via the open source tool SoapUI.

Environment

Service Desk Manager 17.3 or higher

All Supported Operating Systems

Resolution

SoapUI (Open Source) application can be used to test Service Desk Manager SOAP Web Services

Sample setup steps:

1.  Navigate to SoapUI Download Page and click download "SoapUI Open Source"

2.  Install SoapUI on any Windows server/workstation that can access the Service Desk Manager SOAP Web service URL.

3.  Create your first project with sample queries for all Service Desk Manager method calls.

a.  Initial screen

b.  Create a new project

c.  Provide project name and Web service end-point information (Initial WSDL information)

SOAP access is facilitated via CXF.  The URLs of interest are as follows 

The URL for the CXF-based service is: 

http://SDM-SERVER:8080/cxf/services

 

The URL for the WSDL document is: 

http://SDM-SERVER:8080/cxf/services/USD_WebService?wsdl

 

Result will be:

d.  We will next do a login to establish an SID from which to run SOAP Web Service Call.  To do this, drill down to "login" then double click on "Request 1" under the "login" method to create/edit the Request 1 SOAP call.

e.  Populate the username and password fields, then click on the green "play" button on the upper left.  On the right hand side, click on the "XML" tab to expose the "loginReturn" value.  This is the SID value which we will be using to demo a SOAP call.

f.  To demonstrate the SOAP calls that can be made, we will query for all call request objects using the doSelect method.  To do this, on the left hand side, locate the doSelect method, and double click on "Request 1" under "doSelect".

The resultant XML for the SOAP Envelope will read as the following:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://www.ca.com/UnicenterServicePlus/ServiceDesk">
   <soapenv:Header/>
   <soapenv:Body>
      <ser:doSelect>
         <sid>?</sid>
         <objectType>?</objectType>
         <whereClause>?</whereClause>
         <maxRows>?</maxRows>
         <attributes>
            <!--1 or more repetitions:-->
            <string>?</string>
         </attributes>
      </ser:doSelect>
   </soapenv:Body>
</soapenv:Envelope>

g.  Modify the above XML to read as:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://www.ca.com/UnicenterServicePlus/ServiceDesk">
   <soapenv:Header/>
   <soapenv:Body>
      <ser:doSelect>
         <sid>1664836388</sid>
         <objectType>cr</objectType>
         <whereClause></whereClause>
         <maxRows>-1</maxRows>
         <attributes>
            <!--1 or more repetitions:-->
            <string>ref_num</string>
            <string>summary</string>
         </attributes>
      </ser:doSelect>
   </soapenv:Body>
</soapenv:Envelope>

sid:  this is the "loginReturn" integer value that was obtained when we first logged in via the above Login method.  This number will vary depending on the outcome of the login method

objectType:  The object being queried.  We are interested in call requests, so this should be "cr"

whereClause:  This would be a string to provide specific search parameters.  We omit this value for purposes of demonstrating the SOAP call.

maxRows:  Maximum number of rows returned.  We provide a value of -1 to return ALL rows.

attributes:  List of attributes tied to the given object to return results on.  In this case, we want the ref_num and summary values returned.

h.  Run the method by clicking on the green "play" icon.  On the right hand side, click on the "XML" tab to display the results.

Additional Information

Note: Prior to Service Desk 17.3 RU18 Axis was the only means available to access web services.  However, Axis has been EOL for some time now.

The initial Service Desk SOAP WSDL under the original Axis 1.4 format (assuming default port configuration) is:

http://SDM-SERVER:8080/axis/services/USD_R11_WebService?wsdl

 

The Axis web services implementation remains available in later 17.3 builds and up to at least 17.4 RU4 in order to allow migration to the CXF format.  It is expected that Axis will become deprecated and will no longer be included in later releases of Service Desk. 

The screenshots in this KB article reference Axis web services.  This does not impact the instructions that are given in this article as they will also work as described for CXF.

A counterpart document on demonstrating REST Web Services calls is available here:

KB Article 45577:  REST Web Services Demo using SOAPUI

KB Article 137240:  SOAP Logging/Tracing

KB Article 49239:  Equivalent demo of the above using Powershell instead of SOAPUI