Server APIs - SmartPlant Foundation - IM Update 44 - Customization & Programming - Hexagon

SmartPlant Foundation Customization

Language
English
Product
SmartPlant Foundation
Search by Category
Customization & Programming
SmartPlant Foundation / SDx Version
10

The purpose of a Server API is to read the incoming XML, perform a method, and then package up the XML to send back to the calling program.

Each server API must implement the following three methods. Each is described in more detail below.

  • Deserialization (OnDeSerialize) – Reads the incoming xml from the client and extracts the required information, for example, OBID of the object.

  • Method body (OnHandlerBody) – Calls made to server MethodDefs.

  • Serialization (OnSerialize) – Packages the xml for return to the client.

As a rule the names of the Server APIs should be unique; the only exception to this is for overriding a Server API in another module. XML should only be used in the Deserialization and Serialization functions in the Server API. The reason for this is that it is quite possible that the XML format will change over time, which means you only have to change the de-serializer and serializer.

You must implement any transaction management that could be required for this Server API. This includes beginning the transaction and then committing or rolling back the transaction at the end.

SHARED Tip For the latest retired server APIs see the current SmartPlant Foundation Release Bulletin.