webservice報錯 Server returned error code = 401 for URI

來源:互聯網
上載者:User
嚴重: Server returned error code = 401 for URI : http://xxxx/MyService.asmx. Check server logs for details
2008-8-28 16:14:50 org.apache.catalina.core.StandardWrapperValve invoke
嚴重: Servlet.service() for servlet jsp threw exception
org.codehaus.xfire.XFireRuntimeException: Server returned error code = 401 for URI : http://xxxxxx. Check server logs for details
at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:130)
at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114)
at org.codehaus.xfire.client.Client.invoke(Client.java:336)
at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)

at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)


錯誤原因:

看你的service.xml的name和namespace的名字是不是相同了,我這裡有一個例子:
<?xml version="1.0" encoding="UTF-8"?>
<beans>
  <service xmlns="http://xfire.codehaus.org/config/1.0">
    <name>ICategoryService2W</name>
    <namespace>http://127.0.0.1:8080/admin/services/</namespace>
    <serviceClass>com.xx.ecm.category.ICategoryService2W</serviceClass>
    <implementationClass>com.xx.ecm.category.managerimpl.CategoryService2W</implementationClass>
  </service>
</beans>

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.