Upgrading CWS For Content Server 16
This guide explains the steps needed to upgrade your Content Server 9.7.1 or 10 (hereafter referred to as 'Content Server') web services for Content Server 16.
Outline
- Convert Module to New Source Format
- Convert SDOs to New Format
- Create Service Method Objects
- Generate Source API
- Scripts
Convert Module to New Source Format
The first step is to convert your module to the new .os source format. Please refer to the Content Server IDE Plug-in for Eclipse Quick Start Guide for instructions on how to do this as well as an overview of the new development environment for Content Server 16.
Convert SDOs to New Format
After you have your module in the new source format and have built it in Eclipse you will see numerous compiler errors reported in SDO objects. The problem here is the old way of defining an SDO stored type information as part of the SDO object feature name but at runtime the type information was dropped. The new compiler cannot comprehend this behaviour and issues warnings for each use of an SDO feature since they are not referenced by their actual defined feature name. To fix these errors, SDOs need to be defined a little differently. The good news is there is a script available to automate most (but not all) of the changes needed.
To use the script you must load up your module in Content Server and run Builder. Open up the script in Builder and make the following changes:
- Change the
outputDir
variable to point to an empty temp directory to put the generated files. - Change the
ospace
variable to the name of your ospace. - Chanage the
sdoNamespace
variable to the namespace of your SDOs.
After these changes are made you can run the script and it will generate a stub of your new SDO object definitions. You will need to merge these objects with the exported ones to keep any additional features and scripts that were previously defined.
After these changes are made, this is a good time to look at the rest of the compiler errors and warnings that are still being reported and take action as necessary.
Create Service Method Objects
With the change to the new source format, the way service methods are defined for a service has been changed. The old fSignature feature is still supported, however, an alterative approach is recommended. There is a script available (createServiceMethod.e) to automate the process of converting the existing fSignature feature to the new ServiceMethod object definitions. Once you have the new ServiceMethod objects you can remove the old fSignature feature.
To run the createServiceMethod.e script, first make the following changes:
- Change the
outputDir
variable to point to an empty temp directory to put the generated files. - Change the
packageName
variable to the name of the package you want to put your service method objects in. Typically this is just the name of your OSpace followed by::ServiceMethod
. - Change the
serviceName
variable to the name of the service you want to generate the service method objects for.
After these change are made you can run the script and it will generate the ServiceMethod objects for your service.
Generate Source API
You will also need to generate new C# and Java source code using the generateSourceAPI.e script. Changes were made to the generated source code, so this step is required before you can use your services with Content Server 16.
To run the script, first make the following changes:
- Change the
srcOutputDir
variable to the directory you want to create the generated source files in. - Change the
cSharpDir
variable to the sub-directory of yoursrcOutputDir
that you want to create the C# source files in. - Change the javaDir variable to the sub-directory of your
srcOutputDir
that you want to create the Java source files in. - Optionally, change the
services
variable to the list of services you want to generate the source code for. If you leave this variableUndefined
then the script will generate the source for all services in your system.
After these changes are made you can run the script and it will generate the Java and C# code for your service.