-- 作者:甜辣酱
-- 发布时间:9/28/2007 6:07:00 AM
-- [求助]求教关于axis的wss4j
最近在做一个web service,由于是初学者,所以很多东西都还不知道,现在在做web service安全这块,打算用wss4j,我试运行了axis自带的小例子,sample\stock\,按照apache网站上(http://ws.apache.org/wss4j/axis.html)介绍的步骤做的,写wsdd,生成wsdl,生成4个相关class,可是当运行客户端程序时,编译是通过的,但执行时,他报错: Exception in thread "main" AxisFault faultCode: {http://xml.apache.org/axis/}HTTP faultSubcode: faultString: (401)Non-Autoris?br> faultActor: faultNode: faultDetail: {}:return code: 401 <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode xmlns:ns1="http://xml.apache.org/axis/">ns1:Server.Unauthenticated</faultcode><faultstring>User 'null' not authenticated (unknown user)</faultstring><detail><ns2:hostname xmlns:ns2="http://xml.apache.org/axis/">M35734</ns2:hostname></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope> {http://xml.apache.org/axis/}HttpErrorCode:401 (401)Non-Autoris?br> at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at samples.stock.client.localhost.axis.services.urn.xmltoday_delayed_quotes.GetQuoteSoapBindingStub.getQuote(GetQuoteSoapBindingStub.java:112) at samples.stock.client.StockServiceClient.main(StockServiceClient.java:27) 请问是什么原因啊?
|