[omniORB] Exception (probably due to my misuse of CORBA:: types)
Renny Koshy
renny@wwtelco.net
Thu, 18 Nov 1999 09:42:37 -0500
I'm having a strange problem. I get a system exception for the following
fragment (IDL, CODE and LOG all included). However, I can't for the life of
me see what I'm doing wrong. I'm using CORBA::string_dup() for strings. Is
there anything else I should be looking at?
******** The IDL:
typedef sequence <long> PinLengths;
struct ANIResponse {
boolean IsCustomer;
long LanguageID;
long MinDigitsForDNQuery;
long MaxDNRetries;
long ServiceType;
string CardNumber;
float Balance;
boolean PlayBalanceMsg;
string Plan;
long CustomerNumber;
PinLengths CardDigits; // This is a list of ints
long MaxPINRetries;
};
************** The C++ code
Galeos::ANIResponse ar;
ar.CardNumber = CORBA::string_dup("");
ar.CustomerNumber = 0;
ar.Plan = CORBA::string_dup("");
ar.Balance = 0.0;
ar.CardDigits.length(1);
ar.CardDigits[0] = 10;
ar.LanguageID = acin->Language;
ar.ServiceType = acin->ServiceType;
// Temporary measure
ar.PlayBalanceMsg = PLAYBALANCE;
ar.MaxPINRetries = MAXPINRETRIES;
CL_LOG.LogMsg("Sending response back to client");
// Send a message back to the client with the ANI response
// rs->ModRef is defined as a Module_ptr and initialized using
CORBA::_duplicate
rs->ModRef->OnANIResponse(rs->Call, Galeos::GAL_MI_OK, ar);
CL_LOG.LogMsg("Releasing module reference");
***************** Log file of output:
In the log I see..
11/18/99 09:20:55: CheckANIAck() 0x00000002: Sending response back to client
11/18/99 09:20:55: CheckANIAck() 0x00000002: Caught a system exception.
11/18/99 09:20:55: CheckANIAck() 0x00000002: Leaving module
BUT the client gets the response.