Title: | Alpha Developer Support |
Notice: | [email protected], 800-332-4786 |
Moderator: | HYDRA::SYSTEM |
Created: | Mon Jun 06 1994 |
Last Modified: | Fri Jun 06 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 3722 |
Total number of notes: | 11359 |
Company Name : Four Seasons Software Contact Name : Marcella P. Mazzucca Phone : Fax : Email : [email protected] Date/Time in : 3-MAR-1997 17:21:25 Entered by : Carl Amorelli SPE center : MRO Category : NT OS Version : System H/W : Alpha Brief Description of Problem: ----------------------------- OBJECTBROKER V2.6 DII question. Hello, I'am using CORBA DII (ObjectBroker V2.6 for NT, with C) to map our 4GL language onto CORBA. Mapping procedures is going fine now, but I do have a problem with functions (i.e. functions which do return a result, which is defined by a typedef). Example: I can't access 'fSwapBlob' with DII without getting an exception: | typedef sequence<octet> blob; | interface Store | { | void SwapFloat(IN float newValue, OUT float oldValue); | .... | void SwapBlob (IN blob newValue, OUT blob oldValue); | | float fSwapFloat(IN float newValue, OUT float oldValue); | .... | blob fSwapBlob (IN blob newValue, OUT blob oldValue); | } I also can't replace 'blob' by 'sequence<octet>' as result of 'fSwapBlob', because the IDL compiler doesn't accept this. To invoke CORBA object functions with DII, I'am using: | result->argument._type = CORBA_OperationDef__get_result(..); to set the returned datatype for the to be invoked request. This works fine when basic CORBA types are returned, but not when a 'typedef' result is returned. When I send the actual request, objectBroker returns an exception 'CORBA_MARSHAL' (i.e. 'OBB_INV_MRSHERR (e)'). The remote method seems to be invoked correctly. Simplied example: 'aFunction1()' goes fine, but 'aFunction2' fails: | typedef float Money; | interface Bank | { | float aFunction1() | Money aFunction2() | } When I check the kind of the returned datatype for 'aFunction2', the datatype 'kind' is float, so I accept it and handles it just like 'aFunction1'. Questions: 1) Is my assumption correct (CORBA_OperationDef__get_result() can be used to build a request and 'hides' typedefs, just alike CORBA_create_operation_list() does)? Or am I doing some buggy programming? 2) How can I solve this 'typedef' problem for function results, i.e. how can I handle a function which returns a 'blob'? (an example?) Best regards, Arjan van Hienen Four Seasons R&D. ===================== A follow-on question ===================== Note: This question is a follow-on. Thanks for answering my previous questions so quickly (2 days). The solution CORBA_create_operation_list works fine (but it triggers type checking for each request; so it's a bit slower, although also more safe.) 1) According CORBA 2.0, DII, a client doesn't need to specify the datatype of an argument when building an operation argument list. Only if the datatype is specified, it will be checked against the repository. Question: which value is the 'type not specified' value? I'am building the request manually by using CORBA_ORB_create_list and CORBA_NVLIST_add_item. My C-code: |st = CORBA_NVList_add_item(list,&ev, |NULL, |0,/* type */ |value, |value_len, |0); ObjectBroker returns an exception (in &ev) because 'type' is zero. When I fill in the proper TypeCode for 'type', the operation is invoked correctly. When I fill in TC_null, TC_void or TC_any, no exception is returned, but the request is rejected because the typecode doesn't match.... I don't want ObjectBroker to check the argument datatypes (have been checked (once) already). Can you help me? We are not sure whether what you are trying to do is valid in the context of CORBA_NVLIST_add_item (the specification is not clear). Can you work around this by using CORBA_create_operation_list instead?
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
3262.1 | Also in SEND::ObjectBroker_development #2448 | HYDRA::AMORELLI | Mon Mar 03 1997 17:35 | 1 | |
Also in SEND::ObjectBroker_development #2448 | |||||
3262.2 | This is the correct entry | HYDRA::AMORELLI | Tue Mar 04 1997 16:51 | 95 | |
Company Name : Four Seasons Software Contact Name : Marcella P. Mazzucca Phone : Fax : Email : [email protected] Date/Time in : 3-MAR-1997 17:21:25 Entered by : Carl Amorelli SPE center : MRO Category : NT OS Version : System H/W : Alpha Corba for Windows NT ObjectBroker DSI We want to develop a generic server application (i.e. a tool which interprets 4GL programs) by using ObjectBroker and CORBA DSI. I do have some experience with ObjectBroker 2.6 DII (Windows NT, C). Questions: 1) Does Objectbroker v2.6 support DSI (i.e. for Windows NT & UNIX)? I can't find this subject in the ObjectBroker manuals. 2) If so, can you provide me an example (server/client C-code, IDL)? The situation we want to use it for is as follows: - the're one or more CORBA objects defined in the Repository. - After the server program is started, it should: - create one (server) CORBA object, (using a string which contains the object interface name). - go into the server loop and handle all incoming operations. Probably, our server application should implement one DIR, which must be able to handle different interfaces/operations. The problem is that the interface/implementation definition of the to be created CORBA object will be unknown during the development of our server application. =========================== ObjectBroker DII We want to develop a generic client application (i.e. a tool which interprets 4GL programs) by using ObjectBroker and CORBA DII. Platform: Windows NT, ObjectBroker 2.6, C-language. Questions: 1) According CORBA 2.0, DII, a client doesn't need to specify the datatype of an argument when building an operation argument list. Only if the datatype is specified, it will be checked against the repository. Question: which value is the 'type not specified' value? I'am building the request manually by using CORBA_ORB_create_list and CORBA_NVLIST_add_item. My C-code: | st = CORBA_NVList_add_item(list,&ev, | NULL, | 0, /* type */ | value, | value_len, | 0); ObjectBroker returns an exception (in &ev) because 'type' is zero. When I fill in the proper TypeCode for 'type', the operation is invoked correctly. When I fill in TC_null, TC_void or TC_any, no exception is returned, but the request is rejected because the typecode doesn't match.... I don't want ObjectBroker to check the argument datatypes (have been checked (once) already). ================================================================================ Note 2448.1 Questions on ObjectBroker DSI & DII 1 of 1 SEND::SLAVIN 8 lines 4-MAR-1997 09:32 -------------------------------------------------------------------------------- >Questions: > >1) Does Objectbroker v2.6 support DSI (i.e. for Windows NT & UNIX)? > I can't find this subject in the ObjectBroker manuals. ObjectBroker does not currently support DSI on any platforms. This is being considered for the IIOP implementation in ObjectBroker Bryce. | |||||
3262.3 | No DSI. | HYDRA::AMORELLI | Tue Mar 04 1997 16:52 | 9 | |
>Questions: > >1) Does Objectbroker v2.6 support DSI (i.e. for Windows NT & UNIX)? > I can't find this subject in the ObjectBroker manuals. ObjectBroker does not currently support DSI on any platforms. This is being considered for the IIOP implementation in ObjectBroker Bryce. | |||||
3262.4 | HYDRA::AMORELLI | Fri Mar 07 1997 10:55 | 17 | ||
From: REQUE::BOWER "Peter Bower, ObjectBroker" To: HYDRA::AMORELLI CC: Subj: Notefile OBJECTBROKER_DEVELOPMENT Note 2448.2 <<< HOT_FILES:[NOTES$LIBRARY]OBJECTBROKER_DEVELOPMENT.NOTE;1 >>> -< ObjectBroker Development >- ================================================================================ Note 2448.2 Questions on ObjectBroker DSI & DII 2 of 2 REQUE::BOWER "Peter Bower, ObjectBroker" 6 lines 7-MAR-1997 07:08 -------------------------------------------------------------------------------- OBB does require a valid type to be specified. As you stated, this is incorrect according to the CORBA standard. I have entered a problem report - 16-3-249. For now, you will have to specify the type. |