简体   繁体   English

使用Java在CORBA方法中发送和接收自己的类

[英]Sending and receiving own classes in CORBA methods with Java

I'm trying to find a way to get CORBA methods which can accept own classes or even a simple ArrayList as return data type or argument. 我正在尝试找到一种方法来获取CORBA方法,该方法可以接受自己的类甚至是简单的ArrayList作为返回数据类型或参数。

I've tried with Any and Object but got not results being an abstract class and an interface each. 我尝试使用Any和Object,但没有得到分别是抽象类和接口的结果。

I even tried to cast aa received Corba Object to ArrayList as I'm actually giving an ArrayList as parameter but got not results. 我什至试图将收到的Corba对象转换为ArrayList,因为我实际上是将ArrayList作为参数,但没有得到结果。

As a silly answer you might try Serializing your Java Objects into a byte array and passing them that way to your functions then Deserializing them on the other side. 愚蠢的答案是,您可以尝试将Java对象序列化为字节数组,然后将它们以这种方式传递给函数,然后在另一端反序列化它们。 Other than that my experience with Corba has always been encoding/decoding functions to IDL types. 除此之外,我在Corba方面的经验一直是对IDL类型进行编码/解码功能。 IDL is suppose to be one of the benefits of Corba: embrace it! IDL被认为是Corba的优势之一:拥抱它!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM