2013-06-19 112 views
0

我使用jaxws-ri從webservices.j文件創建存根。我已經在tomcat上部署了應用程序,並且它工作正常。現在我想要移動到websphere 7.0。當我部署相同的war時,會看到登錄頁面,但是當調用webservice時,應用程序會引發錯誤。Websphere應用程序服務器不從jaxws jar中調用類

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) 

我試着調試代碼,發現肥皂頭中有一個處理程序被調用,它擴展了名爲Service的類。這個類存在於jaxws jar中。當我在websphere中部署Service類時,將從axis2 jar中調用服務,而不是os jaxws jar。 我嘗試通過刪除axis2 jar和粘貼在websphere的插件和lib文件夾jaxws罐,但這並沒有奏效。 請任何人都可以幫我解決這個問題。 在此先感謝。

+0

任何機構可以請建議一些解決方案...我仍然堅持這一點。我將配置更改爲Parent_Last。然後它給了我類演員異常。 –

回答

0

對我來說,你應該在客戶端設置WS-Security用戶名令牌。如果您使用SoapUi進行測試,請添加新的傳出WS-Security配置(使用用戶名WSS條目)。

相關問題