出错位置:

 

[java]  
    view plain 
    copy 
    print 
    ? 
    
 
  
1. public GetUserInfoService() {  
2. super(WSDL_LOCATION, SERVICE);  
3.    }  
4.      
5.   
6. /**
7.     *
8.     * @return
9.     *     returns GetUserInfo
10.     */  
11. @WebEndpoint(name = "GetUserInfoPort")  
12. public GetUserInfo getGetUserInfoPort() {  
13. return super.getPort(GetUserInfoPort, GetUserInfo.class);  
14.    }  
15.   
16. /**
17.     * 
18.     * @param features
19.     *     A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy.  Supported features not in the <code>features</code> parameter will have their default values.
20.     * @return
21.     *     returns GetUserInfo
22.     */  
23. @WebEndpoint(name = "GetUserInfoPort")  
24. public GetUserInfo getGetUserInfoPort(WebServiceFeature... features) {  
25. return super.getPort(GetUserInfoPort, GetUserInfo.class, features);  
26.    }

这几处的super地方报错

 

 

错误原因:由于jax-ws2.2规约与java6冲突  故需要降低jax-ws规约版本

 

解决方法:在生成的时候服务路径前面加上 -frontend jaxws21

 


CXF 2.6.1 中WSDL2Java自动生成代码super出错_xml

 

把生成的文件夹重新copy到项目中就OK了。