xfire 问题

魔都 2013-09-22 02:40:14
2013-9-22 14:36:05 org.codehaus.xfire.transport.http.HttpChannel sendViaClient
严重: Server returned error code = 404 for URI : http://localhost:9999/WebServiceProject/services/MyService. Check server logs for details
Exception in thread "main" org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Server returned error code = 404
上网找了一圈无解求指导。
http://localhost:9999/WebServiceProject/services/MyService 访问是没问题的。

客户端代码:
public static void main(String[] args) {
Service srvcModel = new
ObjectServiceFactory().create(IIMyService.class);
XFireProxyFactory factory =
new XFireProxyFactory(XFireFactory.newInstance().getXFire());
String helloWorldURL =
"http://localhost:9999/WebServiceProject/services/MyService";
try {
IIMyService srvc = (IIMyService)factory.create( srvcModel, helloWorldURL);
String result = srvc.example("hello world");
System.out.print(result);
} catch (MalformedURLException e) {
e.printStackTrace();
}
}
...全文
132 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
魔都 2013-09-22
  • 打赏
  • 举报
回复
,我去了终于明白了。

81,091

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧