As it is it doesn't work for any methods. But if the operation marker ends are changed from "--" to "-", it will work for the methods without parameters and for the methods with only one parameter. Thanks.
-----Original Message----- From: Sergey Beryozkin [mailto:[email protected]] Sent: Wednesday, June 10, 2015 4:25 PM To: [email protected] Subject: Re: Method javadocs are missed in WADL when JDK8 is used Hi I'm presuming the updated code works for methods with no parameters only ? I'll pay a closer attention to getting the method names with parameters extracted, Cheers, Sergey On 10/06/15 13:59, Anastasiia Iurshina wrote: > Thanks for the fast reaction :) > > I think I didn't describe the problem well... It still doesn't work. > It's not that brackets have been replaced with hyphens. The format has been > changed a bit more: > > Java8: > <a name="replaceFirst-java.lang.String-java.lang.String-"> > <a name="toLowerCase--"> > > Java7: > <a name="replaceFirst(java.lang.String, java.lang.String)"> <a > name="toLowerCase()"> > > So in Java 8 the list of parameter types starts with a hyphen, ends with a > hyphen, and the types are separated by hyphens. > > -----Original Message----- > From: Sergey Beryozkin [mailto:[email protected]] > Sent: Tuesday, June 09, 2015 2:35 PM > To: [email protected] > Subject: Re: Method javadocs are missed in WADL when JDK8 is used > > Hi > > I've just fixed for 3.0.6-SNAPSHOT: > > https://issues.apache.org/jira/browse/CXF-6446 > > Have a look please if it does work for you > > Cheers, Sergey > On 08/06/15 11:20, Sergey Beryozkin wrote: >> Hi >> >> Thanks for reporting this issue, I'll take care of it in time for the >> next release. >> >> FYI, it is also possible to prepare a WADL document at the build time >> and there one can depend on the actual on the more robust JavaDoc API >> to get the doc collected: >> >> http://cxf.apache.org/docs/jaxrs-services-description.html#JAXRSServi >> c >> esDescription-java2wadlMavenplugin >> >> >> This document can then be referenced from a jaxrs:server element. >> >> Thanks, Sergey >> >> >> >> On 08/06/15 10:32, Anastasiia Iurshina wrote: >>> Hello, >>> >>> We're currently using CXF 3.0.4 and it seems there is a bug in >>> generating WADL when JDK 8 is used: method javadocs are not being >>> added to WADL. >>> It happens because Javadoc format has been changed in Java 8. Now in >>> Javadoc HTML files methods look like < a name="getCountries--"> >>> instead of < a name="getCountries( in the older versions. >>> >>> JavaDocProvider expects the older format: String operMarker = >>> operLink + method.getName() + "("; so it's not able to find >>> operation marker. >>> >>> >>> >>> There is also a minor problem with namespaces. If all >>> request/response types in endpoints are collections the namespace is >>> not being added to the <application tag, which result in the invalid WADL. >>> >>> Classes of the objects that are elements of the collections are not >>> added to the Map<Class<?>, QName> clsMap = new >>> IdentityHashMap<Class<?>, QName>(); in WadlGenerator. >>> >>> (and it seems right) so the namespace is missed. Maybe it's the >>> expected behavior but it seems a bit inconsistent since collections >>> are supported as request/response types. >>> >>> >>> Thanks, >>> Anastasiia >>> >>> >> > > > -- > Sergey Beryozkin > > Talend Community Coders > http://coders.talend.com/ > > Blog: http://sberyozkin.blogspot.com >
