洛少的专栏

阿洛确不凡

webservice报错 Server returned error code = 401 for URI

严重: 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>

阅读更多
个人分类: webservice
上一篇iphone sdk CATransition 错误
下一篇webservice的 Unrecognized xbean element mapping: services in namespace
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭