OSF DCE Application Development Guide--Core Components

OSF DCE Application Development Guide—Core Components
4. Writes the server code and includes the steps to get the server’s supported code
sets and export them to the name service database, and to remove them from the
name service database upon termination or exit.
5. Writes the client code and includes the steps to set up the character and code set
evaluation mechanism.
6. Writes the character and code set compatibility evaluation routine. You can omit
this step if you use one of the evaluation routines supplied with DCE.
Note that building an RPC application for character and code set interoperability
imposes some restrictions on the application. For example, an application that uses the
RPC character and code set interoperability features cannot use customized binding
handles. See Chapter 18 for more details on internationalized RPC application
restrictions.
The next sections describe the steps just outlined in more detail.
15.3.1 Writing the Interface Definition File
The interface definition file is where the set of remote operations that constitute the
interface are defined. The first step in writing an interface definition file that supports
automatic code set conversion is to create a special typedef that, when used in operation
parameters, represents international character data that can be automatically converted, if
necessary, before marshalling and unmarshalling at client and server sites.
As described in Chapter 17, the data representation for a byte data type is guaranteed not
to change when the data is transmitted by the RPC communications protocol.
Consequently, the special international character data type defined in the .idl is always
declared to be a byte type so that the RPC protocol will not automatically treat it as a
DCE PCS character and convert it between ASCII and EBCDIC.
The second step in writing an interface definition file that supports automatic code set
conversion is to define, for each operation that will transmit the special international
character data type, a maximum of three operation parameters that will tag the
international characters being passed in the operation’s input and output parameters with
code set identifying information established during the client-server evaluation and
binding procedure. These parameters are the following:
The sending tag, which indicates the code set the client is using for international
characters it transmits over the network. The sending tag has the in parameter
attribute and is applied to international character data declared in the operation’s
input parameters. If the operation does not specify any international character data
as input, then it is not necessary to create this parameter.
The desired receiving tag, which indicates the code set in which the client prefers to
receive international character data sent back from the server as output. The desired
receiving tag has the in parameter attribute. If the operation does not specify any
international character output data, then it is not necessary to create this parameter.
The receiving tag, which indicates the code set the server is using for international
characters it transmits over the network. The receiving tag has the out parameter
attribute and is applied to international character data declared in the operation’s
15 8 Tandem Computers Incorporated 124245