Ibm mobilefirst 在IBM MobileFirst Platform v8.0中将收到的sendFormParameters参数读入JS适配器方法

Ibm mobilefirst 在IBM MobileFirst Platform v8.0中将收到的sendFormParameters参数读入JS适配器方法,ibm-mobilefirst,mobilefirst-adapters,mobilefirst-server,mobilefirst-cli,mobilefirst-studio,Ibm Mobilefirst,Mobilefirst Adapters,Mobilefirst Server,Mobilefirst Cli,Mobilefirst Studio,我有javascriptWLResourceRequest.POST在客户端调用,并尝试在服务器端读取接收到的值。在服务器上,我只能读取“AB” function getFeed(x,y) { WL.Logger.error(JSON.stringify(x)); WL.Logger.error(JSON.stringif

我有javascript
WLResourceRequest.POST
在客户端调用,并尝试在服务器端读取接收到的值。在服务器上,我只能读取“AB”

function getFeed(x,y) {                                                 

 WL.Logger.error(JSON.stringify(x));                                    
 WL.Logger.error(JSON.stringify(y));   
客户端代码:

function getFeed(x,y) {                                                 

 WL.Logger.error(JSON.stringify(x));                                    
 WL.Logger.error(JSON.stringify(y));   
var resourceRequest=new-WLResourceRequest(“/adapters/AdapterNewGet/getFeed”,WLResourceRequest.POST);
var formParameters={“params”:“['AB','CD','EF']”;
resourceRequest.sendFormParameters(formParameters)。然后(app.onSuccess,app.onFailure);
适配器端代码:

function getFeed(x,y) {                                                 

 WL.Logger.error(JSON.stringify(x));                                    
 WL.Logger.error(JSON.stringify(y));   
函数getFeed(标记){
变量输入={
方法:“post”,
returnedContentType:'xml',
路径:getPath(标记)
};
返回MFP.Server.invokeHttp(输入);
}
在这里,当我打印
JSON.stringify(tag)
时,它只打印“AB”。请告诉我如何将所有传递的值从客户端代码访问到适配器方法
getFeed(tag)

function getFeed(x,y) {                                                 

 WL.Logger.error(JSON.stringify(x));                                    
 WL.Logger.error(JSON.stringify(y));   

谢谢,

向我提出的一个建议是

var params =['hello','world'];                                         
 var newParams = {'params' : JSON.stringify(params)};                   
 resourceRequest.sendFormParameters(newParams).then(.....)  
function getFeed(x,y) {                                                 

 WL.Logger.error(JSON.stringify(x));                                    
 WL.Logger.error(JSON.stringify(y));   
在JS适配器中,相应地定义函数:

function getFeed(x,y) {                                                 

 WL.Logger.error(JSON.stringify(x));                                    
 WL.Logger.error(JSON.stringify(y));   
这意味着在接收端,您需要指定函数调用上的参数数量与客户端上设置的参数数量相匹配(此处为2)

function getFeed(x,y) {                                                 

 WL.Logger.error(JSON.stringify(x));                                    
 WL.Logger.error(JSON.stringify(y));   
如果在客户端上传递的值的数量不同,则这可能不起作用
function getFeed(x,y) {                                                 

 WL.Logger.error(JSON.stringify(x));                                    
 WL.Logger.error(JSON.stringify(y));