[omniORB] Problems With _narrow(...) When Using A omniORBpy Client And A Or bix 3.0.1 Servant
Duncan Grisby
dgrisby@uk.research.att.com
Tue, 01 Aug 2000 11:41:57 +0100
On Monday 31 July, jiwils - Jimmy Wilson wrote:
> 1. The server piece is located on a machine called acxser3. The Orbix
> Daemon is listening on port 1570. The name of the servant is
> "adnerrorservice". Thus, my config file entry looks like this: "ORBInitRef
> adnerrorservice=corbaloc:iiop:acxser3:1570/adnerrorservice".
I suspect the problem is that the object's object key is not really
"adnerrorservice", but something constructed by Orbix. corbaloc URIs
can only really be used with servers which support the interoperable
naming service, and explicitly use a simple text-only key.
What you need to do is to get an IOR for your Orbix server. That will
contain the proper object key.
Some versions of Orbix do not support the locate request that omniORB
performs, so you may find that you also have to specify
-ORBverifyObjectExistsAndType 0 on the command line before it works.
It has nothing to do with your current problem, but I spotted a
potential error in your code:
[...]
> ErrorInfo = _GlobalIDL.ERROR_INFO('275','','','')
[...]
> // Data Structure containing the error information returned
> struct ERROR_INFO
> {
> char szErrorCode[128];
> char szDescription[1024];
> char szSeverity[128];
> char szAction[1024];
> };
The ERROR_INFO structure contains arrays of characters which are
mapped to strings, as you are using. However, the strings must be
exactly the right length for the arrays. If you try to pass the
structure you initialise as an operation argument, you will get a
CORBA.BAD_PARAM exception. Having said that, the IDL you gave only
uses ERROR_INFO as an out argument, so it doesn't matter that it's
initialised wrong.
Cheers,
Duncan.
--
-- Duncan Grisby \ Research Engineer --
-- AT&T Laboratories Cambridge --
-- http://www.uk.research.att.com/~dpg1 --