You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Anastasiia Iurshina <An...@epam.com> on 2015/06/08 11:32:14 UTC

Method javadocs are missed in WADL when JDK8 is used

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


RE: Method javadocs are missed in WADL when JDK8 is used

Posted by Anastasiia Iurshina <An...@epam.com>.
Now it seems to work correctly! Thanks a lot :)

-----Original Message-----
From: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Sent: Friday, June 12, 2015 3:12 PM
To: users@cxf.apache.org
Subject: Re: Method javadocs are missed in WADL when JDK8 is used

Right, this is the latest update:

http://git-wip-us.apache.org/repos/asf/cxf/commit/734498e6

As I said, scraping the generated HTML is not the most robust way to extract JavaDocs but I'm getting positive enough about keeping this feature maintained as it is obvious a number of users may be interested.

If it is still does not work: can you please consider providing a patch ?

Sergey
On 11/06/15 21:13, Sergey Beryozkin wrote:
> Indeed the test class has only 2 methods, with 0 and 2 parameters. And 
> it just worked after the latest tweak but it is obvious the existing 
> tests do not have enough coverage...
>
> Sergey
>
>
> On 11/06/15 17:46, Anastasiia Iurshina wrote:
>> This time it works but only for the methods with 0 parameters or with
>> 2 parameters.
>> String[] opBits length is always 2 for methods with any number of 
>> parameters.
>>
>> -----Original Message-----
>> From: Sergey Beryozkin [mailto:sberyozkin@gmail.com]
>> Sent: Thursday, June 11, 2015 6:37 PM
>> To: users@cxf.apache.org
>> Subject: Re: Method javadocs are missed in WADL when JDK8 is used
>>
>> Hope this time it will work better:
>>
>> http://git-wip-us.apache.org/repos/asf/cxf/commit/5f5f3748
>>
>> Sergey
>> On 10/06/15 14:46, Sergey Beryozkin wrote:
>>> Indeed, I got it now :-)
>>>
>>> Sergey
>>> On 10/06/15 14:36, Anastasiia Iurshina wrote:
>>>> 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:sberyozkin@gmail.com]
>>>> Sent: Wednesday, June 10, 2015 4:25 PM
>>>> To: users@cxf.apache.org
>>>> 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:sberyozkin@gmail.com]
>>>>> Sent: Tuesday, June 09, 2015 2:35 PM
>>>>> To: users@cxf.apache.org
>>>>> 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#JAXRSS
>>>>>> er
>>>>>> vi
>>>>>> 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
>>>>>
>>>>
>>>
>>
>>
>> --
>> Sergey Beryozkin
>>
>> Talend Community Coders
>> http://coders.talend.com/
>>
>> Blog: http://sberyozkin.blogspot.com
>>
>


Re: Method javadocs are missed in WADL when JDK8 is used

Posted by Sergey Beryozkin <sb...@gmail.com>.
Right, this is the latest update:

http://git-wip-us.apache.org/repos/asf/cxf/commit/734498e6

As I said, scraping the generated HTML is not the most robust way to 
extract JavaDocs but I'm getting positive enough about keeping this 
feature maintained as it is obvious a number of users may be interested.

If it is still does not work: can you please consider providing a patch ?

Sergey
On 11/06/15 21:13, Sergey Beryozkin wrote:
> Indeed the test class has only 2 methods, with 0 and 2 parameters. And
> it just worked after the latest tweak but it is obvious the existing
> tests do not have enough coverage...
>
> Sergey
>
>
> On 11/06/15 17:46, Anastasiia Iurshina wrote:
>> This time it works but only for the methods with 0 parameters or with
>> 2 parameters.
>> String[] opBits length is always 2 for methods with any number of
>> parameters.
>>
>> -----Original Message-----
>> From: Sergey Beryozkin [mailto:sberyozkin@gmail.com]
>> Sent: Thursday, June 11, 2015 6:37 PM
>> To: users@cxf.apache.org
>> Subject: Re: Method javadocs are missed in WADL when JDK8 is used
>>
>> Hope this time it will work better:
>>
>> http://git-wip-us.apache.org/repos/asf/cxf/commit/5f5f3748
>>
>> Sergey
>> On 10/06/15 14:46, Sergey Beryozkin wrote:
>>> Indeed, I got it now :-)
>>>
>>> Sergey
>>> On 10/06/15 14:36, Anastasiia Iurshina wrote:
>>>> 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:sberyozkin@gmail.com]
>>>> Sent: Wednesday, June 10, 2015 4:25 PM
>>>> To: users@cxf.apache.org
>>>> 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:sberyozkin@gmail.com]
>>>>> Sent: Tuesday, June 09, 2015 2:35 PM
>>>>> To: users@cxf.apache.org
>>>>> 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#JAXRSSer
>>>>>> vi
>>>>>> 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
>>>>>
>>>>
>>>
>>
>>
>> --
>> Sergey Beryozkin
>>
>> Talend Community Coders
>> http://coders.talend.com/
>>
>> Blog: http://sberyozkin.blogspot.com
>>
>


Re: Method javadocs are missed in WADL when JDK8 is used

Posted by Sergey Beryozkin <sb...@gmail.com>.
Indeed the test class has only 2 methods, with 0 and 2 parameters. And 
it just worked after the latest tweak but it is obvious the existing 
tests do not have enough coverage...

Sergey


On 11/06/15 17:46, Anastasiia Iurshina wrote:
> This time it works but only for the methods with 0 parameters or with 2 parameters.
> String[] opBits length is always 2 for methods with any number of parameters.
>
> -----Original Message-----
> From: Sergey Beryozkin [mailto:sberyozkin@gmail.com]
> Sent: Thursday, June 11, 2015 6:37 PM
> To: users@cxf.apache.org
> Subject: Re: Method javadocs are missed in WADL when JDK8 is used
>
> Hope this time it will work better:
>
> http://git-wip-us.apache.org/repos/asf/cxf/commit/5f5f3748
>
> Sergey
> On 10/06/15 14:46, Sergey Beryozkin wrote:
>> Indeed, I got it now :-)
>>
>> Sergey
>> On 10/06/15 14:36, Anastasiia Iurshina wrote:
>>> 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:sberyozkin@gmail.com]
>>> Sent: Wednesday, June 10, 2015 4:25 PM
>>> To: users@cxf.apache.org
>>> 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:sberyozkin@gmail.com]
>>>> Sent: Tuesday, June 09, 2015 2:35 PM
>>>> To: users@cxf.apache.org
>>>> 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#JAXRSSer
>>>>> vi
>>>>> 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
>>>>
>>>
>>
>
>
> --
> Sergey Beryozkin
>
> Talend Community Coders
> http://coders.talend.com/
>
> Blog: http://sberyozkin.blogspot.com
>


RE: Method javadocs are missed in WADL when JDK8 is used

Posted by Anastasiia Iurshina <An...@epam.com>.
This time it works but only for the methods with 0 parameters or with 2 parameters.
String[] opBits length is always 2 for methods with any number of parameters.

-----Original Message-----
From: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Sent: Thursday, June 11, 2015 6:37 PM
To: users@cxf.apache.org
Subject: Re: Method javadocs are missed in WADL when JDK8 is used

Hope this time it will work better:

http://git-wip-us.apache.org/repos/asf/cxf/commit/5f5f3748

Sergey
On 10/06/15 14:46, Sergey Beryozkin wrote:
> Indeed, I got it now :-)
>
> Sergey
> On 10/06/15 14:36, Anastasiia Iurshina wrote:
>> 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:sberyozkin@gmail.com]
>> Sent: Wednesday, June 10, 2015 4:25 PM
>> To: users@cxf.apache.org
>> 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:sberyozkin@gmail.com]
>>> Sent: Tuesday, June 09, 2015 2:35 PM
>>> To: users@cxf.apache.org
>>> 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#JAXRSSer
>>>> vi
>>>> 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
>>>
>>
>


--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Re: Method javadocs are missed in WADL when JDK8 is used

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hope this time it will work better:

http://git-wip-us.apache.org/repos/asf/cxf/commit/5f5f3748

Sergey
On 10/06/15 14:46, Sergey Beryozkin wrote:
> Indeed, I got it now :-)
>
> Sergey
> On 10/06/15 14:36, Anastasiia Iurshina wrote:
>> 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:sberyozkin@gmail.com]
>> Sent: Wednesday, June 10, 2015 4:25 PM
>> To: users@cxf.apache.org
>> 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:sberyozkin@gmail.com]
>>> Sent: Tuesday, June 09, 2015 2:35 PM
>>> To: users@cxf.apache.org
>>> 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
>>>
>>
>


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Re: Method javadocs are missed in WADL when JDK8 is used

Posted by Sergey Beryozkin <sb...@gmail.com>.
Indeed, I got it now :-)

Sergey
On 10/06/15 14:36, Anastasiia Iurshina wrote:
> 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:sberyozkin@gmail.com]
> Sent: Wednesday, June 10, 2015 4:25 PM
> To: users@cxf.apache.org
> 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:sberyozkin@gmail.com]
>> Sent: Tuesday, June 09, 2015 2:35 PM
>> To: users@cxf.apache.org
>> 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
>>
>


RE: Method javadocs are missed in WADL when JDK8 is used

Posted by Anastasiia Iurshina <An...@epam.com>.
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:sberyozkin@gmail.com] 
Sent: Wednesday, June 10, 2015 4:25 PM
To: users@cxf.apache.org
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:sberyozkin@gmail.com]
> Sent: Tuesday, June 09, 2015 2:35 PM
> To: users@cxf.apache.org
> 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
>


Re: Method javadocs are missed in WADL when JDK8 is used

Posted by Sergey Beryozkin <sb...@gmail.com>.
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:sberyozkin@gmail.com]
> Sent: Tuesday, June 09, 2015 2:35 PM
> To: users@cxf.apache.org
> 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#JAXRSServic
>> 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
>


RE: Method javadocs are missed in WADL when JDK8 is used

Posted by Anastasiia Iurshina <An...@epam.com>.
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:sberyozkin@gmail.com] 
Sent: Tuesday, June 09, 2015 2:35 PM
To: users@cxf.apache.org
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#JAXRSServic
> 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

Re: Method javadocs are missed in WADL when JDK8 is used

Posted by Sergey Beryozkin <sb...@gmail.com>.
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#JAXRSServicesDescription-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

Re: Method javadocs are missed in WADL when JDK8 is used

Posted by Sergey Beryozkin <sb...@gmail.com>.
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#JAXRSServicesDescription-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
>
>