Websphere Application服务器不从jaxws jar调用类

时间:2013-06-19 05:16:41

标签: web-services web-applications jax-ws axis2 websphere-7

我正在使用jaxws-ri从webservices创建存根。我已经在tomcat上部署了应用程序并且工作正常。现在我想转移到websphere 7.0。当我部署相同的war时,会看到登录页面,但是当调用webservice时,应用程序会抛出错误。

 LoginAction : execute : catch : WebServiceExceptionjavax.xml.ws.soap.SOAPFaultException: com.ibm.wsspi.wssecurity.SoapSecurityException: WSEC5509E: A security token whose type is [http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken] is required.
at org.apache.axis2.jaxws.marshaller.impl.alt.MethodMarshallerUtils.createSystemException(MethodMarshallerUtils.java:1249)
at org.apache.axis2.jaxws.marshaller.impl.alt.MethodMarshallerUtils.demarshalFaultResponse(MethodMarshallerUtils.java:975)
at org.apache.axis2.jaxws.marshaller.impl.alt.DocLitWrappedMethodMarshaller.demarshalFaultResponse(DocLitWrappedMethodMarshaller.java:550)
at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.getFaultResponse(JAXWSProxyHandler.java:421)
at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.createResponse(JAXWSProxyHandler.java:384)
at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invokeSEIMethod(JAXWSProxyHandler.java:308)
at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invoke(JAXWSProxyHandler.java:158)
at $Proxy43.getLogin(Unknown Source)

我尝试调试代码,并在soap头中找到一个调用处理程序,该处理程序扩展名为Service的类。这个类存在于jaxws jar中。当我在websphere中部署时,类的服务是从axis2 jar而不是os jaxws jar调用的。 我尝试删除axis2 jar并粘贴在websphere的插件和lib文件夹中的jaxws jar,但这没有用。 请任何人帮助我如何解决此问题。 提前谢谢。

1 个答案:

答案 0 :(得分:0)

对我而言,您应该在客户端中设置WS-Security用户名令牌。如果使用SoapUi进行测试,请添加新的传出WS-Security配置(使用用户名WSS条目)。