Posted on 2010-07-28 13:25
kangaroo 阅读(847)
评论(0) 编辑 收藏 所属分类:
tech/webservice
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.
解决办法还是很简单:将wsdlURL后面的”?wsdl”去掉即可:
Service serviceModel = new ObjectServiceFactory().create(MyService.class);
MyService service = (MyService) new XFireProxyFactory().create(serviceModel,
“http://localhost:8080/ninthDemo/services/myService“);