日期:2014-05-20  浏览次数:20984 次

Help me about XFire exception "There must be a method name element."
Maybe   client   send   message   as   document/literal   but   service   expect
document/wrapped.
Try   to   intercept   SOAP   message   and   see   what   is   sending.

I   don 't   understand   what 's   missing.     Here   is   the   error   thrown   when   a   services   is   used

2007-07-17   14:31:19,656   DEBUG   org.codehaus.xfire.handler.HandlerPipeline   -   Invoking   handler   org.codehaus.xfire.client.ClientReceiveHandler   in   phase   service
org.codehaus.xfire.XFireRuntimeException:   Could   not   invoke   service..   Nested   exception   is   org.codehaus.xfire.fault.XFireFault:   There   must   be   a   method   name   element.
org.codehaus.xfire.fault.XFireFault:   There   must   be   a   method   name   element.
at   org.codehaus.xfire.service.binding.WrappedBinding.readMessage(WrappedBinding.java:32)
at   org.codehaus.xfire.soap.handler.SoapBodyHandler.invoke(SoapBodyHandler.java:42)
at   org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
at   org.codehaus.xfire.client.Client.onReceive(Client.java:406)
at   org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:139)
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)
at   $Proxy4.callCrmService(Unknown   Source)
at   webservice.client.TestClient.test1(TestClient.java:58)
at   webservice.client.TestClient.main(TestClient.java:104)

thanks!!!!!!!

------解决方案--------------------
The main difference is that if you use the XFire client code directly, your
service
(the orchestration one) is dependant on the protocol and location of the
services
it references, whereas if you use the JBI proxy, you could change one of the
service
to be itself a router on the bus, use JMS instead of HTTP ...
This is all about decoupled services and only reference the interface of a
service rather
than the binding.

------解决方案--------------------
缺了包啦
------解决方案--------------------
你们不要说鸟语~
首先你查看一下xfire相关的包都导入了吗,然后查看配置文件是否正确,并且该配置文件是否在web.xml已经配置好,然后再看你的服务接口与实现写的都对吗,最后再查看一下客户端调用代码是否正确~
最好把你的这些东西都贴出来,那才好跟你分析~