[omniORB] Marshaling error

James M. Moe moe_jim@burr-brown.com
Mon, 14 Jun 1999 17:35:33 -0700 (MST)


--_=_=_=IMA.BOUNDARY.FDC6N8138764=_=_=_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Hello,
    We are using omniORB v2.6.1 on a linux RedHat v5.2 system, egcs
v2.91.57 compiler.
    One of the strucutures we pass back and forthe only achieves the
forth direction. When we attempt to retrieve the structure, we get a
marshalling error. Another ORB that we use (xerox PARC's ILU ORB,
CORBA/IIOP subset, C mapping) has no problem receiving the structure.
    The data in the structure ends up in a database. It is correct
there.
    The structure is somewhat large and contains mostly strings.
Attached is a file with code snippets from the IDL and C++ files.
    The omniORB server code builds the structure all right. It is at
the omniORB client end that things fall apart with
"IDL:omg.org/CORBA/MARSHAL".


Jim Moe


--_=_=_=IMA.BOUNDARY.FDC6N8138764=_=_=_
Content-Type: application/octet-stream; name="code.txt"
Content-Transfer-Encoding: base64

DQotLS0tLS1bIFRoZSBjbGllbnQgY29kZSB0aGF0IGZhaWxzIHdpdGggbWFyaGFsbGluZyBlcnJv
ciBdLS0tLS0tLS0tLS0tLS0tLS0tLQ0KDQp2b2lkIGRvX21pcl9pbmZvICgpDQp7DQogICAgQ09S
QkE6OkJvb2xlYW4gCXJzbHQ7DQogICAgc3RkZjo6bWlyVCAgICAgICAgKiBtaXI7DQoNCiAgICAN
CiAgICBjZXJyIDw8ICI/RE9fTUlSX0lORk8uLi4iOw0KDQogICAgcnNsdCA9IGxvdF9vYmotPnNw
bE1JUmluZm8oa2V5cy5zcGxpdGtleSwgbWlyKTsNCiAgICBkZWxldGUgbWlyOw0KDQogICAgY2Vy
ciA8PCAiOyByc2x0ID0gIiA8PCAocnNsdCA/ICJTdWNjZXNzIiA6ICJGYWlsdXJlIikgPDwgZW5k
bDsNCn0NCg0KDQoNCg0KDQoNCg0KPT09PT09PT1bIElETCBdPT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PQ0KDQotLS1b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