Java - Error WS00041 web service JAVA

 
Vista:
sin imagen de perfil
Val: 14
Ha aumentado su posición en 8 puestos en Java (en relación al último mes)
Gráfica de Java

Error WS00041 web service JAVA

Publicado por juan (8 intervenciones) el 23/04/2018 19:18:48
Estoy intentando ejecutar este código pero me sale ese error:

Service invocation threw an exception with message : null; Refer to the server log for more details. Antes me funcionaba bien realizaba mi consula y ahora ya no.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
@WebMethod(operationName = "consultaXCodigo")
    public String consultaXCodigo(@WebParam(name = "codigo_materia") String codigo_materia) {
        String xml_n = "";
 
        Conexion c = new Conexion();
        Connection cn = c.Conectar();
        List<Materia> materia = null;
 
        if (codigo_materia == null || codigo_materia.equals("")) {
            xml_n = "Eror no ha diguitado ningun codigo para la busqueda";
        } else {
            try {
                Statement st = cn.createStatement();
                ResultSet rs = st.executeQuery("select * from asignaturas where codigo_materia='" + codigo_materia + "'");
                materia = new ArrayList<>();
                while (rs.next()) {
                    materia.add(new Materia(rs.getInt(1), rs.getString(2), rs.getString(3), rs.getString(4)));
                }
            } catch (Exception e) {
                e.getMessage();
            }
        }
 
        XStream xstream = new XStream();
        String xml = xstream.toXML(materia);
 
        String adicionar = "<?xml version = \"1.0\" encoding=\"utf-8\" ?> \n";
        xml_n = adicionar + xml;
 
        return xml_n;
    }
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder