为什么在使用@BeanParam时未填充我的非xxxParam字段

时间:2017-01-11 19:41:56

标签: rest parameters jersey jax-rs jersey-2.0

我有这个测试用例来演示我可以将实体传递给资源,当尝试使用@BeanParam输入参数时,类型字段永远不会在我的返回对象中设置。

这是发送的内容:

DEFINE VARIABLE iZeroCode    AS INTEGER   NO-UNDO.
DEFINE VARIABLE iNineCode    AS INTEGER   NO-UNDO.
DEFINE VARIABLE chChar       AS CHARACTER NO-UNDO.

ASSIGN iZeroCode = ASC("0")
       iNineCode = ASC("9")
       chChar    = SUBSTRING(cNumber,1,1).                           

IF NOT(ASC(chChar) >= iZeroCode AND ASC(chChar) <= iNineCode)    THEN DO:
    MESSAGE "Invalid Number..." VIEW-AS ALERT-BOX.
END.

这是发回的内容:

INFO: 1 * Sending client request on thread main
1 > POST http://localhost:9998/hello
1 > Content-Type: application/json
1 > orgId: xx1
{"orgId":null,"type":"MY-TYPE"}

这是测试类:

INFO: 1 * Client response received on thread main
1 < 200
1 < Content-Length: 27
1 < Content-Type: application/json
{"orgId":"xx1","type":null}

0 个答案:

没有答案