【问题标题】:Facing java.lang.reflect.InvocationTargetException while calling webservice in WAS 9在 WAS 9 中调用 web 服务时遇到 java.lang.reflect.InvocationTargetException
【发布时间】:2018-06-28 16:45:40
【问题描述】:

调用 web 服务时出现以下错误。只是提到它在 Eclipse 上运行时与 tomcat 一起工作得很好。但是在 websphere application server 9.0 上使用时出错。在 WAS9 上运行时我还有什么需要注意的吗?

这是我的一段代码:

SOAPConnectionFactory soapConnectionFactory = SOAPConnectionFactory.newInstance();
SOAPConnection soapConnection = soapConnectionFactory.createConnection();
SOAPMessage soapResponse = soapConnection.call(soapRequestMessage, Url);

日志:

javax.xml.soap.SOAPException: 
java.lang.reflect.InvocationTargetException
at com.ibm.ws.webservices.engine.soap.SOAPConnectionImpl.callJAXWSDispatch(SOAPConnectionImpl.java:421)
at com.ibm.ws.webservices.engine.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:192)
at com.ibm.ws.webservices.engine.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:163)
at com.service.ClientService.callSoapWebService(ClientService.java:46)

【问题讨论】:

    标签: java web-services soap websphere


    【解决方案1】:

    经过大量搜索和调查,我找到了以下解决方案。

    目前,IBM Business Process Manager Advanced、WebSphere Process Server 和 WebSphere Enterprise Service Bus 不支持 SOAP 1.2 协议。请使用受支持的 SOAP 协议,例如 SOAP 1.1。

    对于 SOAP1.1,请使用: soapenv:信封 xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-04-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-10-17
      相关资源
      最近更新 更多