javax.xml.bind.MarshalException

Posted by sandeep on Stack Overflow See other posts from Stack Overflow or by sandeep
Published on 2010-05-09T01:38:27Z Indexed on 2010/05/09 1:48 UTC
Read the original article Hit count: 220

Filed under:
|
|

Hi, I am getting javax.xml.bind.MarshalException error. I am sending List from my webservice to the backingbean and I have this error. Here is my code:

Backing bean

@WebServiceRef(wsdlLocation = "http://localhost:26565/Login_webserviceService/Login_webservice?WSDL")
public String login() {
    System.out.println("Login Phase entered");
    int result = 0;
    List list;
    List finalList = null;
    try {
        Weblogin.LoginWebserviceService service = new Weblogin.LoginWebserviceService();
        Weblogin.LoginWebservice port = service.getLoginWebservicePort();
        result = port.login(voterID, password);
        Weblogin.LoginWebservice port1 = service.getLoginWebservicePort();
        list = port1.candDetails(1);
        finalList = list;
        this.setList(finalList);
    } catch (Exception e) {
        e.printStackTrace();
    }
    if (result == 1)
        return "polling";
    else
        return "login";
}

Webservice

public List candDetails(int pollEvent) {
    List resultList = null;
    List finalList = null;
    try {
        if (pollEvent == 1) {
            resultList = em.createNamedQuery("Cantable.findAll").getResultList();
            finalList = resultList;
        }
    } catch (Exception e) {
        e.printStackTrace();
    }
    return resultList;
}

© Stack Overflow or respective owner

Related posts about java-ee

Related posts about jsf