PHP Soap客户端调用WCF服务?

PHP Soap客户端调用WCF服务?,wcf,soap,soap-client,wcf-binding,nusoap,Wcf,Soap,Soap Client,Wcf Binding,Nusoap,如何做到这一点,我是新的Soap API,任何示例代码 $soapClient=新的soapClient(“”) WCF也是soapweb服务的一个实现,因此我们应该像调用soapweb服务一样调用该服务。请参阅官方文件。 另外,这里还有一些相关链接,希望对您有所帮助。 如果有什么我可以帮忙的,请随时告诉我。Wot代码我已经写了,这是正确的吗???我收到此错误:(警报('抱歉,blah返回了以下错误:客户端函数(“GetInventory”)不是此服务的有效方法。我们现在将带您返回我们

如何做到这一点,我是新的Soap API,任何示例代码 $soapClient=新的soapClient(“”)


WCF也是soapweb服务的一个实现,因此我们应该像调用soapweb服务一样调用该服务。请参阅官方文件。


另外,这里还有一些相关链接,希望对您有所帮助。




如果有什么我可以帮忙的,请随时告诉我。

Wot代码我已经写了,这是正确的吗???我收到此错误:(警报('抱歉,blah返回了以下错误:客户端函数(“GetInventory”)不是此服务的有效方法。我们现在将带您返回我们的主页');window.location='main.php';)
// Prepare SoapHeader parameters
$sh_param = array(
        'UserName'    =>    'admin',
        'Password'    =>    'admin');
        //'ClientID'    =>     1,
        //'OutletID'    =>     1,
        //'TerminalID'  =>     1);
$headers = new SoapHeader('http://website.com/EComintegration/IntegrationService.svc', 'UserCredentials', $sh_param);

// Prepare Soap Client
$soapClient->__setSoapHeaders(array($headers));

// Setup the RemoteFunction parameters
$ap_param = array(
    'Location' => 2,
    'DateFilter'=>'20200220'
);

// Call RemoteFunction ()
$error = 0;
try {
    $info = $soapClient->__call("GetInventory", array($ap_param));
} catch (SoapFault $fault) {
    $error = 1;
    print("
        alert('Sorry, blah returned the following ERROR: ".$fault->faultcode."-".$fault->faultstring.". We will now take you back to our home page.');
        window.location = 'main.php';
    ");
}

if ($error == 0) {       
    $auth_num = $info->ItemName;

}