CMWebServiceClientWSE30 Web Services C# Sample
CMWebServiceClientWSE30 SAMPLE OVERVIEW
=======================================
This C# sample demonstrates how to access the IBM Content Manager Enterprise Edition
Specific Web services (named CMWebService) from a .NET 2.0 application by
leveraging the Web services support in the Microsoft Web Services Enhancements
SDK (WSE) 3.0. It calls the run-time interfaces implemented by CMWebService Web
services with minimal system administration and metadata query functionality.
The samples also demonstrate how to use MTOM, the W3C Message Transmission
Optimization Mechanism, to efficiently send binary data to and from
CMWebService Web services.
The CMWebServiceClientWSE30 sample is in the directory IBMCMROOT/samples/webservices/
CMBWebService/CS/WSE3/base.
The following operations are implemented in the sample:
- Create new insurance policy and claim form documents
Demonstrates importing new items into the database.
- Retrieve a policy and a claim form
- Demonstrates retrieving items with and without attachments (content parts)
from the database.
- Demonstrates retrieving multiple items using one request.
- Search policies
Demonstrates sending queries to the Web services and receiving the search results.
- Update policies and claim forms
- Updating attributes in the root object
- Replacing the base part content in the root object with an attachment
- Updating the attribute of a child component
- Adding a child component
- Deleting a child component
- Delete a policy and a claim form document by BatchRequest
Demonstrates the batch request that groups independent requests into a
single request performed in one trip to the server.
- Create and delete links
- Perform folder operations
- Create folder
- Add items to folder
- Retrieve items from a folder
- Delete an item in a folder
- Delete folder
- Perform document routing operations
- Listing of the currently active processes.
- Starting an item on a document routing process.
- Listing work packages for a specified worklist.
- Continuing a specified work package on a process.
- Terminating the process on which a specified work package is
being routed.
LOAD SAMPLE DATA
================
You must load the XYZ sample data from the IBM Content Manager Enterprise Edition First
steps application before running the CMWebServiceClient Sample. The
CMWebServiceClientWSE30 sample uses the XYZ Insurance data model--specifically,
the XYZ_InsPolicy and XYZ_ClaimForm item types to demonstrate Web services
client programming.
The steps for loading the XYZ Insurance Sample Data are
1. Load the XYZ Insurance sample schema from the IBM Content Manager Enterprise Edition
First Steps application. For more information about First Steps, see the
"System Administration Guide".
2. Verify the XYZ Insurance sample schema from an IBM Content Manager Enterprise Edition
Client for Windows or the system administration client.
CONFIGURE WEB SERVICES SERVER
=============================
1. Start the WebSphere Application Server on which the IBM Content Manager Enterprise Edition
Web services application is installed.
2. Modify the cmbxmlservices.properties file. Make sure the following
configuration line appear in the file.
forceItemNamespace=http\://www.ibm.com/xmlns/db2/cm/beans/1.0/schema
Modify the cmbwebservices.properties file. Make sure the following setting
appear in the file.
CMB_ATTACHMENT_TYPE=MTOM
For IBM Content Manager Enterprise Edition Web services, the cmbxmlservices.properties
and cmbwebservices.properties files are located in
${WAS_HOME}/profiles/${profileName}/installedApps/${cellName}/${appName}/cmgmt,
where ${WAS_HOME} is the home directory of IBM WebSphere Application Server and
${profileName}, ${cellName} and ${appName} are chosen when deploying the Web
services application.
3. Launch the configuration wizard for Information Integrator for Content to
configure Web services again.
4. Restart the WebSphere Application Server.
5. Verify that CMWebService is running
Open the following URL in a Web browser window.
http://<Web services host>/CMBSpecificWebService/services/CMWebService
The following message should display in the browser.
CMWebService
IBM Content Manager Enterprise Edition Web Services NG
INSTALL PREREQUISITE SOFTWARE
=============================
The following software packages are required for running the CMWebServiceClient
sample.
1. Install IBM Content Manager Enterprise Edition with the Web Services Toolkit on the
machine on which the CMWebServiceClient sample will be running. See "Planning and
Installing Your Content Management System" for details.
2. Install Microsoft (R) Visual Studio 2005 on the machine you will be running
the sample on.
3. Install the following .NET SDKs:
- .NET Framework SDK v2.0
- .NET Web Service Enhancements (WSE) v3.0:
Refer to the documentation of Web Service Enhancements (WSE) v3.0 to make
sure it is enabled in Visual Studio 2005.
BUILD CMWebServiceClientWSE30 SAMPLE
====================================
1. Load the CMWebServiceClientWSE30.csproj into Visual Studio 2005.
2. Check whether or Ensure that the WSE 3.0 and MTOM is enabled.
Right click on CMWebServiceClientWSE30 project, choose WSE Setting 3.0 from
the pop-up menu. On the open dialog, choose the General tab and make sure
that the checkbox of "Enable this project for Web Services Enhancements" is
selected.
Choose the Messaging tab. Make sure the setting for Client Mode is on in the
MTOM settings.
Click OK to save the settings and close the dialog.
3. Build the CMWebServiceClientWSE30 project.
RUN CMWebServiceClientWSE30 SAMPLE
==================================
Run the CMWebServiceClientWSE30 sample.
Enter the following command at the command prompt:
> CMWebServiceClientWSE30.exe icmnlsdb icmadmin password
http://<Web services host>/CMBSpecificWebService/services/CMWebService
where icmnlsdb is a library server name,
icmadmin is an userid in the library server,
"password" is the password to the userid,
Optionally the URL to Specific Web services can be specified as the fourth
parameter. It overrides the default Web services URL hard-coded in the
sample code.