php - 错误: WSDL - SOAP-ERROR: Parsing WSDL: Couldn't load from

标签 php security soap wsdl

我有一个使用soap的php代码

我收到错误

ERROR: WSDL - SOAP-ERROR: Parsing WSDL: Couldn't load from

这是一个安全 wsdl,所以我还需要发送用户名和密码。 我的代码有什么问题? 我在网上看到它,但在 php 代码中的 SOAP 中不起作用。 这是我的代码:

<?php
ini_set("soap.wsdl_cache_enabled", "0"); 
$soap_url = 'http://some-ip/prod/app/soap/user/storeitemws?WSDL';
$sh_param = array(
                'username' => 'aya',
                'password' => 'aya');

$soap_client = new SoapClient($soap_url);
$test = $soap_client->Authenticate($sh_param);

echo $test . "\nDone";
?>

谢谢

最佳答案

参见documentation :

$client = new SoapClient("some.wsdl", array('login'          => "some_name",
                                            'password'       => "some_password"));

用户名更改为登录并尝试上述方法

关于php - 错误: WSDL - SOAP-ERROR: Parsing WSDL: Couldn't load from,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10550505/

相关文章:

php - 如何在一个表中打印 3 个数组,每个数组应代表 1 列?

php - PDO:FetchAll 返回空数组

php - 如何在 PHP 中保护数据库密码?

java - 使用 AXIS2 创建的 ADB stub 在客户端获取原始 XML SOAP 响应

php - INSERT 上的 SQL 注入(inject)

php - SQL查询计数问题

java - 如何使用安全约束来保护部分url?

python - Django 文件上传输入验证和安全

java - 在 JBoss EAP 6.4 上的 JBoss Fuse 中为 SOAP 代理创建 Camel 路由的简单指南

c# - 使用 C# 和 XDocument/XElement 解析 Soap 响应