wink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bin Zhu <luckyzhu...@gmail.com>
Subject @WADLDoc for method resource doesn't work in JDK7.5.1 , linux
Date Wed, 26 Feb 2014 13:13:01 GMT
Our app was deploying on Linux with JDK7.5.1, we are using @WADLDoc to set
the WADL title, and find it doesn't work for method resource, but will only
work when setting title for class resource.
This issue is only found on linux platform with JDK 7.5.1. There is no such
issue on Windows platform with same JDK version. The Wink version is 1.1.
Any idea if it's a wink bug or jdk bug?  Is there any workaround to set
wadl doc title besides @WADLDoc?  Thanks in advance.
***************************************************************
Cases don't work:
Provider code:
  @GET
    public String getMethod(@WADLDoc(value = "This is path parameter
message1") @PathParam("pathparam") List<String> pathParam) {
        return "getMethod";
    }

Client code will failed to get the doc and the title:

List<Param> params = wadlResource.getParam();
for (Param param : params) {
    if ("pathparam".equals(param.getName())) {
        pathParamFound = true;
        assertEquals(ParamStyle.TEMPLATE, param.getStyle());
        docs = param.getDoc();
        assertEquals(1, docs.size());
        doc = docs.get(0);
        assertEquals("This is path parameter message1", doc.getTitle());

******************************************************************
Cases will work:
Provider code:
@WADLDoc("This is MyWADLResource")
@Path("wadl/{pathparam:[[a-z][A-Z]]*}")
public class MyWADLResource extends MyWADLAbstractClass

Client code will get the doc and title;
      org.apache.wink.common.model.wadl.Resource wadlResource =
resourceList.get(0);
assertEquals("wadl/{pathparam}", wadlResource.getPath());
List<Doc> docs = wadlResource.getDoc();
assertEquals(1, docs.size());
Doc doc = docs.get(0);
assertEquals("This is MyWADLResource", doc.getTitle());
*********************************************************************************

Mime
View raw message