Posted on 2010-07-28 13:25
kangaroo 閱讀(860)
評論(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“);