This discussion is archived
0 Replies Latest reply: Nov 8, 2012 2:18 PM by Appollo RSS

JAXB question

Appollo Newbie
Currently Being Moderated
Lets say I have a class of type T which is referenced multiple times in my object graph.

Class T has an ID property ithat is annotated with @XmlID, and all other types (but one) that refer to type T have their properties annotated as @XmlIDREF.

Let's say there is a class V as follows:

public class V{

private T t;

@XmlIDREF
public T getT(){
return t;
}

public void setT(T t){
this.t = t;
}
}

When I serialize an object graph that contains V (on the Java side) and then deserialize it (on the .NET side), V is reconstructed with getT() method returning a String. I would expect it to return T. In other words, the obejct graph on the client side is not of the same structure as the object graph on the server side.

Any suggestions?



Thank you all!

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points