---
title: "CXF下使用wsdl2java时报错的解决办法：Service(URL, QName, WebServiceFeature[]) is undefined"
author: "bluebreath"
date: "2011-09-07T15:28:59Z"
tags: []
categories: ["开源软件"]
slug: "cxf-wsdl2java-service-url-qname-webservicefeature-is-undefined"
draft: false
lastmod: "2011-09-07T15:28:59Z"
id: 1167691
url: "https://breath.iteye.com/blog/1167691"
---

原因：CXF2.4.2自带的jaxws版本为jax-ws2.2.而jdk1.6带的版本为2.1。

使用frontend让cxf用2.1的编译器编译类

wsdl2java -frontend jaxws21 -p com.moon.service http://localhost:8080/framework/services/helloWorldService?wsdl