How to wadl2java these days?
Asked Answered
S

5

19

I have real difficulty finding commandline tool to convert WADL to java. No matter how much I try to google, follow blogs or java.net doc, there is no real download link. (links are broken or obsolete).

What particular vendor, community group is supplying this tool ? Does free download link exist ?

The generated code should be able to reconstruct POJOs from XML responses and survive inside Tomcat 7. Thank you

Answer: (this works only after June 2011):

  • Take Apache-CXF-2.4.1.zip (not any of the earlier versions)
  • Extract it to root folder
  • Take Apache-CXF-2.4.1.src.zip
  • Search for folder named distribution inside src
  • Extract ditribution folder and merge it with no overwrites to root folder
  • goto bin and spot the wadl2java.bat
  • run wadl2java.bat from command prompt
  • continue with no brainer details
Sruti answered 21/7, 2011 at 20:8 Comment(2)
Do you mean WSDL? Axis has a wsdl2java converter. Axis2 is available here: axis.apache.org/axis2/java/core. The Java SDK also comes with wsgen.exe in $JAVA_HOME/binRandi
Thank you, I have no problems with WSDL in SOAP camp. WADL is same sort of language for REST camp. Sort of forgotten minority of devs. Looks for me like abandoned and dying.Sruti
B
11

Apache CXF recently added support for WADL-first development of REST services. For more background information on its wadl2java tool, this blog entry by one of the CXF committers should help.

Bumptious answered 22/7, 2011 at 1:24 Comment(0)
A
7

I had some trouble using the CXF 2.5.4 wadl2java tool. It kept complaining of a missing "resources" element in my WADL file, even though it contained one.

wadl.java.net has a download of wadl2java that worked for me.

Antigen answered 27/6, 2012 at 0:40 Comment(0)
F
1

Just to give an update with CXF version 3.2.1 it worked for me.

Steps are

  1. Download anywhere
  2. Unzip
  3. Go to /bin
  4. Run wadl2java to get the usage
  5. Run wadl2java -p com.x.y.z wadl-file.xml to generate your classes in current directory.

By the way I noticed that it created a class with a space in the name and also created classes with name starting with digits :)

Flare answered 17/1, 2018 at 4:40 Comment(0)
A
0

As of Apache CXF version 2.7.11 just download the binary zip / tar.gz, set CXF_HOME env-var to /path/to/apache-cxf-x.y.z and wadl2java is available at $CXF_HOME/bin

Acarid answered 10/7, 2014 at 4:22 Comment(0)
S
0

For generating client side stubs from WADL, use a tool wadl2java. Download wadl tool from here:- http://search.maven.org/remotecontent?filepath=org/jvnet/ws/wadl/wadl-dist/1.1.5/wadl-dist-1.1.5-bin.zip.

For genearting client side java stubs(POJOs), use this command: \wadl2java -o .\src -p com.test.client WADL_FILE_LOCATION

If you are using maven project then you can use wadl2java maven plugin for this work.

Sansone answered 2/9, 2018 at 19:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.