0
我想將多個參數傳遞給來自Jolie的嵌入式Java服務。 這裏是我的朱莉程序和Java程序代碼:如何將多個參數從Jolie傳遞給嵌入式Java服務?
朱莉程序:
include "console.iol"
type NandRequest:void {
.number[2,*]: bool
}
interface NANDInterface {
RequestResponse: test(NandRequest)(bool)
}
outputPort NAND {
Interfaces: NANDInterface
}
embedded {
Java: "example.NAND" in NAND
}
main
{
request.number[0] = true;
request.number[1] = true;
[email protected](request)(response);
[email protected](response)()
}
Java程序: 包例子;
import jolie.runtime.JavaService;
public class NAND extends JavaService{
public java.lang.Boolean test(final java.lang.Boolean x , final java.lang.Boolean y) {
java.lang.Boolean r = !(x&&y);
return r;
}
}
但是當我運行朱莉服務,它提供了錯誤爲「jolie.runtime.InvalidException:無效的標識:測試
什麼是通過這種多參數的正確方法是什麼?