Hi,

My comment inline
On 2011-1-17, at 上午4:58, Dale Hoshooley wrote:


I am using the wsdl2java utility to generate the jaxb classes from the cxf 2.3.1 binary package. I'm having a problem with it. It is generating the
@XmlElementRef annotation with the required attribute.

The project is configured via Maven and pulls it's dependencies from
central. When I reviewed the dependencies on cxf 2.3.1 I noticed that it depends on JAXB 2.1.13 where as the binary package uses JAXB 2.2.1.1. Why
the discrepancy?
I believe you're using jdk1.6, correct?
The default jaxb impl version picked up by maven is 2.1.13 when using jdk1.6[1], as the jdk1.6 built-in jaxb api version is 2.1, we need keep the api and impl version match.

If you want to use jaxb  impl 2.2.1.1, you have two ways,

1. using jdk1.5, the jdk1.5 profile defined in the parent/pom.xml[1] will pick up jaxb impl 2.2.1.1 2. if you still want to use jdk1.6, you need endorse jaxws-api and jaxb-api jars for your jdk1.6, you can get more details from [2], the "Runtime Changes" chapter.

[1]https://svn.apache.org/repos/asf/cxf/tags/cxf-2.3.1/parent/pom.xml
[2]http://cxf.apache.org/docs/23-migration-guide.html


Should I be using the cxf-codegen maven plugin instead of wsdl2java that is
packaged with the 2.3.1 binary release?
If you use maven to build your project, the cxf-codegen plugin is more appropriate here, you can easily specify jaxb impl version after you endorse jdk1.6.

Freeman

Thanks,
Dale.
--
View this message in context: 
http://cxf.547215.n5.nabble.com/CXF-2-3-1-dependency-problems-tp3343676p3343676.html
Sent from the cxf-user mailing list archive at Nabble.com.


--
Freeman Fang

------------------------

FuseSource: http://fusesource.com
blog: http://freemanfang.blogspot.com
twitter: http://twitter.com/freemanfang
Apache Servicemix:http://servicemix.apache.org
Apache Cxf: http://cxf.apache.org
Apache Karaf: http://karaf.apache.org
Apache Felix: http://felix.apache.org

Reply via email to