>hi,
>
>I faced a very strange problem.
>
>I deployed my spring bean as a XFire Service. The bean is echoBean, from the
>sample - xfire-spring-example.
>
>the following wsdl url is valid:
>
>http://localhost:8080/xfirespring/EchoService?wsdl
>
>And i run a client program :
>
>public class EchoClient
>{
> public static void main(String args[])
> {
> String serviceURL =
> "http://localhost:8080/xfirespring/EchoService?wsdl";
I changed the line into
String serviceURL = "http://localhost:8080/xfirespring/EchoService";
everything work fine ;-)
> Service serviceModel = new
> ObjectServiceFactory().create(Echo.class,null,"http://xfire.codehaus.org/BookService",null);
>
> XFireProxyFactory serviceFactory = new XFireProxyFactory();
>
> try
> {
> Echo service = (Echo) serviceFactory.create(serviceModel,
> serviceURL);
> Client client = Client.getInstance(service);
> client.addOutHandler(new OutHeaderHandler());
> // disable timeout
> client.setProperty(CommonsHttpMessageSender.HTTP_TIMEOUT, "0");
>
> service.echo("kakaka");
> System.out.println("succeed!");
> }
> catch (MalformedURLException e)
> {
> e.printStackTrace();
> }
> }
>}
>
>but i got an error:
>the stack is as follows:
>
>Exception in thread "main" 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 $Proxy0.echo(Unknown Source)
> at org.codehaus.xfire.spring.example.EchoClient.main(EchoClient.java:34)
>
>
>what's the problem ?
>
>any suggestion will be great appreciated !!
>
>
>jordyhan
>
>
>
>---------------------------------------------------------------------
>To unsubscribe from this list please visit:
>
> http://xircles.codehaus.org/manage_email
>
= = = = = = = = = = = = = = = = = = = =
致
礼!
jordyhan
[EMAIL PROTECTED]
2007-06-16