从部署在 websphere 上的应用程序使用 webservice

Consuming webservice from application deployed on websphere

我一直在尝试使用 java 中的网络服务 (WS-JAX)。 我使用 wsimport 工具生成了 JAVA 个工件。我构建了一个独立测试 class(在 eclipse 上)并且能够成功调用 web 服务。 但是当我在我的应用程序(部署在 websphere 8 上)中使用相同的活动和代码时,我得到以下异常 `

  [2/5/16 10:54:13:531 MST]     FFDC Exception:java.lang.WhosebugError SourceId:com.ibm.ejs.container.RemoteExceptionMappingStrategy.setUncheckedException ProbeId:200 Reporter:com.ibm.ejs.container.RemoteExceptionMappingStrategy@625fad44
java.lang.WhosebugError
    at java.util.HashMap.<init>(HashMap.java:367)
    at com.ibm.wsdl.DefinitionImpl.getAllServices(DefinitionImpl.java:859)
    at com.ibm.wsdl.DefinitionImpl.getAllServices(DefinitionImpl.java:873)
    at org.apache.axis2.wsdl.util.WSDLWrapperReloadImpl.getAllServices(WSDLWrapperReloadImpl.java:903)
    at org.apache.axis2.wsdl.util.WSDLDefinitionWrapper.getAllServices(WSDLDefinitionWrapper.java:478)
    at com.ibm.wspolicy.wsdl.internal.subject.DefinitionSubjectProcessor.<init>(DefinitionSubjectProcessor.java:60)
    at com.ibm.wspolicy.wsdl.internal.WSDLProcessorImpl.buildWSDLPolicyModel(WSDLProcessorImpl.java:79)
    at com.ibm.ws.wspolicy.wsdl.WSDLProcessor.<init>(WSDLProcessor.java:137)
    at com.ibm.ws.wspolicy.policyset.WSDLHelperImpl.processWSPolicyInPackagedWSDL(WSDLHelperImpl.java:80)
    at com.ibm.ws.websvcs.deployment.WASAxis2PolicySetConfigurator.associatePolicySets(WASAxis2PolicySetConfigurator.java:385)
    at com.ibm.ws.websvcs.client.WSClientConfigurationFactory.completeAxis2Configuration(WSClientConfigurationFactory.java:459)
    at org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.<init>(EndpointDescriptionImpl.java:286)
    at org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.<init>(EndpointDescriptionImpl.java:223)
    at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.updateEndpointDescription(ServiceDescriptionImpl.java:534)
    at org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.updateEndpoint(DescriptionFactoryImpl.java:382)
    at org.apache.axis2.jaxws.description.DescriptionFactory.updateEndpoint(DescriptionFactory.java:180)
    at org.apache.axis2.jaxws.spi.ServiceDelegate.getPort(ServiceDelegate.java:597)
    at org.apache.axis2.jaxws.spi.ServiceDelegate.getPort(ServiceDelegate.java:513)
    at javax.xml.ws.Service.getPort(Service.java:99)`

有人能解释一下当 web 服务调用在应用程序服务器内部发起时失败的原因吗?

注意:我已经在应用程序服务器信任库中安装了正确的服务器证书。

所以我找到了解决方案,我的计算机上安装了 2 个不同的 JRE。一个来自 Oracle,另一个是与 websphere 应用程序服务器捆绑在一起的 jre。对于要在 Websphere 上部署的应用程序,我们必须使用与 Websphere 捆绑在一起的 IBM jre 生成 java 工件。

谢谢, 戒日