Hi all<br><br>I'm new to CORBA and I'm finding it very difficult to understand.<br><br>Can anyone please explain with a short example how to use returned values and out parameters.<br><br>For example, I have a Python class to use in the servant code like this:<br>
<br><br>## servant starts ##<br><br>class servicehelper_i (services.servicehelper):<br><br> def __init__ (self):<br> self.clientid = None<br><br> def create_client (self, dictClient, template):<br><br> try:<br> clientid = createClientProcess (dictClient, template)<br>
self.clientid = clientid<br> success = 1<br> except:<br> success = 0<br><br> return success<br><br>## servant ends ##<br><br><br>This is the IDL, which I think must have something wrong:<br>
<br>module services <br>{<br> struct dictClientDetails<br> {<br> string company;<br> string contactname;<br> string login;<br>
string password;<br> };<br><br> interface servicehelper <br> {<br> boolean create_client (in dictClientDetails client_details, in string template_name, out long clientid);<br> }<br>
<br>}<br><br><br>The client code I've written is:<br><br><br>### client starts ###<br><br>from omniORB import CORBA<br>import services<br><br>orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)<br><br><br>ior = sys.argv[1]<br>
obj = orb.string_to_object(ior)<br><br><br>objService = obj._narrow (services.servicehelper)<br><br>dictClient = services.servicehelper.dictClientDetails ("test_company11", "testname11", "test11", "mypasswordis11")<br>
result = objService.create_client (dictClient, "Standard")<br><br>### client ends ###<br><br><br>How do I access the clientid attribute?<br><br>I've tried putting a third argument in the call to create_client but this doesn't work.<br>
<br>I don't seem to get anything in the "result" variable.<br><br>Looks like my code must have lots of mistakes, which I can't identify.<br><br>Any help is appreciated.<br><br>Thanks<br>