小编Mik*_*mar的帖子

是什么导致soap响应在新服务器上没有返回数据?

我们刚搬到新服务器上获得1.2.新服务器需要php 5.6.在大多数情况下,我的代码有效.几个例外.我有两个来自不同供应商的SOAP API流程.一个工作正常,另一个返回:

Error: A847E54F5AEA4E798rt0.c.ie.o5DF59@4p7098Fs1lFf4v892c4m returned no data
Run Code Online (Sandbox Code Playgroud)

其中间部分是来自API的令牌,用于捕获响应中的数据流.问题是在收到令牌后,其余的响应都是空的.以下是基于此Five9的API的相关代码:如何使用SOAP API和基本身份验证来提取报告

$runReportResult = $client->runReport($runReportParam);

if(isset($runReportResult->return)){
    $runReportData = $runReportResult->return;
    $isReportRunningParam["identifier"] = $runReportData;
    $isReportRunningParam["timeout"] = 10;

    $isReportRunningResult = $client->isReportRunning($isReportRunningParam);

    if(empty($isReportRunningResult->return)){
        $getReportResultParam["identifier"] = $runReportData;
        $getReportResult = $client->getReportResult($getReportResultParam);
        if(isset($getReportResult->return->records)){       
            $getReportResultData = $getReportResult->return->records;

// data processing stuff removed for clarity

            } else {
            echo "Error: " . $runReportData . " returned no data";
        }
    } else {
        echo "Error: " . $runReportData . " exceeded the report runtime limit";
    }
} else { …
Run Code Online (Sandbox Code Playgroud)

php soap centos6

10
推荐指数
1
解决办法
477
查看次数

如何停止mysql舍入浮点值?

我将货币值以浮点数形式存储在mysql表中。

问题是,mysql正在向上或向下舍入数字。

例如 12345.68取整为12345.7

如何停止此操作,还是应该使用更好的数据类型?

我想保留2个小数位内的原始值。

mysql floating-accuracy

4
推荐指数
1
解决办法
3425
查看次数

& 符号破坏了 json

我有一个 swift 5 应用程序,可以发布数据来更新 mysql 表。它工作得很好,只是用户注意到在描述字段中使用&符号会导致应用程序更新功能失败。

这是组件结构

import Foundation

struct Component: Codable {

  var sku, qty, desc, condition: String

  enum CodingKeys: String, CodingKey {
    case sku = "Sku"
    case qty = "Qty"
    case desc = "Desc"
    case condition = "Condition"
  }
}
Run Code Online (Sandbox Code Playgroud)

这是我的 swift 5 代码来创建 post 参数

    var newCompUpload = [Component]()
    newCompUpload.append(newComp)

    let jsonData = try! JSONEncoder().encode(newCompUpload) 
    let uploadData = String(data: jsonData, encoding: .utf8)!

    let defaults = UserDefaults.standard
    let UserID = defaults.integer(forKey: "UserID")

    let postParameters1 = "mode="+mode+"&ShipmentID="+self.ShipmentID
    let postParameters2 …
Run Code Online (Sandbox Code Playgroud)

json swift

0
推荐指数
1
解决办法
1120
查看次数

标签 统计

centos6 ×1

floating-accuracy ×1

json ×1

mysql ×1

php ×1

soap ×1

swift ×1