<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt;color:#000000;"><div><br>I'm new to CORBA and extrememly rusty to C++ (especially to MS Visual Studio 2008).<br><br>I created 1 UML class in Visual Paradigm (VP) (UML Tool) with one method, then generated IDL from it (I do not know IDL).<br><br>Here is the method: <br> public void sendThem(byte[] bytesToSend)<br><br>[notice the byte[])<br><br><br>My objective is to send from a Corba C++ client (stub) a byte arrry to a Corba Java service (skeleton).<br><br>NOTE: I have already been able to basically have this same method work, but sending a 'Long' vs a byte[]. So,<br>I have some successful experience getting it to work.<br><br>VP created 2 IDL files: TestService.idl and seq1_octet.idl. (NOT sure why 2, meaning the
seq1_octet)<br><br>After using omniidl to create c++ source and idlj to create java source, and used the template of \omniORB-4.1.3\src\examples\echo\eg3_clt.cc (from examples) (It uses the COSS naming service to obtain the object reference) to kick start my client [as I did already correctly with the 'Long' parameter test noted above].<br><br><br>From the example in : eg3_clt.cc as a basis, the problem I am having is trying to create (hardcode for now) an octet that will work with org::omg::boxedRMI::seq1_octet. Per this c++ SK method<br><br> void springfw::_objref_TestService::sendThem(org::omg::boxedRMI::seq1_octet* aBytesToSend)\<br><br><br><br>When calling it, I want to do this:<br><br>e->sendThem(buf);<br><br>How do I create my buf variable?<br><br>These do NOT work: (or combinations there-for of)<br><br>org::omg::boxedRMI::seq1_octet_var buf;<br><br>buf = 055;<br><br>CORBA::Octet *p = new
CORBA::Octet[7];<br><br> buf = *p;<br><br>Octet oct = 040;<br>CORBA::OctetSeq_var src = oct;<br><br><br>Any help would be much apprecaiged!!!!!!!!!!!!!!<br><br><br>The error on the compile, is this:<br>1>c:\backup\cpp\pubber\pubber\pubber.cpp(64) : error C2679: binary '=' : no operator found which takes a right-hand operand of type 'int' (or there is no acceptable conversion)<br>1> c:\downloadextract\omniorb-4.1.3\include\omniorb4\valuetemplatedecls.h(106): could be '_CORBA_Value_Var<T,T_Helper> &_CORBA_Value_Var<T,T_Helper>::operator =(T *)'<br>.....<br><br><br>that points to this line: <br> buf = 01;<br><br>where buf is defined like this:<br> org::omg::boxedRMI::seq1_octet_var buf; (above where I assign it to 01)<br><br><br>NOTE: Weird thing is if I set buf = 00, it all works (no compile problem), but on the java corba svc side, it spits out null when I
output what it receives..<br><br>Any ideas?????<br>(That is how do I instantiate a buf of type: org::omg::boxedRMI::seq1_octet_var or whatever...???????)<br><br><br>Thanks,<br>Jim<br><br><br><br><br><br><br><br><br></div></div><br>
</body></html>