Ibm mobilefirst IBM Worklight—“IBM Worklight”;没有有效的操作参数,无法处理请求。请提供有效的soap操作“;

Ibm mobilefirst IBM Worklight—“IBM Worklight”;没有有效的操作参数,无法处理请求。请提供有效的soap操作“;,ibm-mobilefirst,worklight-adapters,worklight-waf,Ibm Mobilefirst,Worklight Adapters,Worklight Waf,使用Worklight Application Framework editor测试“从服务创建数据对象”生成的HTTP适配器过程代码时,会生成以下错误: 没有有效的操作参数,无法处理请求。请 提供有效的soap操作 这是web服务URL: 程序调用结果: { "Envelope": { "Body": { "Fault": { "Code": { "Value": "soap:Sender"

使用Worklight Application Framework editor测试“从服务创建数据对象”生成的HTTP适配器过程代码时,会生成以下错误:

没有有效的操作参数,无法处理请求。请 提供有效的soap操作

这是web服务URL:

程序调用结果:

{
   "Envelope": {
      "Body": {
         "Fault": {
            "Code": {
               "Value": "soap:Sender"
            },
            "Detail": "",
            "Reason": {
               "Text": {
                  "CDATA": "Unable to handle request without a valid action parameter. Please supply a valid soap action.",
                  "lang": "en"
               }
            }
         }
      },
      "soap": "http:\/\/www.w3.org\/2003\/05\/soap-envelope",
      "xsd": "http:\/\/www.w3.org\/2001\/XMLSchema",
      "xsi": "http:\/\/www.w3.org\/2001\/XMLSchema-instance"
   },
   "errors": [
   ],
   "info": [
   ],
   "isSuccessful": true,
   "responseHeaders": {
      "Cache-Control": "private",
      "Content-Length": "500",
      "Content-Type": "application\/soap+xml; charset=utf-8",
      "Date": "Mon, 28 Apr 2014 07:56:34 GMT",
      "Server": "Microsoft-IIS\/7.5",
      "X-AspNet-Version": "2.0.50727",
      "X-Powered-By": "ASP.NET"
   },
   "responseTime": 1476,
   "statusCode": 500,
   "statusReason": "Internal Server Error",
   "totalTime": 1477,
   "warnings": [
   ]
}

正在考虑在Worklight的未来版本中支持HTTP标头中的SOAP操作

如果希望在Worklight Studio v6.1中调用生成的适配器,则必须修改生成的SOAP适配器并手动添加操作头

例如,要调用GetWeatherInformation操作,可以打开生成的适配器JS文件并添加以下行:

headers = headers || {};
headers.SOAPAction = 'http://ws.cdyne.com/WeatherWS/GetWeatherInformation';
在调用此函数末尾的invokeWebService之前调用Weather_GetWeatherInformation函数