cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "KARR, DAVID" <dk0...@att.com>
Subject RE: How to generate WADL on "root" of controller, not just with "?_wadl"?
Date Tue, 07 Nov 2017 16:43:11 GMT
> -----Original Message-----
> From: Sergey Beryozkin [mailto:sberyozkin@gmail.com]
> Sent: Tuesday, November 07, 2017 3:16 AM
> To: users@cxf.apache.org
> Subject: Re: How to generate WADL on "root" of controller, not just with
> "?_wadl"?
> 
> Hi David
> 
> I looked at the code, I think you can add a '.wadl' to the path instead
> - and for this to work at the server it requires an extensionMappings
> map property to have a "wadl":"application/wadl" pair

If that could work, it's still not quite what I'm looking for, but it would be marginally
better.  However, it doesn't appear to work.

I changed my extensionMappings block to this:
-------------
	   <jaxrs:extensionMappings>
            <entry key="json" value="application/json" />
            <entry key="xml" value="application/xml" />
            <entry key="wadl" value="application/wadl" />
	   </jaxrs:extensionMappings>
-------------

I restarted the app.

I ran "curl 'http://localhost:8080/combinedAtgUslMonitorService.wadl'", which returned a 404.

I retested the normal "curl 'http://localhost:8080/combinedAtgUslMonitorService/?_wadl&_type=json'",
and that worked fine.

> On 06/11/17 22:54, KARR, DAVID wrote:
> > I managed to add the 'cxf-rt-rs-service-description' artifact to my
> build, so that I get the WADL when I add "?_wadl" to my URL.  I'd
> actually like to make it return the WADL when I just try to access the
> "root" of the controller, without having to add the "?_wadl" string.
> This feels like a more natural way of exploring the service, like
> running a Linux command in bash without any parameters to have it tell
> me what the options are.
> >
Mime
View raw message