You don't NEED to move to java 7.   There are two options:

1) Endorse the jars in the lib/endorsed directory.  That upgrades the apis 
that are picked up to 2.2 level.   The wsdl2java script does that so they are 
picked up.  When found, the tool generates 2.2 compiant code and thus would 
need to have the 2.2 jars endorsed to be compilable. 

2) Remove the jars in the endorsed dir.   In that case, it would pick up the 
2.1 level version built into the JDK and it will generate 2.1 compliant code 
and compilable without endorsing anything.

The endorsement of the jars is mentioned in the migration guide:
http://cxf.apache.org/docs/23-migration-guide.html


Dan



On Tuesday 14 December 2010 11:19:38 am aaa aaa wrote:
> Hello,
> 
> I am new to Apache CXF. I tried it few months ago with Apache CXF 2.3.0,
> with a contract first approach.
> 
> Now that the version 2.3.1 is released, I used again the wsdl2java tools to
> check for differences.
> I encounter a compilation error on the generated Service class.
> 
> This come from the new features:
> 
>     public SwafeService(WebServiceFeature ... features) {
>         super(WSDL_LOCATION, SERVICE, features);
>     }
>     public SwafeService(URL wsdlLocation, WebServiceFeature ... features) {
>         super(wsdlLocation, SERVICE, features);
>     }
> 
>     public SwafeService(URL wsdlLocation, QName serviceName,
> WebServiceFeature ... features) {
>         super(wsdlLocation, serviceName, features);
>     }
> 
> I have resolved the problem by switching to a Java 7 JVM or deleting this
> generated code.
> 
> It would be good to add a notification/warning on the wdsl2java tool page
> and/or on the changelog. I think migration from Java 5 to Java 7 is a big
> change that would deserve it.
> 
> Or maybe rather put an option in the wsdl2java tool to explicitly add or
> not this new feature.
> 
> Regards,
> 
> Kayser

-- 
Daniel Kulp
dk...@apache.org
http://dankulp.com/blog

Reply via email to