Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 让我的SOAP应用程序正常工作_Php_Xml_Soap - Fatal编程技术网

Php 让我的SOAP应用程序正常工作

Php 让我的SOAP应用程序正常工作,php,xml,soap,Php,Xml,Soap,我正在开始使用SOAP,但无法通过身份验证的第一个障碍 这是我的密码 $login = array( 'loginWebRequest' => array( 'Username' => 'myuser', 'Password' => 'mypass' ) ); $url = 'https://qa-api.ukmail.com/Services/UKMAuthenticationServices/UKMAuthen

我正在开始使用SOAP,但无法通过身份验证的第一个障碍

这是我的密码

$login = array(
    'loginWebRequest'   =>  array(
        'Username'  =>  'myuser',
        'Password'  =>  'mypass'
    )
);

$url = 'https://qa-api.ukmail.com/Services/UKMAuthenticationServices/UKMAuthenticationService.svc?wsdl';
$client = new SoapClient($url);

$result = $client->Login('Login',$login);
print_r($result);
我希望有人能看到我明显犯的错误

print_r($client->__getFunctions());
告诉我这个

Array
(
    [0] => LoginResponse Login(Login $parameters)
    [1] => LogoutResponse Logout(Logout $parameters)
)
提前谢谢

保罗

试试这个:

$options = array(
    "trace" => 1,
    "exception" => 1
    );

$login = array(
    'loginWebRequest'   =>  array(
        'Username'  =>  'myuser',
        'Password'  =>  'mypass'
    )
);

$url = 'https://qa-api.ukmail.com/Services/UKMAuthenticationServices/UKMAuthenticationService.svc?wsdl';
$client = new SoapClient($url,$options);

$result = $client->call('Login',$login);

echo "<pre>";
print_r($client->__getLastRequest());
echo "<hr />";
print_r($result);
$options=array(
“跟踪”=>1,
“异常”=>1
);
$login=array(
“loginWebRequest”=>数组(
“用户名”=>“我的用户”,
'密码'=>'我的通行证'
)
);
$url='1https://qa-api.ukmail.com/Services/UKMAuthenticationServices/UKMAuthenticationService.svc?wsdl';
$client=newsoapclient($url$options);
$result=$client->call('Login',$Login);
回声“;
打印($client->u getLastRequest());
回声“
”; 打印(结果);

我建议在任何代码之前使用soapui,这对于测试de wsdl函数和权限非常重要。在SOAPUI中,您可以调用登录功能,这样可以更快速、更容易地检查登录信息和密码信息。

您的问题是什么?