Sample Web Services client for sc62server PWS URL

The Service Manager server includes two sample Web Services client applications for the http://servername:port_number/sc62server/PWS/service_name.wsdl. One was created for Apache™ Axis and the other for Microsoft™ Visual Studio .NET. If you have one of these two Web Services development tools installed, you can review and update the source code of the sample applications as well as generate updated proxy code to test the Service Manager Web Services functionality. The Apache Axis samples are written in Java while the Microsoft .NET samples are written in C#. The sample client applications are included with the server installation in the following folders:

  • <Service Manager server installation folder>\webservices\sample\sc62webservices

    • AxisSample
    • DotNetSample

Each sample includes the source code for the client applications as well as support files for the Web Services development environment. The Apache Axis sample also includes a library of Axis jar files as well as batch files that you can use to run each class from the Windows command prompt after you have compiled the sample Java. You can use the sample applications as examples 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, type: dotNetSample -example ClassName where ClassName is the name of the sample application class.

The Apache Axis sample client applications assume 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.

The Microsoft .Net sample client applications assume 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 or from Visual Studio .NET's Web reference URL.

Caution To use attachments with .Net samples, you must install Microsoft Web Services Enhancements (WSE) 2.0 SP2. Be sure to select the "Visual Studio Developer" option during installation. If you add WSE2 after building the examples, you must delete the old reference files ("reference.cs" and "reference.map"), update the web references, and then rebuild the sample applications.

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.

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.
  • Provides the InitServiceforAttachments method to initialize the service to handle MIME attachments.
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.
  • Provides the InitServiceforAttachments method to initialize the service to handle MIME attachments.
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.