by William van den Heuvel, 2004
(last update: 2005-08-13)
Request/Response message. |
The request message send by the client to the server is in the form of an XML string. The response message returned by the server is also an XML string. Instead of a response message, the server or the application can return an exception message. |
If the client is a JAVA program it may use the supplied EJB to generate the request message and to send it to the server. The same EJB also receives and parses the response message. If the server returns an exception message then the EJB raises an exception containing the text of the exception message. See "the Enterprise Java Bean" |
Request message |
|
---|---|
The request message is generated by the client program and send to the server. The server parses the XML string, locates the specified profile and calls the application (plugin). The application retrieves the data from the subnodes of the message node. | |
<?xml version="1.0" ?> | standard XML header |
<WHB> | the begin tag of the root node |
<profile>...</profile> | specifies the name of the profile that defines the application on the server. |
<racf>
<user>...</user> <token>...</token> </racf> |
The racf node is optional. It is only needed if the application profile indicates that is a resource is protected. In this case, the user must be authenticated and authorized. Authentication is done using the "login" request, which obtains a token from the RACF security system. The client program must preserve this token in a persistent container (such as a cookie) and present it on each subsequent request that accesses a protected resource. The racf node has two subnodes; "user" and "token". The "user" node identifies the user, the "token" is the proof of authentication. The WHB server interacts with RACF to verify if the authenticated user is authorized to access the resource. |
<message>...</message> |
the data to be presented to the application.
this node consists of subnodes as expected by the application. See the documentation of the application. |
</WHB> | the end tag of the root node |
Response message |
|
The response message is generated by the server and returned to the client program. The application (plugin) generates the subnodes of the message node. | |
<?xml version="1.0" ?> | standard XML header |
<WHB> | the begin tag of the root node |
<profile>...</profile> | the same profile name as specified on the request message. |
<message>...</message> |
the data returned by the application.
this node consists of subnodes as generated by the application. See the documentation of the application. |
</WHB> | the end tag of the root node |
Exception message |
|
An exception message will be generated by the server when the XML in the request message is not well-formed or when the profile node is missing or when it specifies an undefined profile. The application can also generate an exception. | |
<?xml version="1.0" ?> | standard XML header |
<WHB> | the begin tag of the root node |
<exception>...</exception> | message text explaining the reason of the exception. |
</WHB> | the end tag of the root node |