当前位置: 代码迷 >> J2EE >> 用MyElipse 的插件xfire, 生成的client ,执行后Could not find a service to invoke 错误,是什么原因呢
  详细解决方案

用MyElipse 的插件xfire, 生成的client ,执行后Could not find a service to invoke 错误,是什么原因呢

热度:564   发布时间:2016-04-22 02:05:31.0
用MyElipse 的插件xfire, 生成的client ,执行后Could not find a service to invoke 异常,是什么原因呢?
信息: Unable to locate 'HelloWorldService' in ServiceRegistry
2007-11-2 13:06:36 org.codehaus.xfire.handler.DefaultFaultHandler invoke
信息: Fault occurred!
org.codehaus.xfire.fault.XFireFault: Could not find a service to invoke.
at org.codehaus.xfire.handler.LocateBindingHandler.invoke(LocateBindingHandler.java:39)
at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
at org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:64)
at org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.java:38)
at org.codehaus.xfire.transport.local.LocalChannel.sendViaNewChannel(LocalChannel.java:172)
at org.codehaus.xfire.transport.local.LocalChannel.send(LocalChannel.java:99)
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:75)
at org.codehaus.xfire.client.Client.invoke(Client.java:335)
at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
at $Proxy8.example(Unknown Source)
at client.HelloWorldServiceClient.main(HelloWorldServiceClient.java:128)
2007-11-2 13:06:36 org.codehaus.xfire.handler.DefaultFaultHandler sendToDeadLetter
严重: Could not find service.
org.codehaus.xfire.fault.XFireFault: Could not find a service to invoke.
at org.codehaus.xfire.handler.LocateBindingHandler.invoke(LocateBindingHandler.java:39)
at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
at org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:64)
at org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.java:38)
at org.codehaus.xfire.transport.local.LocalChannel.sendViaNewChannel(LocalChannel.java:172)
at org.codehaus.xfire.transport.local.LocalChannel.send(LocalChannel.java:99)
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:75)
at org.codehaus.xfire.client.Client.invoke(Client.java:335)
at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
at $Proxy8.example(Unknown Source)
at client.HelloWorldServiceClient.main(HelloWorldServiceClient.java:128)

------解决方案--------------------
按提示的信息是说:没有找到对应的服务
一般正常的操作是不会出现这种错误
是不是lz修改了它的配置文件?

------解决方案--------------------
没找到服务LZ肯定改配置了
------解决方案--------------------
借个地问个问题:
用xfire写的一个HelloWorld的web service 例子,
其url:http://localhost:8080/webservice_helloworld/HelloWorldService.ws?wsdl 

web service接口:
public interface HelloWorld { 
String sayHelloWorld(String name); 


实现类:
public class HelloWorldImpl implements HelloWorld { 
public String sayHelloWorld(String name) { 
String helloWorld = "hello," + name; 
return helloWorld; 

}
如何调用其中的sayHelloWorld方法?注:在eclipse中用java调用。方法应该怎么写?
  相关解决方案