This is an example of an interceptor, which intercepts the standard Web Central document check-in operation, extracts invocation parameters, and conditionally performs another operation based on those parameters. An example of such operation would be document upload to a SharePoint server, if table name and field name parameters match specified values.
Typical use case: when a lease document (the ls.doc field) is uploaded to the Web Central document management repository, it also should be uploaded to SharePoint server, tagged with the Lease ID (ls.ls_id), inventory table name, field name, and primary keys.
The current implementation of CopyServiceClient uses the CXF framework to implement web service client. It only works with Sun JDK, in Windows OS, and uses Windows OS user account under which WebCentral is running, to authenticate with SharePoint server..
The implementation is located in the /schema/ab-products/solutions/common/src/main/com/archibus/webservice/document/interceptor/
folder. The interceptor is implemented in the DocumentInterceptor
Java class.
The DocumentInterceptor
bean and supporting beans are defined in /schema/ab-products/solutions/common/src/test/com/archibus/webservice/document/interceptor/documentService.xml
.
To run this example:
1. Modify /WEB-INF/config/context/core/core-services.xml
:
DocumentInterceptor
to intercept DocumentService
: see /schema/ab-products/solutions/common/src/test/com/archibus/webservice/document/interceptor/documentService.xml
for an example;siteRoot
property value of copyServiceClient
bean in core-services.xml
.2. Create “Table Name”, “Field Name”, “Lease ID”, “Keys” columns in the “Shared Documents” folder of the SharePoint server.
3. Use the /schema/ab-core/test/documents-management/ab-test-document-view20.axvw
view: check in a document. You should see the following in your SharePoint server: