客户端从服务器收到SOAP Fault:java.lang.NullPointerException

时间:2017-02-10 16:46:46

标签: java web-services soap

  private static java.util.List<com.client.Client> consulterList() {

        com.client.Safidouz_Service service = new com.client.Safidouz_Service();

        com.client.Safidouz port = service.getSafidouzPort();

        return port.consulterList();
    }

    public List<Client> getListClient(){

        List<Client> list =  consulterList();

        return list;
    }

当我尝试获取此列表时,会出现异常:

Client received SOAP Fault from server: java.lang.NullPointerException 
Please see the server log to find more detail regarding exact cause of the failure.

这是我的网络服务:

@WebMethod(operationName = "consulterList")
    public List<Client> consulterList() {

        List<Client> clients = clientService.findAll();

        return clients;
    }

我认为问题在于端口:

@WebEndpoint(name = "SafidouzPort")
    public Safidouz getSafidouzPort() {
        return super.getPort(new QName("http://webservice.commande.com/", "SafidouzPort"), Safidouz.class);
    }

0 个答案:

没有答案