guys,
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: ” + c.name);
System.out.println(“Command: ” + c.command);
Command.class:
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
Deprecated: Function get_magic_quotes_gpc() is deprecated in /homepages/16/d105165054/htdocs/atcp.us/blog/wp-includes/formatting.php on line 4819
Deprecated: Function get_magic_quotes_gpc() is deprecated in /homepages/16/d105165054/htdocs/atcp.us/blog/wp-includes/formatting.php on line 4819
Deprecated: Function get_magic_quotes_gpc() is deprecated in /homepages/16/d105165054/htdocs/atcp.us/blog/wp-includes/formatting.php on line 4819
Deprecated: Function get_magic_quotes_gpc() is deprecated in /homepages/16/d105165054/htdocs/atcp.us/blog/wp-includes/formatting.php on line 4819