项目要用到webservice,我研究了下xfire,在运行xfire的客户端代码时报错:

Exception in thread "main" java.lang.IllegalStateException: Could not initialize Service.
	at org.codehaus.xfire.jaxws.ServiceDelegate.<init>(ServiceDelegate.java:77)
	at org.codehaus.xfire.jaxws.Provider.createServiceDelegate(Provider.java:32)
	at javax.xml.ws.Service.<init>(Service.java:56)
	at test.jax.HelloWorldSimple.<init>(HelloWorldSimple.java:54)
	at test.jax.Main.main(Main.java:26)
Caused by: java.lang.NoSuchMethodException: test.jax.HelloWorldSimple.getPortClassMap()
	at java.lang.Class.getMethod(Class.java:1605)
	at org.codehaus.xfire.jaxws.ServiceDelegate.<init>(ServiceDelegate.java:60)
	... 4 more

 解决方法:

删除xfire-all-1.2.6.jar org.codehaus.xfire.jaxws.Provider.class 


java.lang.NoSuchMethodException: .getPortClassMap()
 

参考:http://bbs.csdn.net/topics/390736806

xfire 服务器代码和客户端代码见附件

注意:项目使用maven构建

相关文章:

  • 2021-10-31
  • 2021-10-01
  • 2021-11-13
  • 2021-11-23
  • 2022-02-04
  • 2022-12-23
  • 2022-12-23
  • 2021-04-09
猜你喜欢
  • 2021-04-24
  • 2021-06-28
  • 2022-12-23
相关资源
相似解决方案