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

时间:2016-02-05 21:28:20

标签: web-services websphere websphere-8

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

  [2/5/16 10:54:13:531 MST]     FFDC Exception:java.lang.StackOverflowError SourceId:com.ibm.ejs.container.RemoteExceptionMappingStrategy.setUncheckedException ProbeId:200 Reporter:com.ibm.ejs.container.RemoteExceptionMappingStrategy@625fad44
java.lang.StackOverflowError
    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服务调用在应用服务器内部发生时失败了吗?

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

1 个答案:

答案 0 :(得分:1)

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

谢谢, 戒日