<div>Dear all, I hope some one could help me with following code.</div> <div> </div> <div><STRONG>First, I have following IDL</STRONG> </div> <div> </div> <div>typedef sequence<short> seqShort;</div> <div>interface shortSeqTestServer {<BR> void <FONT color=#0000ff>setSize</FONT>(inout short size);<BR> void <FONT color=#0000ff>acceptType</FONT>(inout seqShort value);<BR> seqShort <FONT color=#0000ff>returnType</FONT>();</div> <div>};</div> <div> </div> <div><STRONG>Second in my server code,</STRONG></div> <div><STRONG></STRONG> </div> <div><STRONG>My servan and servant implementation is as follows.</STRONG></div> <div> </div> <div>class <FONT color=#c00000>shortSeqTestServer_i</FONT> : public POA_shortSeqTestServer<BR>{<BR>private:<BR> seqShort data;<BR>public:<BR> inline shortSeqTestServer_i() {}<BR> virtual ~shortSeqTestServer_i() {<BR> }<BR> <BR><FONT color=#4040ff> virtual void
setSize(CORBA::Short& size);<BR> virtual void acceptType(seqShort& value);<BR> virtual seqShort* returnType();</FONT></div> <div>};</div> <div><BR>void <FONT color=#ff0000>shortSeqTestServer_i</FONT>::<FONT color=#0000ff>setSize</FONT>(CORBA::Short& size)<BR>{<BR>data.length(size);</div> <div> for(int i=0;i<size;i++)<BR> {<BR> data[i] = (CORBA::Short)1; <BR> }<BR>}</div> <div> </div> <div>void <FONT color=#ff0000>shortSeqTestServer_i::</FONT><FONT color=#0000ff>acceptType</FONT>(seqShort& value)<BR>{<BR> // Do something</div> <div>}</div> <div>seqShort* <FONT color=#ff0000>shortSeqTestServer_i::</FONT><FONT color=#0000ff>returnType</FONT>()<BR>{<BR> return &data;<BR>}<BR></div> <div> </div> <div><STRONG>Now, I am doing in my client.</STRONG> </div> <div> </div> <div> </div> <div>shortSeqTestServer_var echoref1 = shortSeqTestServer::_narrow(obj1);<BR> </div>
<div>seqShort_var testPattern;</div> <div> for (int j = 0; j<4; j++)<BR> {<BR> CORBA::Short size = j+4;<BR> testPattern =new seqShort(size);</div> <div> echoref1->setSize(size);<BR> testPattern->length(size); <BR> <BR> CORBA::Short i; <BR> for (i = 0; i<size; i++) <BR> testPattern[i] = 1; <BR> <BR> testPattern = echoref1->returnType();<BR> }</div> <div> </div> <div> </div> <div>I got following error when I execute my client "Caught a CORBA:: UNKNOWN"!</div> <div> </div> <div>I really don't know what is wrong with my code. It seems everything is Ok for me.</div> <div>But I don't know.</div><BR><BR><div><FONT color=#00007f></FONT> </div> <div><FONT color=#00007f>==================================================================================================================================================================</FONT></div>
<div><FONT color=#00007f>Janarbek, Researcher. <BR>Software Robot Research Team, ETRI(Electronics and Telecommunications Research Institute)<BR>161 Kajong-Dong, Yusong-Gu, TAEJON, 305-350, KOREA<BR>Email : </FONT><A href="mailto:janarbek@etri.re.kr"><FONT color=#00007f>janarbek@etri.re.kr</FONT></A><BR><FONT color=#00007f>Phone : 82-42-860-1838<BR>Fax : 82-42-860-6790</FONT></div> <div><FONT color=#00007f>Cell Phone: 82-10-8692-8103</FONT></div> <div><FONT color=#00007f>===================================================================================================================================================================</FONT></div><p> 
<hr size=1>Moody friends. Drama queens. Your life? Nope! - their life, your story.<br> <a href="http://us.rd.yahoo.com/evt=48224/*http://sims.yahoo.com/">Play Sims Stories at Yahoo! Games. </a>