Where has my WADL gone?

With previous versions of CXF, accessing http://localhost:8080/rest/persons?_wadl was enough to get a WADL.

I doubt people are really using it (as opposed to a WSDL in SOAP). But just in case you are missing it, to obtain a WADL, you can add the following dependency to your pom.xml.

<dependency>
  <groupId>org.apache.cxf</groupId>
  <artifactId>cxf-rt-rs-service-description</artifactId>
  <version>3.1.4</version>
</dependency>

Call the URL again, now it is there.

<application>
    <grammars />
    <resources base="http://localhost:8080/rest">
        <resource path="/persons">
            <method name="GET">
                <response>
                    <representation mediaType="application/json" />
                </response>
            </method>
            <method name="POST">
                <request>
                    <representation mediaType="application/json" />
                </request>
                <response>
                    <representation mediaType="application/json" />
                </response>
            </method>
            <resource path="/{id}">
                <param name="id" style="template" type="xs:string" />
                <method name="DELETE">
                    <request />
                    <response status="204" />
                </method>
                <method name="GET">
                    <request />
                    <response>
                        <representation mediaType="application/json" />
                    </response>
                </method>
                <method name="PUT">
                    <request>
                        <representation mediaType="application/json" />
                    </request>
                    <response>
                        <representation mediaType="application/json" />
                    </response>
                </method>
            </resource>
        </resource>
    </resources>
</application>

The complete source code is available here.

Written on December 6, 2015