Each type of web services client that the Content Engine Web Service (CEWS) supports requires a different approach for handling data types, content, authentication, and localization. The details for each type of client are explained below. For specific hardware and software requirements, see the IBM® FileNet® P8 Hardware and Software Requirements document for this release, available on the IBM web site Product Documentation for FileNet P8 Platform.
Data types
When you set a web reference to the Content Engine Web Service (CEWS) from a Microsoft® .NET client, an accompanying Boolean data type attribute that allows you to specify null values is automatically created for each element attribute of data type Boolean
, DateTime
, Double
or Int32
. This attribute's name is composed of the text "Specified" appended to the name of the attribute to which it is associated and should be set in your client application as follows:
Boolean
, DateTime
, Double
or Int32
to a non-null value, you should also set the value of its associated "Specified" attribute to true
. For example:elemPropFilter.maxRecursion = 1; elemPropFilter.maxRecursionSpecified = true;
Boolean
, DateTime
, Double
or Int32
to null, you should also set the value of its associated "Specified" attribute to false
.Content
You must use either DIME attachments or SOAP inline base64 encoding to handle content.
The use of the DIME standard to upload and retrieve content is deprecated and support for DIME attachments will be dropped in a future P8 release. Because DIME support is deprecated in the 3.5 and 4.0 WSDL, the DIMEAttachmentReference
and DIMEContent
elements are also deprecated. Therefore, any .NET client applications using DIME should be ported to work with the 4.0 endpoints and use either MTOM or SOAP inline base64 encoding for content upload and retrieval.
Authentication - UsernameToken
CEWS accepts the WS-Security UsernameToken
security token, which allows clients to provide their username and password security credentials to authenticate with the application server via your directory service. For more information, see Soap Headers. The following C# code example demonstrates how to set this token using Microsoft Visual Studio® .NET 2003 with Web Services Enhancements (WSE) 2.0 installed:
using Microsoft.Web.Services2.Security.Tokens;
// Create the WSE-enabled service and get its SoapContext value (security and routing info associated with a SOAP request) FNCEWS35ServiceWse wseService = new FNCEWS35ServiceWse(); Microsoft.Web.Services2.SoapContext soapContext; soapContext = wseService.RequestSoapContext; wseService.Url = "http://localhost:9080/wsi/FNCEWS35SOAP/wsdl"; // Assign CEWS URL
// Create token to hold username and password and add it to the soap context UsernameToken token = new UsernameToken(User, Password, PasswordOption.SendPlainText); soapContext.Security.Tokens.Add(token);
Authentication - KerberosToken2
For Kerberos single sign-on (SSO), a .NET client can authenticate using the KerberosToken2
security token instead of the UsernameToken
security token if the Content Engine is configured for Active Directory authentication (LDAP is not supported). This form of SSO is equivalent to integrated logon as supported by the Content Engine and is implemented within the built-in extensible authentication of the Active Directory authentication provider.
The KerberosToken2
security token is constructed with a principal name that is derived from the bind URL by extracting the host name portion and prefixing "FNCEWS/" as shown in the following code example:
SecurityToken token = new KerberosToken2 ("FNCEWS/seattle.westcoast.local");
The host name can be a simple NetBIOS or DNS name, but it cannot contain a localhost or an IP address.
Alternatively, you can construct the KerberosToken2
security token with the Windows account name of the service under which the target Content Engine object store is operating; typically, “<domain name>\FNCE_<machine name>“ or “FNCE_<machine name>”. However, because the account name cannot usually be derived from the bind URL, this approach is not recommended.
The following C# code example demonstrates how to prepare a binding using a KerberosToken2
security token:
FNCEWS35ServiceWse bind = new FNCEWS35ServiceWse(); bind.Url = "http://seattle.westcoast.local:9080/wsi/FNCEWS35SOAP/wsdl"; SoapContext objCtx = bind.RequestSoapContext; SecurityToken tok = new KerberosToken2 ("FNCEWS/seattle.westcoast.local"); objCtx.Security.Tokens.Add(tok); //Make request using bind ...
Localization
Use the Localization
element's Locale
element to specify the name of the locale and its Timezone
element to specify the local time zone offset from UTC.
Sample code (3.5 WSDL)
For sample code written in C# and Visual Basic on the Microsoft .NET platform (Microsoft Visual Studio .NET 2003 with WSE 2.0 SP2) with a web reference to the 3,5 WSDL, see the following zip files. Note that this sample code does not support uploading content data that is over 100 MB:
These zip files are available on the IBM web site Product Documentation for FileNet P8 Platform.
Data types
Because Java™ primitive data types do not allow for null values, they must be mapped to their class wrappers (java.lang.Integer
, for example). Mapping files (batch and XML) have been provided for this purpose, available on the IBM support page (see below).
Content
You must use SOAP inline base64 encoding to specify content; DIME attachments are not supported.
Authentication and Localization
You are required to set up security and localization SOAP headers manually when using IBM® WebSphere® clients. See the WSAHandler.Java utility program (provided in the sample code below) for more information.
Sample code (3.5 WSDL)
For sample code written in Java on an IBM Rational Application Developer® for WebSphere client with a web reference to the 3,5 WSDL see the following zip file: IBM FileNet Content Engine Web Service - IBM RAD v.6 Code Samples (v 4.0). Included in this sample code is the WSAHandler.Java utility, which demonstrates how to set up the authentication and localization SOAP headers. Note that this sample code does not support uploading content data that is over 100 MB.
For instructions describing how to create your own WebSphere Java client for CEWS and a batch and mapping file required for mapping Java data types and creating client stubs, see the following zip file: IBM FileNet Content Engine Web Service - IBM RAD v.6 Mapping Files (v 4.0).
These zip files are available on the IBM web site Product Documentation for FileNet P8 Platform.