[omniORB] Marshal exception
vaibhav jha
vaibhav1jha@rediffmail.com
Mon Jun 17 08:42:00 2002
I am using omniorbpy,activestate python 2.1.1 on windows nt 4.0
workstation.I am trying to pass a dictionary as a parameter of hte
function called by client through the corba server.
my idl definitions are:
module messenger
{
typedef sequence<long> Seq;
interface Echo {
echoString(in Seq mesg);
};
};
My server program is :
import sys
from omniORB import CORBA, PortableServer
import messenger,messenger__POA
class Echo_i (messenger__POA.Echo):
def echoString(self, mesg):
print "echoString() called with message:", mesg
#return mesg
orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
poa = orb.resolve_initial_references("RootPOA")
ei = Echo_i()
eo = ei._this()
print orb.object_to_string(eo)
poaManager = poa._get_the_POAManager()
poaManager.activate()
orb.run()
My client program is :
import sys
from omniORB import CORBA, PortableServer
import messenger,messenger__POA
class Echo_i (messenger__POA.Echo):
def echoString(self, mesg):
print "echoString() called with message:", mesg
#return mesg
orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
poa = orb.resolve_initial_references("RootPOA")
ei = Echo_i()
eo = ei._this()
print orb.object_to_string(eo)
poaManager = poa._get_the_POAManager()
poaManager.activate()
orb.run()
import sys
from omniORB import CORBA
import Example
orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
ior = sys.argv[1]
#print "ior is ::",type(ior)
obj = orb.string_to_object(ior)
eo = obj._narrow(Example.Echo)
if eo is None:
print "Object reference is not an Example::Echo"
sys.exit(1)
message = {"message":"Hello from Python"}
eo.echoString(message)
but when i run the client program it gives the following error:
D:\CORBA>python.exe client.py
IOR:010000001500000049444c3a4578616d706c652f456368
00002a000000010100000d0000003137322e32302e352e31363500006d040e000000fe3c880d3d00
0000f50000000000
Traceback (most recent call last):
File "client.py", line 8, in ?
obj = orb.string_to_object(ior)
File "d:\omni\lib\python\CORBA.py", line 477, in
string_to_object
sys.modules["CORBA"] = omniORB.CORBA
omniORB.CORBA.MARSHAL: Minor: 0, Completed: COMPLETED_NO.
What are the possible reasons for the Marshal exception?
How do i solve the problem?
Thanking you in advance.
Yours truly
Vaibhav.
_________________________________________________________
Click below to visit monsterindia.com and there is always a
better job for you at http://monsterindia.rediff.com/jobs