> -----Original Message-----
> From: Sergey Beryozkin [mailto:[email protected]]
> Sent: Tuesday, November 07, 2017 3:07 PM
> To: [email protected]
> Subject: Re: How to generate WADL on "root" of controller, not just with
> "?_wadl"?
> 
> Can you try a breakpoint at
> 
> https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__github.com_apache_cxf_blob_master_rt_frontend_jaxrs_src_main_java_or
> g_apache_cxf_jaxrs_impl_RequestPreprocessor.java-23L111&d=DwICaQ&c=LFYZ-
> o9_HUMeMTSQicvjIg&r=OsTemSXEn-
> xy2uk0vYF_EA&m=TIOLNb851DZraIfg7Tp6grZ49Sz6DcznHxbu3aWxDpA&s=8XehshxT4pC
> MwtkDCMs1HGTx55e768vfuTaHng0WRCg&e=
> 
> ?

Ah, I figured something out.

The normal way to get the wadl would have required this URL:

    http://localhost:8080/combinedAtgUslMonitorService?_wadl

Using the extension mapping approach requires this URL:

    http://localhost:8080/combinedAtgUslMonitorService/controller.wadl 

Until now, I wasn't adding "/controller" to the URL in my test.


Now that this is working, I'd like to experiment with other options.  For 
instance, how can I make accessing the following URL give me the WADL?

    http://localhost:8080/combinedAtgUslMonitorService/controller 

> On 07/11/17 17:52, KARR, DAVID wrote:
> >> -----Original Message-----
> >> From: Sergey Beryozkin [mailto:[email protected]]
> >> Sent: Tuesday, November 07, 2017 9:17 AM
> >> To: [email protected]
> >> Subject: Re: How to generate WADL on "root" of controller, not just
> >> with "?_wadl"?
> >>
> >> Try
> >> application/vnd.sun.wadl+xml
> >> please.
> >
> > Changed the entry to:
> > -------
> >      <entry key="wadl" value="application/vnd.sun.wadl+xml" />
> > --------
> >
> > Still doesn't work.
> 'http://localhost:8080/combinedAtgUslMonitorService.wadl' still gets
> 404.  Changing ".wadl" to "?_wadl" works.
> >
> >> On 07/11/17 16:43, KARR, DAVID wrote:
> >>>> -----Original Message-----
> >>>> From: Sergey Beryozkin [mailto:[email protected]]
> >>>> Sent: Tuesday, November 07, 2017 3:16 AM
> >>>> To: [email protected]
> >>>> 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.
> >>>>>

Reply via email to