I am using following code in writing one of my JAVA web service. But while rendering, JAXBException is coming, as it cannot properly parse the multilevel hashmap that I have used in following code.
import java.util.HashMap;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "XYZEntry")
public class XYZEntry extends BaseEntry{
private static final long serialVersionUID = 1L;
private HashMap< String, HashMap< String, String>> component;
@XmlElement(name = "orderWiseComponent")
public HashMap< String, HashMap< String, String>> getComponent() {
return component;
}
public void setComponent(HashMap< String, HashMap< String, String>> component) {
this.component = component;
}