错误:WSDL - SOAP 错误:解析 WSDL:无法从 [英] ERROR: WSDL - SOAP-ERROR: Parsing WSDL: Couldn't load from

查看:71
本文介绍了错误:WSDL - SOAP 错误:解析 WSDL:无法从的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用soap的php代码

I have a php code that uses soap

我收到错误

错误:WSDL - SOAP 错误:解析 WSDL:无法加载

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

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

It's a security wsdl so I need to send also username and password. what is wrong in my code? I see it at web and does'nt work from soap in php code. here is my code:

<?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";
?>

谢谢

推荐答案

参见文档:

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

username改成login试试上面的方法

这篇关于错误:WSDL - SOAP 错误:解析 WSDL:无法从的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆