Hello !

The trick is to use java.io.InputStream and java.io.OutputStream to 
interface with Ruby socket, this work fine !

I have post the complete code to you Janna.

Hope this helps.

Serge


Robert Klemme wrote:
> 2008/9/25 Jim Morris <ml / e4net.com>:
>>>
>> The Java server is reading a Marshalled Java object, Usually that will only
>> be used for two Java processes talking to each other.
> 
> Exactly.  Java and Ruby do *not* share a common serialization format.
> You must take measures to explicitly handle serialization formats - or
> more generally define the protocol you want to use on that connection.
> 
>> If you are sending very simple Java Objects you could format it in Ruby and
>> transmit it, but it would be messy. You will have to read the Sun documents
>> on Java serialized object formats, look at the ObjectInputStream Javadoc for
>> references to the required formats.
>>
>> Try using JRuby instead and serialize the Java object in Java.
> 
> There are more alternatives:
> 
> - use one of the many XML serialization packages around,
> - generally use a SOAP API,
> - use YAML on both ends.
> 
> Kind regards
> 
> robert

-- 
Posted via http://www.ruby-forum.com/.