If you have a class as ServiceResult<T> with a generic parameter and you get exception as "class my.examples.dto.ResultDto nor any of its classes known to this context" while marshalling although you have ResultDto in Jaxb context, try @XmlSeeAlso as below
@XmlRootElement
@XmlSeeAlso(ResultDto.class, ResultDtoAnother.class)
public class ServiceResult<T> {
public T result;
}
This resolves the issue temporarily until we have a cleaner solution from JaxB
@XmlRootElement
@XmlSeeAlso(ResultDto.class, ResultDtoAnother.class)
public class ServiceResult<T>
public T result;
}
This resolves the issue temporarily until we have a cleaner solution from JaxB