Criei um cliente pro webservice utilizando o JBosse Eclipse IDE 1.6, deixei marcado os CheckBox “Process WSDL Imports”, “Unwrapped elements/literals” quando abre a janela, coloquei o link do web service e marco mais uma opção: “Create JUnit TestCase”
O que acontece em seguida é que, quando eu mando rodar o cliente, o servidor não levanta nenhuma exceção, mas para o JUnit aparece as mensagens de stacktrace abaixo:
AxisFault
faultCode: {<a href="http://schemas.xmlsoap.org/soap/envelope/">http://schemas.xmlsoap.org/soap/envelope/</a>}Server.userException
faultSubcode:
faultString: java.lang.NullPointerException
faultActor:
faultNode:
faultDetail:
{<a href="http://xml.apache.org/axis/">http://xml.apache.org/axis/</a>}stackTrace:java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:396)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.setProperty(SAXParserImpl.java:395)
at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:261)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:582)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:447)
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:687)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:134)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:157)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:122)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:183)
at org.apache.axis.client.Call.invokeEngine(Call.java:2682)
at org.apache.axis.client.Call.invoke(Call.java:2665)
at org.apache.axis.client.Call.invoke(Call.java:2355)
at org.apache.axis.client.Call.invoke(Call.java:2278)
at org.apache.axis.client.Call.invoke(Call.java:1772)
at br.com.sysdata.client.ws.WSEquifaxFacadeSoapBindingStub.helpService(WSEquifaxFacadeSoapBindingStub.java:149)
at br.com.sysdata.client.ws.WSEquifaxFacadeServiceTestCase.test1WSEquifaxFacadeHelpService(WSEquifaxFacadeServiceTestCase.java:32)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
java.lang.NullPointerException
at org.apache.axis.AxisFault.makeFault(AxisFault.java:137)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:137)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:157)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:122)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:183)
at org.apache.axis.client.Call.invokeEngine(Call.java:2682)
at org.apache.axis.client.Call.invoke(Call.java:2665)
at org.apache.axis.client.Call.invoke(Call.java:2355)
at org.apache.axis.client.Call.invoke(Call.java:2278)
at org.apache.axis.client.Call.invoke(Call.java:1772)
at br.com.sysdata.client.ws.WSEquifaxFacadeSoapBindingStub.helpService(WSEquifaxFacadeSoapBindingStub.java:149)
at br.com.sysdata.client.ws.WSEquifaxFacadeServiceTestCase.test1WSEquifaxFacadeHelpService(WSEquifaxFacadeServiceTestCase.java:32)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:396)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.setProperty(SAXParserImpl.java:395)
at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:261)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:582)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:447)
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:687)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:134)
… 26 more
Já li em alguns fóruns e páginas aki que isso pode ter relação com o arquivo web.xml, mas eu duvido. Tem uns sujeitos na net que perguntaram exatamente o que eu to querendo saber (com um stack diferente, mas a idéia é a mesma)
aki o link deles:
http://mail-archives.apache.org/mod_mbox/ws-axis-user/200208.mbox/<[email removido]>
e aqui
Agradeço desde já qualquer ajuda.