Child pages
  • 2.1 Migration Guide
Skip to end of metadata
Go to start of metadata

2.1, being based on newer JAX-WS and JAXB standards and introducing new dependencies could cause some issues to make a migration from 2.0.x to 2.1 more than a "drop in" replacement. This page documents some of those issues.

Code generation changes

WS-Addressing types

JAX-WS 2.1 supports the WS-Addressing stuff right in the API's. Thus, WSDL's that take/return the EnpointReferenceType will now generate the JAX-WS 2.1 EndpointReference instead of the CXF proprietary type that was generated in CXF 2.0.x. There is a flag (-noAddressBinding) to wsdl2java to disable the new type mapping, but the generated code is then not jaxws compliant.

JAXB 2.1 annotations

The generated code now adds some JAXB 2.1 specific annotations like @XmlSeeAlso. Thus, the code will not work with previous versions of CXF/JAX-WS.

java2wsdl tool is gone

The java2wsdl tool was replaced with the java2ws tool which provides much more flexibility. Add the -wsdl flag to java2ws if you just need the wsdl.

java2wsdl goal in cxf-codegen-plugin is also gone

There is a new plugin that uses the java2ws tool now. See: http://cxf.apache.org/docs/maven-integration-and-plugin.html

Runtime changes

ASM jar

The JAX-WS frontend now "requires" asm 2.x or 3.x to be able to process some of the JAXB annotations on the SEI interface. If you don't use those annotations on the SEI, or if you have generated wrapper classes (either via wsdl2java or java2ws with -wrapperbean flag), you can remove the asm jar. If you leave asm jar, there can be conflicts with other apps that use asm. The predominant one is Hibernate. The "workaround" for Hibernate is to remove the asm 1.x jar they use and replace the cglib jar with the cglib-nodeps jar that includes a special internal version of asm that would not conflict with the 2.x/3.x version we need.

Woodstox requirement

Due to a bug to be fixed in 2.1.1, it looks like wstx-asl jar is required for the application to startup if the spring beans file requires namespace support to parse.

JDK 1.6 support

2.1 supports JDK 1.6 update 4 and later as update 4 includes the 2.1 versions of the JAX-WS API jar and the 2.1 version of the JAXB api jar and runtime. To use 2.1 with 1.6 up to update 3, you will need to add the jaxws-api jar and jaxb jars to the jre/lib/endorsed directories. You don't need to do anything special for JDK 1.5.

Aegis configuration

The configuration for the Aegis runtime has changed. See http://cxf.apache.org/docs/aegis-21.html for descriptions of the changes.

  • No labels

0 Comments