【发布时间】:2019-01-02 12:33:21
【问题描述】:
我使用 Liferay 6.2 我使用 Service Builder 创建了一个实体 (notizia)。
我生成了 Web 服务。 我有一种方法可以打印这样的字符串:
public class notiziaServiceImpl extends notiziaServiceBaseImpl {
@Override
@AccessControlled(guestAccessEnabled=true)
public String printMyString()
{
return "i'm the string ";
}
}
有效! 我添加了另一个带有输入参数的方法
@AccessControlled(guestAccessEnabled=true)
public String getHelloWorld(String worldName)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException {
return "Hello world: " + worldName;
}
“getHelloWorld”方法不起作用。 我在控制台中收到此错误:
[MethodParametersResolverImpl:59] java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
我不知道我想念什么。 我该如何解决?
【问题讨论】:
-
如何调用方法?您是否尝试过(从内存中)
localhost:8080/api/jsonws的 API 浏览器? -
如果你粘贴整个类的源代码会更好..
-
我要粘贴哪个类源?