Deserialization of VB.NET object via J2EE web service using xstream…


Thanks for the suggestions. I ended up using xstream, but it was very difficult to figure out how to do it right. One of the problems was/is that I’m using xml from a web service. Most of the stuff out there requires simple xml without any preamble.

(from MDB fed by stateless ws bean)
TextMessage tm = (TextMessage)msg;
String sMsg = tm.getText();
XStream xstream = new XStream(); // used xpp3, as it is supposed to ignore xml declarations…
xstream.alias(“Command”, com.entities.Command.class); // HAD to give explicit location
com.entities.Command c = (com.entities.Command)xstream.fromXML(sMsg);

System.out.println(“Name: ” +;
System.out.println(“Command: ” + c.command);


public class Command {
public String name, command;

This took a LOT of time to get right, and virtually nothing I saw in many, many searches helped. I hope someone else with this problem finds this post faster than it took me to get this working…

So what was I doing? Passing an object from a VB.NET client to a J2EE web service (and subsequent beans).

Thanks again!

Bogus Exception

Leave a Reply

Your email address will not be published. Required fields are marked *