Sample client for SOAP Web Services SM7 URL

The HPE Service Manager server includes a sample Web Services client application for the http://servername:port_number/SM/7/service_name.wsdl. The sample application was created for Apache™ Axis2 (version 2.1.4). If you have Axis 2.1.4 and Apache™ Ant installed, you can review and update the source code of the sample application as well as generate updated proxy code to test the Service Manager Web Services functionality. The Apache Axis2 sample is written in Java. The sample client application is included with the server installation in the following folder:

<Service Manager server installation folder>

\webservices\sample\sm7webservice

The sample includes the source code for the client applications as well as support files for the Web Services development environment. The Apache Axis2 jar files are included and they are located under the "lib" folder. A set of the batch files that you can use to run each class are located under the "bin" folder and you can run each class from the Windows command prompt after you have compiled the sample Java. You can use the sample application as an example of how to create your own custom Web Services client applications.

Note All the sample applications use a command line interface. To see the usage information for the command line interface, change to "bin" folder, type xxxSample where xxxSample is the batch file name of the sample application.

The Apache Axis2 sample client application assumes that you have a Service Manager server instance running from the local host. If this is not the case, you can change the server host name and port number using the sample's command line interface.

Each of the sample folders includes a readme file that contains valuable information about using the sample application found in each of the sample folder.

The sample client application contains examples of how to send the MTOM attachments to the Service Manager server. 

Configuration Management sample

The sample client applications contain the following classes for Configuration Management. Refer to the sample application source code for comments on the usage of each class.

Field Description
ConfigurationManagementServiceUtility
  • Provides the CreateService method to initialize an object for the service.
  • Provides the InitServiceAuthentication method to send the host name, communications port, operator name, and operator password with each SOAP request.
CreateContactSample Creates a contact record with the supplied parameters.
DeleteContactSample

Deletes the contact record listed in the supplied parameters.

RetrieveContactSample Retrieves a single contact record matching the supplied parameters.
UpdateContactSample Updates a contact record with the supplied parameters.

Incident Management sample

The sample client applications contain the following classes for Incident Management. Refer to the sample application source code for comments on the usage of each class.

Class Description
CloseIncidentSample Closes an incident record with the supplied parameters.
CreateIncidentSample Creates an incident record with the supplied parameters.
IncidentManagementServiceUtility
  • Provides the CreateService method to initialize an object for the service.
  • Provides the InitServiceAuthentication method to send the host name, communications port, operator name, and operator password with each SOAP request.
ResolveIncidentSample Resolves an incident record matching the supplied parameters.
RetrieveIncidentListSample Retrieves multiple incident records matching the supplied parameters.
RetrieveIncidentSample Retrieves a single incident record matching the supplied parameters.
UpdateIncidentSample Updates an incident record with the supplied parameters.