java - Working with SQLServer 2008, stored procedures and WebService -


so i'm trying invoke stored procedure web service add either "preparecall" or "preparestatement" webservice stops working. when test it shows big big error

service invocation threw exception message : null; refer server log more details

and

exceptions details : java.lang.reflect.invocationtargetexception

followed this

javax.servlet.servletexception: java.lang.reflect.invocationtargetexception @ org.glassfish.webservices.monitoring.webservicetesterservlet.dopost(webservicetesterservlet.java:330) @ org.glassfish.webservices.monitoring.webservicetesterservlet.invoke(webservicetesterservlet.java:106) @ org.glassfish.webservices.jaxwsservlet.dopost(jaxwsservlet.java:133) @ javax.servlet.http.httpservlet.service(httpservlet.java:688) @ javax.servlet.http.httpservlet.service(httpservlet.java:770) @ org.apache.catalina.core.standardwrapper.service(standardwrapper.java:1550) @ org.apache.catalina.core.standardwrappervalve.invoke(standardwrappervalve.java:281) @ org.apache.catalina.core.standardcontextvalve.invoke(standardcontextvalve.java:175) @ org.apache.catalina.core.standardpipeline.doinvoke(standardpipeline.java:655) @ org.apache.catalina.core.standardpipeline.invoke(standardpipeline.java:595) @ org.apache.catalina.core.standardhostvalve.invoke(standardhostvalve.java:161) @ org.apache.catalina.connector.coyoteadapter.doservice(coyoteadapter.java:331) @ `enter code here`org.apache.catalina.connector.coyoteadapter.service(coyoteadapter.java:231) @ com.sun.enterprise.v3.services.impl.containermapper$adaptercallable.call(containermapper.java:317) @ com.sun.enterprise.v3.services.impl.containermapper.service(containermapper.java:195) @ com.sun.grizzly.http.processortask.invokeadapter(processortask.java:860) @ com.sun.grizzly.http.processortask.doprocess(processortask.java:757) @ com.sun.grizzly.http.processortask.process(processortask.java:1056) @ com.sun.grizzly.http.defaultprotocolfilter.execute(defaultprotocolfilter.java:229) @ com.sun.grizzly.defaultprotocolchain.executeprotocolfilter(defaultprotocolchain.java:137) @ com.sun.grizzly.defaultprotocolchain.execute(defaultprotocolchain.java:104) @ com.sun.grizzly.defaultprotocolchain.execute(defaultprotocolchain.java:90) @ com.sun.grizzly.http.httpprotocolchain.execute(httpprotocolchain.java:79) @ com.sun.grizzly.protocolchaincontexttask.docall(protocolchaincontexttask.java:54) @ com.sun.grizzly.selectionkeycontexttask.call(selectionkeycontexttask.java:59) @ com.sun.grizzly.contexttask.run(contexttask.java:71) @ com.sun.grizzly.util.abstractthreadpool$worker.dowork(abstractthreadpool.java:532) @ com.sun.grizzly.util.abstractthreadpool$worker.run(abstractthreadpool.java:513) @ java.lang.thread.run(thread.java:722) caused by: java.lang.reflect.invocationtargetexception @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:57) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:601) @ org.glassfish.webservices.monitoring.webservicetesterservlet.dopost(webservicetesterservlet.java:301) ... 28 more caused by: com.sun.xml.ws.fault.serversoapfaultexception: client received soap fault server: java.lang.nullpointerexception please see server log find more detail regarding exact cuase of failure. @ com.sun.xml.ws.fault.soap11fault.getprotocolexception(soap11fault.java:193) @ com.sun.xml.ws.fault.soapfaultbuilder.createexception(soapfaultbuilder.java:126) @ com.sun.xml.ws.client.sei.stubhandler.readresponse(stubhandler.java:247) @ com.sun.xml.ws.db.databindingimpl.deserializeresponse(databindingimpl.java:177) @ com.sun.xml.ws.db.databindingimpl.deserializeresponse(databindingimpl.java:256) @ com.sun.xml.ws.client.sei.syncmethodhandler.invoke(syncmethodhandler.java:128) @ com.sun.xml.ws.client.sei.syncmethodhandler.invoke(syncmethodhandler.java:102) @ com.sun.xml.ws.client.sei.seistub.invoke(seistub.java:151) @ $proxy262.hello(unknown source) ... 33 more 

currently ws this:

sql sql = new sql("{call dbo.iniciarsesion(?,?)}", ""); 

the sql class looks this:

public sql(string ruta) {     try {         this.con = new conexiondb(ruta);         this.ps = this.con.getconbd().preparecall("");     } catch (sqlexception ex) {         logger.getlogger(sql.class.getname()).log(level.severe, null, ex);     } } 

i noticed if add exception way worse having try , catch. if test code outside webservice works fine.

please, help.

i believe stored procedures not return function does. make sure have function in database, returns desired result. try use result creating proper response web service.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -