[omniORB] Problems With _narrow(...) When Using A omniORBpy Client And A Or
bix 3.0.1 Servant
jiwils - Jimmy Wilson
jiwils@acxiom.com
Mon, 31 Jul 2000 12:35:23 -0500
I am having trouble getting a Python client using omniORB to interop with an
Orbix 3.0.1 servant. Has anyone been successful in making this happen?
Here's the information specific to my problem:
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".
2. The following python code is what I am using:
import sys
from omniORB import CORBA
import _GlobalIDL
ErrorInfo = _GlobalIDL.ERROR_INFO('275','','','')
orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
obj = orb.resolve_initial_references("adnerrorservice")
The above appears to work fine, but I don't think anything special is
happening.
3. The line of the code that has the problem is:
ES = obj._narrow(_GlobalIDL.ADNErrorServiceFactory)
It returns this error:
Traceback (innermost last):
File "<stdin>", line 1, in ?
File "D:\Program Files\omni\lib\python\omniORB\CORBA.py", line 609, in
_narrow
return _omnipy.narrow(self, dest._NP_RepositoryId)
omniORB.CORBA.INV_OBJREF: Minor: 10101, Completed: COMPLETED_NO.
It is interesting to note that the Orbix Daemon records a new IIOP
connection from the client machine, but then nothing. Also, for those of
you who know a little about Orbix, an 'lsit' on the server side shows a
servant named 'adnerrorservice' in the implementation repository.
Furthermore, I've been able to get an Orbix C++ client to communicate
correctly with the servant.
Also, the servant uses the BOA implementation. However, I read somewhere
that this shouldn't be a problem for the client.
I have checked the mailing list archives for additional help, and I found
references to a hack for omniORB. However the Orbix version talked about in
the thread was a 2.X version, and I didn't know if that would be relevant
any longer.
4. Also, in case the problem may be located in the IDL, I wanted to include
it as well:
#ifndef _ADNERRORSERVICE_
#define _ADNERRORSERVICE_
// Data Structure containing the error information returned
struct ERROR_INFO
{
char szErrorCode[128];
char szDescription[1024];
char szSeverity[128];
char szAction[1024];
};
typedef sequence<ERROR_INFO> ADNErrorInfo;
// The FOP Server Object
interface ADNErrorService
{
exception eError{ string emsg; string eflag;};
void vGetErrorInfo( in string ErrorCode, out ERROR_INFO ErrorInfo )
raises(eError);
void vCloseDBConnection() raises(eError);
void vOpenDBConnection() raises(eError);
long lGetTotalCount() raises(eError);
long lGetAllErrors( out ADNErrorInfo ErrorInfo ) raises(eError);
};
// The factory object
interface ADNErrorServiceFactory
{
ADNErrorService oNewADNErrorService();
void vADNErrorService(in ADNErrorService obj);
};
#endif
If anyone has any suggestions, I would really appreciate them. Thanks for
your help.
Jimmy
--
James "Jimmy" Wilson
Software Developer, Acxiom Corporation
InfoBase Product Application Development
E-Mail: jiwils@acxiom.com