Create RPC Classes and Methods
Background
Windchill ESI RPC classes and methods are described in detail in the Windchill Enterprise Systems Integration Open Application Programming Interface Guide (Windchill Enterprise Systems Integration Open Application 程式撰寫介面指南). The RPC classes use the globally safe namespace, com.ptc.windchill.esi. Customizers should not modify the RPC classes in this namespace or the methods of those classes. Such modifications are subject to being overlaid by future releases of Windchill ESI. Customizers may modify the output of the RPC classes and methods using the procedures defined in the preceding sections of this document.
Procedure
Perform the following steps to define a custom RPC:
1. Make the RPC available to Info*Engine using the Delegate Administrator. Details are located in the Info*Engine Administration and Implementation Guide.
2. Create the Info*Engine task that you specified in the previous step that is to be executed when your RPC is requested.
Example: Defining an RPC to Mark an Object Published
The StandardESIService has a method, recordExport(), which flags an object as published. The method has a void return type. Exposing the method as a Windchill ESI SOAP RPC requires the following:
Define an appropriate delegate type identifier. This is the name of the RPC class. The example type identifier is com.ptc.windchill.esi.Example3RPC.
Create a delegate definition. The example delegate definition is Example3RecordExport.
Windchill ESI services provide an LDIF file which contains the delegate type identifier and delegate definitions. You can import using the Delegate Administrator, the file <Windchill>/codebase/com/ptc/windchill/esi/examples/Example3.ldif.
Write the task that was defined in the delegate. The example delegate defines the task to be com/ptc/windchill/esi/examples/Example3RecordExport.xml. When Windchill ESI is installed, the task is stored in the appropriate directory for Info*Engine to execute it. In a typical installation, the directory is <Windchill>/tasks/com/ptc/windchill/esi/examples and the task is stored in <Windchill>/tasks/com/ptc/windchill/esi/examples/Example3RecordExport.xml.
這是否有幫助?