【问题标题】:Pass objects inside SOAP functions on SOAP Client在 SOAP 客户端上的 SOAP 函数内传递对象
【发布时间】:2012-12-31 05:40:02
【问题描述】:

我需要从 PHP 平台调用soap WSDL。 SOAP 请求由 SOAP 主体函数内的 SOAP 对象组成。

工作 SOAP 请求示例如下,

<SOAP-ENV:Envelope 
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ser:f1>
<a1>
<number xsi:type="xsd:string">720</number>
<newStatus xsi:type="xsd:string">2</newStatus>
</a1>
</ser:f1>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

f1 是一个 SOAP 函数,它是 this 中的另一个参数,作为 a1。

我需要从 phpsoapclient 或 NuSOAP 调用它。

我下面的示例代码 (NUSOAP) 不起作用,

require_once "lib/nusoap.php";
$client = new nusoap_client("https://xxxx?wsdl");
$client->soap_defencoding = 'UTF-8';

$result = $client->call("f1", array("number" => "720","newStatus" => "2"),'','');

如果有人可以,请提供一个来自 php 或 NuSOAP 的 SOAPCLIENT 代码。

【问题讨论】:

    标签: php web-services soap nusoap soap-client


    【解决方案1】:

    试试这个:

    $client = new nusoap_client($url, true);
    

    希望得到帮助:)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-06-20
      • 1970-01-01
      • 2017-05-13
      • 2019-07-22
      • 1970-01-01
      • 1970-01-01
      • 2013-04-04
      相关资源
      最近更新 更多