0

从客户端调用 Web 服务时出现 NullPointerException。

堆栈跟踪:

Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: java.lang.NullPointerException
at com.sun.xml.internal.ws.fault.SOAP11Fault.getProtocolException(Unknown Source)
at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(Unknown Source)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown Source)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown Source)
at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(Unknown Source)
at $Proxy30.service(Unknown Source)
4

2 回答 2

0

我敢打赌,您缺少一个支持 SOAP 调用的罐子。我将此添加到我的 pom.xml 以摆脱它:

  <dependency>
     <groupId>com.sun.xml.ws</groupId>
     <artifactId>jaxws-rt</artifactId>
     <version>2.2.8</version>
  </dependency>

请注意,我的肥皂电话仍然失败,但可能是其他原因:

java.lang.AbstractMethodError: javax.xml.parsers.DocumentBuilderFactory.setFeature(Ljava/lang/String;Z)V
    at org.apache.xalan.transformer.TransformerIdentityImpl.createResultContentHandler(TransformerIdentityImpl.java:223)
于 2013-09-24T11:55:25.467 回答
0

I suggest you to use tool like wireshark to read the request and response, It may be helpful to find out what is going wrong. It shows sever side exception etc..

于 2013-07-23T06:42:25.620 回答