I\'m trying to unmarshal a simple xml document from a public api from Convio. I\'m not getting any compiler errors with the following code, but it won\'t produce a result ei
The namespace is not "inherited" by the fields on the bound class. You need to define the namespace on the fields as well:
@XmlRootElement(name = "getSingleSignOnTokenResponse", namespace = "http://convio.com/crm/v1.0")
public class SingleSignOnResponseBean
{
@XmlElement(name = "token", namespace = "http://convio.com/crm/v1.0")
public String token;
@XmlElement(name = "cons_id", namespace = "http://convio.com/crm/v1.0")
public int consId;
}
If you omit them, then the fields go back to the "default" namespace (i.e. no namespace).
It's mildly irritating, but that's the way it is.