cxf下的Service(URL, QName, WebServiceFeature[]) is undefined
2013-03-23 16:24
363 查看
Service(URL, QName, WebServiceFeature[])
is undefined
原因是CXF自带的javax.xml.service 版本高过 jdk的javax.xml.service。
解决方法:
CXF2.2以下的使用JDK1.6可能没有问题
CXF2.2以上的必须使用JDK1.7才不会报错。
另外一个解决办法是:
在使用wsdl2java时,加入参数 -frontend jaxws21
这个问题的消息解释可以在这里看到 :
http://david-commerce.iteye.com/blog/978313:
I'm marking this as "not a problem" as the generated code is correct per spec. CXF 2.3.2 is a JAX-WS 2.2 compliant implementation and
thus must generate code compliant to the JAX-WS 2.2 specification which requires those constructors like that. HOWEVER, to compile
them on Java 6, you will likely need to endorsethe 2.2 jaxws-api jar (and likely the jaxb-api
jar as well). See the 2.3 migration guide: http://cxf.apache.org/docs/23-migration-guide.html for
some details about the endorsed stuff.
The alternative workaround, right now, is to delete the api
jars from lib/endorsed. In that case, wsdl2java will detect that the 2.2 versions are not available/endorsed and will switch
to generating 2.1 compliant code.
I also just added a new frontend (will be there for 2.3.3) to force 2.1 behavior. With 2.3.3, you'll be able to do "wsdl2java -frontend jaxws21" to tell it to use the JAX-WS
2.1 compliant frontend instead.
解决办法:
Alternative workaround you recommended works great!
"wsdl2java -frontend jaxws21" sounds better to me. I think it will be an important new feature to CXF as not many organisations may have moved past Java6 and would like to have jaxws_2.1
is undefined
原因是CXF自带的javax.xml.service 版本高过 jdk的javax.xml.service。
解决方法:
CXF2.2以下的使用JDK1.6可能没有问题
CXF2.2以上的必须使用JDK1.7才不会报错。
另外一个解决办法是:
在使用wsdl2java时,加入参数 -frontend jaxws21
这个问题的消息解释可以在这里看到 :
http://david-commerce.iteye.com/blog/978313:
I'm marking this as "not a problem" as the generated code is correct per spec. CXF 2.3.2 is a JAX-WS 2.2 compliant implementation and
thus must generate code compliant to the JAX-WS 2.2 specification which requires those constructors like that. HOWEVER, to compile
them on Java 6, you will likely need to endorsethe 2.2 jaxws-api jar (and likely the jaxb-api
jar as well). See the 2.3 migration guide: http://cxf.apache.org/docs/23-migration-guide.html for
some details about the endorsed stuff.
The alternative workaround, right now, is to delete the api
jars from lib/endorsed. In that case, wsdl2java will detect that the 2.2 versions are not available/endorsed and will switch
to generating 2.1 compliant code.
I also just added a new frontend (will be there for 2.3.3) to force 2.1 behavior. With 2.3.3, you'll be able to do "wsdl2java -frontend jaxws21" to tell it to use the JAX-WS
2.1 compliant frontend instead.
解决办法:
Alternative workaround you recommended works great!
"wsdl2java -frontend jaxws21" sounds better to me. I think it will be an important new feature to CXF as not many organisations may have moved past Java6 and would like to have jaxws_2.1
相关文章推荐
- cxf下的Service(URL, QName, WebServiceFeature[]) is undefined
- cxf下的Service(URL, QName, WebServiceFeature[]) is undefined
- cxf下的Service(URL, QName, WebServiceFeature[]) is undefined
- cxf下的Service(URL, QName, WebServiceFeature[]) is undefined
- cxf下的Service(URL, QName, WebServiceFeature[]) is undefined
- cxf下的Service(URL, QName, WebServiceFeature[]) is undefined
- javax.xml.ws.Service 报错The constructor Service(URL, QName, WebServiceFeature[]) is undefined的解决方案
- javax.xml.ws.Service 报错The constructor Service(URL, QName, WebServiceFeature[]) is undefined的解决方案
- WebService Service(URL, QName, WebServiceFeature[]) is undefined
- The constructor Service(URL, QName, WebServiceFeature[]) is undefined
- javax.xml.ws.Service 报错The constructor Service(URL, QName, WebServiceFeature[]) is undefined的解决方案
- WebService Service(URL, QName, WebServiceFeature[]) is undefined
- SVN导入代码,The constructor Service(URL, QName, WebServiceFeature[]) is undefined
- symbol:constructor Service(java.net.URL,javax.xml.namespace.QName,javax.xml.ws.WebServiceFeature
- 使用cxf创建webservice发生“Failed to import bean definitions from URL location [classpath:META-INF/cxf/cxf”
- WebService它CXF这三个音符(Service接口实现类)
- Spring 集成CXF框架发布Webservice服务 和 使用jdk生成Webservice clinet
- delphi调用cxf生成的webservice出错 message part name was not recognized.(does it exist in service wsdl?)
- WebService之CXF注解之二(Service接口)
- cxf 3.2+webservice+spring 4.2发布Rest WebService