ctoestreich/cxf-client — Issue #2: wsdl2java fails on complex service generation
Author: ctoestreich
Created: 2011-10-20 16:19:51+00:00
State: open

[java] wsdl2java - Apache CXF 2.4.2
[java] WSDLToJava Error: java.lang.reflect.UndeclaredThrowableException
[java] org.apache.cxf.tools.common.ToolException: java.lang.reflect.UndeclaredThrowableException
[java]	at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:291)
[java]	at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
[java]	at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
[java]	at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
[java]	at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:184)
[java] Caused by: java.lang.reflect.UndeclaredThrowableException
[java]	at $Proxy37.required(Unknown Source)
[java]	at com.sun.tools.xjc.generator.bean.field.AbstractField.annotateReference(AbstractField.java:187)
[java]	at com.sun.tools.xjc.generator.bean.field.AbstractField.annotate(AbstractField.java:156)
[java]	at com.sun.tools.xjc.generator.bean.field.AbstractFieldWithVar.createField(AbstractFieldWithVar.java:75)
[java]	at com.sun.tools.xjc.generator.bean.field.SingleField.(SingleField.java:89)
[java]	at com.sun.tools.xjc.generator.bean.field.SingleField.(SingleField.java:76)
[java]	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[java]	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
[java]	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
[java]	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
[java]	at com.sun.tools.xjc.generator.bean.field.GenericFieldRenderer.generate(GenericFieldRenderer.java:64)
[java]	at com.sun.tools.xjc.generator.bean.field.DefaultFieldRenderer.generate(DefaultFieldRenderer.java:79)
[java]	at com.sun.tools.xjc.generator.bean.BeanGenerator.generateFieldDecl(BeanGenerator.java:759)
[java]	at com.sun.tools.xjc.generator.bean.BeanGenerator.generateClassBody(BeanGenerator.java:540)
[java]	at com.sun.tools.xjc.generator.bean.BeanGenerator.(BeanGenerator.java:243)
[java]	at com.sun.tools.xjc.generator.bean.BeanGenerator.generate(BeanGenerator.java:161)
[java]	at com.sun.tools.xjc.model.Model.generateCode(Model.java:286)
[java]	at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:252)
[java]	at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:85)
[java]	at org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:393)
[java]	at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.generateTypes(WSDLToJavaContainer.java:588)
[java]	at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:240)
[java]	at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:138)
[java]	at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:283)
[java]	... 4 more
[java] Caused by: java.lang.NoSuchMethodException: javax.xml.bind.annotation.XmlElementRef.required()
[java]	at java.lang.Class.getDeclaredMethod(Class.java:1937)
[java]	at com.sun.codemodel.TypedAnnotationWriter.invoke(TypedAnnotationWriter.java:108)
[java]	... 28 more
[echo] completed wsdl2java