Generate Java code from WADL


I'm trying to generate a Java client from wadl to talk to TeamCity.
I've tried to do it with Idea: Tools -> WebServices -> RESTful Web Services ->Generate Java From WADL
I'm getting this error:

Info: Processing: file:/C:/wadl/application1.wadl
Info: Processing: file:/C:/wadl/application.wadl/xsd1.xsd
Info: Processing: file:/C:/wadl/application.wadl/xsd0.xsd
Warning: Warning:e-props-correct.2: Invalid value constraint value '' in element 'comment'.
Warning: Warning:s4s-att-not-allowed: Attribute 'default' cannot appear in element 'element'.
Error: Error: Property "Template" is already defined. Use <jaxb:property> to resolve this conflict., line 495, col 71, file file:/C:/wadl/application.wadl/xsd1.xsd
Error: Error: The following location is relevant to the above error, line 510, col 54, file file:/C:/wadl/application.wadl/xsd1.xsd

Does anybody know how to solve this problem?

Comment actions Permalink

I got the same problem running TeamCity Professional 7.1.2 (build 24170).

Using apache cxf 2.7.1 and executing:

wadl2java http://localhost:8080/guestAuth/app/rest/application.wadl

Yields this output:

WADLToJava Error: java.lang.RuntimeException: Error compiling schema from WADL :

Property "Template" is already defined. Use <jaxb:property> to resolve this conflict.

If I download the one from I get the more verbose error you have with line numbers, but its the same error and neither tool manage to produce anything.

Comment actions Permalink

Thanks for feedback.
I've created issue TW-24934 in our bug tracker, please watch it.


Please sign in to leave a comment.