Show how to generate a client proxy class using a language such as C++ that does not support reflection, for example from the CORBA interface definition given in your answer to Exercise 5.13. Give the details of the implementation of one of the methods in this class, which should call the method doOperation

What will be an ideal response?


Each proxy method is generated from the signature of the method in the IDL interface,e.g.
void vote(in string name, in long number);

An equivalent stub method in the client language e.g. C++ is produced e.g.

void vote(const char *vote, int number)

Each method in the interface is given a number e.g. vote = 1, result = 2.

use char args[length of string + size of int] and marshall two arguments into this array and call doOperation
as follows:

char * result = DoOperation(ref, 1, args);

we still assume that ref is an instance variable of the proxy class. A marshalling method is generated for each argument type used.

Computer Science & Information Technology

You might also like to view...

In the Aloha protocol, what happens if two stations attempt simultaneous transmission on the inbound frequency, and how is the problem handled?

What will be an ideal response?

Computer Science & Information Technology

What does the PHP construct exit return?

a. 0 b. true c. nothing d. 1

Computer Science & Information Technology

Which of the following is NOT a paragraph format option?

A. margin settings B. columns C. line spacing D. bold

Computer Science & Information Technology

Compare and contrast dynamic memory allocation and deallocation operators new, new [], delete and delete [].

What will be an ideal response?

Computer Science & Information Technology