[omniORB] omniORBpy out parameter passing issue

Bernard Niset bn@7ways.com
Tue, 11 Apr 2000 18:46:33 +0200


I dont know how to use an out parameter with omniORBpy. The client says
that it requires only 1 argument but when I specify only one the server says
that it requires to (plus, it doesnt make sense as long as python supports
object reference arguments).
Please help me finding out what I am doing wrong.
Thanks in advance.
-----------------------------------------
Bernard Niset
TLDnames development team
http://www.tldnames.com
-----------------------------------------



Trace back on the client is:

getRedirOnDomainName...
Traceback (innermost last):
  File "./redir_clt.py", line 32, in ?
    object_ref.getRedirOnDomainName("testdomain.com", info)
  File "./redir_idl.py", line 123, in getRedirOnDomainName
    return _omnipy.invoke(self, "getRedirOnDomainName",
_0_Redirection.Redir._d_getRedirOnDomainName, args)
TypeError: Operation requires 1 argument; 2 given

IDL:
            interface Redir
            {
                        void addRedirForDomain(in redir_www_info info);
                        void getRedirOnDomainName(in string name, out
redir_www_info info) raises(NotFound);
                        void updateRedir(in redir_www_info info)
raises(NotFound);
            };
Code of the client:
try:
            print "getRedirOnDomainName..."
            info = None
            object_ref.getRedirOnDomainName("testdomain.com", info)
            print info.DomainName, "-->", info.RedirUrl
except Redirection.NotFound, e:
            print '*'*10, "Expected exception occured"
            print e.key, "NotFound"

Code of the server:
class Redir_i (POA_Redirection.Redir):
            def getRedirOnDomainName(self, name, info):
                        info = info_structure # defined somewhere else