IiopWWRequest Function

Action

Sends a request to an object through the Wonderwall. When accessing an object through the Wonderwall, always use this function instead of IiopRequest.

Due to a Wonderwall misbehavior, you should not use the standard procedure in case of a location forward during a request.

注: You should use this function only for earlier versions than Wonderwall 3.0. For Wonderwall 3.0 and later versions, use the common CORBA functions.

Include file

Wonderwall.bdh

Syntax

IiopWWRequest(in hIiop : number,
in sRequest : string,
in nFlag : number optional,
in nId : number optional): number;

Return value

  • REQUEST_SUCCESS if successful

  • REQUEST_FORWARD if a location forward occurred. It is up to the user to resend the request.

  • REQUEST_FAILED otherwise

Parameter Description
hIiop Handle to a CORBA object.
sRequest Name of the requested operation.
nFlag

Specifies the request message variant sent to the server (optional). Possible values are:

  • IIOP_RESPONSE_EXPECTED. Waits for a response (default).

  • IIOP_ONEWAY. Expects no response from the server.

  • IIOP_NON_BLOCKING. Indicates that the caller will not wait for an immediate reply. This flag can be used to generate asynchronous IIOP traffic.

This parameter may be combined with the following flag:

  • IIOP_IGNORE_EXCEPTION. Avoids the generation of error messages.

nId

Identification number for this request (optional).

注: This parameter affects the function behavior only if nFlag is set to IIOP_NON_BLOCKING.

If an identification number is associated with a request, the IiopWaitForReply function can be used to wait for a reply from the request. Exceptional cases:

  • 0. Return parameters will not be stored, consequently no reply data can be retrieved (default).

  • -1 is not allowed.

Example

dcltrans
transaction TWWRequest
const
WW_HOST := "192.168.20.35"; // Wonderwall host
WW_PORT := 16000; // Wonderwall port
HOST := "192.168.20.21"; // server
PORT := 1052; // port
var
hDaemon, hBank, hAccount: number;
begin
IiopSetMaxGiopVersion("1.0");
IiopSetByteOrder(IIOP_BIG_ENDIAN);IiopWWBind(WW_HOST, WW_PORT);
// OrbixWeb bootstrapping with Wonderwall
hDaemon := IiopWWDaemonBind(HOST, PORT);
// get proxy object reference to bank object
hBank := IiopWWServerBind(hDaemon, HOST, "bank", "","bank");
// Create an account
IiopSetString(hBank, “John Dow”);
IiopWWRequest(hBank, "newAccount");
// extract new account object
IiopWWGetObject(hBank, hAccount);
end TWWRequest;