![MACROMEDIA CONTRIBUTE 3-CONTRIBUTE PUBLISHING SERVER Скачать руководство пользователя страница 18](http://html1.mh-extra.com/html/macromedia/contribute-3-contribute-publishing-server/contribute-3-contribute-publishing-server_manual_3312842018.webp)
18
Chapter 2: Extending Contribute Publishing Server
Related topics
•
“Contribute Publishing Server API overview” on page 15
•
“About extending the Simple File Deployment service” on page 20
•
“API data types” on page 22
•
“Web service methods” on page 23
Write a web service that implements the CPS API
The first step in creating a custom service for CPS is to write a web service that implements the
CPS API. You can write the service in any language that supports web services, such as
Macromedia ColdFusion MX.
Note:
CPS is supported by ColdFusion MX 6.1 and later.
CPS comes with some example and adapter files that might help you write your service.
Examples
CPS includes examples written in ColdFusion, Java, Perl, and ASP.NET. The example shows a
simple logging service (a less complex version of the CPS Log service).
Examples for the CPS Simple Installation are located at:
C:\Program Files\Macromedia\Contribute Publishing
Server\jrun4\servers\contribute-
wps\contribute\customservices_code\simplelogger
Examples for the CPS WAR File Installation are located at:
C:\Program Files\Macromedia\Contribute Publishing
Server\customservices_code\simplelogger
For each language, the example includes the web service implementation called
MacromediaContributeNotificationService. This implements all the events in the API with a call
to an EventLogger component. You can reuse this example by replacing the call to the
EventLogger with your own code.
Adapters
ColdFusion components (CFCs) provide an easy way to implement a web service. However,
Macromedia ColdFusion MX 6.1 requires you to use an adapter ColdFusion Markup Language
(CFML) file to permit the correct processing of Contribute events. The example ColdFusion
service already includes this adapter.
Adapter CFML files for the Simple Installation of CPS are located at:
C:\Program Files\Macromedia\Contribute Publishing
Server\jrun4\servers\contribute-
wps\contribute\customservices\cfmx_adapter\ContributeService.cfm
Adapter CFML files for the WAR File Installation of CPS are located at:
C:\Program Files\Macromedia\Contribute Publishing
Server\customservices\cfmx_adapter\ContributeService.cfm