java.lang.IllegalStateException: Could not initialize Service.

xfire-all-1.2.6.jar做的服务端,wsimport 自动生成的客户端

如果客户端引用的jar包中有xfire-all-1.2.6.jar,则会发生下面这个异常

 

 

java.lang.IllegalStateException: Could not initialize Service.

 

 

Exception in thread "main" java.lang.IllegalStateException: Could not initialize Service.
    at org.codehaus.xfire.jaxws.ServiceDelegate.(ServiceDelegate.java:77)
    at org.codehaus.xfire.jaxws.Provider.createServiceDelegate(Provider.java:32)
    at javax.xml.ws.Service.(Service.java:56)
    at cn.com.webservice.client.Calculator.(Calculator.java:41)
    at unittest.cn.com.webservice.client.CalculatorTest.main(CalculatorTest.java:22)
Caused by: java.lang.NoSuchMethodException: cn.com.webservice.client.Calculator.getPortClassMap()
    at java.lang.Class.getMethod(Class.java:1605)
    at org.codehaus.xfire.jaxws.ServiceDelegate.(ServiceDelegate.java:60)
    ... 4 more

 

 

 

你可能感兴趣的:(工作,经验)