我在调用Web服务时遇到此问题。请问如何解决它。
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.lang.NullPointerException
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}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 weblogic.xml.jaxp.WebLogicSAXParser.setProperty(WebLogicSAXParser.java:117)
at weblogic.xml.jaxp.RegistrySAXParser.setProperty(RegistrySAXParser.java:117)
at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:246)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:675)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:128)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:180)
at org.apache.axis.client.Call.invokeEngine(Call.java:2564)
at org.apache.axis.client.Call.invoke(Call.java:2553)
at org.apache.axis.client.Call.invoke(Call.java:2248)
at org.apache.axis.client.Call.invoke(Call.java:2171)
at org.apache.axis.client.Call.invoke(Call.java:1691)
先谢谢..
答案 0 :(得分:2)
Hashtable#put
,则 NullPointerException
会抛出null
。这是技术方面,我不认为,我们可以通过堆栈跟踪解决更多的错误。
看起来您正在调用Web服务,并且在某些时候,轴希望在内部存储键/值对,但值为null
。
您可以使用soapUi来验证网络服务本身是否为您的请求生成了正确的输出。一旦你确定该服务正在运行,调试你的代码,设置断点并尝试找出失败的部分。