[omniORB] Issue while extract Array Element from Client Side

Lakshmeeshk lakshmeeshk at tarangtech.com
Thu Dec 3 18:58:34 GMT 2009


Hi All,

 

I am using Any_out as function parameter. Inserting array type of long at
server side and trying to extract the array in client side.

But, while extracting these elements it's only showing the 1st element and
not the second element.

 

I have sample of source code below for your reference. 

 

Could anyone suggest me what could be the solution.

 

Server Side:

 

void abc_i::read  ( Long AddId, CORBA::Any_OUT_arg Data)

{

 

     Data = new CORBA::Any();

     CORBA::Long tempTag[2]= {40,20};

  

                 *Data<<=tempTag[0];

                 *(Data+1)<<=tempTag[1];

 

}

 

Client Side:

 

        CORBA::Any_var Data;

      

         xyz_var -> read ( AddId, Data );

        

         CORBA::Long tagValue[2];

 

          Data.inout() >>= *tagValue;

 

         cout<< "tagValue[0]" << tagValue[0] << endl;

         cout<< "tagValue[1]" << tagValue[1] << endl;

 

Output:

tagValue[0]40

tagValue[1]1   -----> it has to show 20

 

 

Regards,

Lakshmeesh

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20091203/320efc67/attachment.htm


More information about the omniORB-list mailing list