问题标签 [nusoap]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
php - 使用 php / nuSoap 使用 WCF Web 服务时出现问题
我有 3 个客户端站点,它们都依赖于外部 Web 服务。Web 服务曾经位于 ColdFusion 服务器上,但它刚刚转换为 .NET 服务器。我的客户端代码不再工作,我没有任何运气来修复它。客户端站点在 php 上并使用 nusoap 调用 web 服务。
我设置了这个测试,像以前一样使用 wsdl:
该脚本的结果可以在这里看到:http ://www.realtywest.com.au/listings/test_wsdl.php
这会返回一个内部服务错误..
我用谷歌搜索了我的问题,发现了这个非常古老的论坛帖子:http ://www.sitepoint.com/forums/showthread.php?t= 97632 他们建议有时.NET web 服务的设置不同,而不是将其传递给nusoap 作为 wsdl,在调用时也可以实际传递请求,而不仅仅是变量数组。
所以我尝试了这种方式:
请参见此处: http ://www.realtywest.com.au/listings/test.php 这次得到一个 Action Not supported 错误。在第二条消息中发送的请求是从 SOAP UI 复制的,我实际上可以在其中得到结果,所以我知道网络服务确实有效..
我相信有人可以查看调试消息并知道问题所在..我非常感谢您对此提供的任何帮助..
php - 我正在尝试使用 nusoap 但不断收到错误消息说我需要启用肥皂扩展
我以前从未使用过肥皂或 nusoap。
我正在使用安装了 PHP 并正常工作的 mac。
我想安装soap,但据我所知,这是否意味着我需要重建和重新安装PHP,所以我选择使用NuSOAP,因为看起来我不需要经历相同的过程。
基本上我使用以下语句来包含 NuSOAP
这可行,但是当我尝试拨打电话时,出现以下错误:
“此客户端库需要激活 SOAP 扩展。”
使用 NuSOAP 时是否还需要重新构建和重新安装 PHP?
我是 SOAP 新手,所以我想要一条阻力最小的道路来开始学习它。
谢谢
c# - PHP、Soap 和 ASMX 网络服务
我正在尝试使用 NuSoap 从 PHP (5.3.5) 调用 AspNet WebService (C# 3.5)。
我的 WebMethod 非常简单:
当我在 VisualStudio 2008 中设置断点时, token
可以,但ppp
= 空数组 int(非空)。
知道我的代码有什么问题吗?
php - 创建 PHP Web 服务的最佳方式
不是真正的 PHP 开发人员,但我有 PHP 托管并想在其上创建一个 PHP Web 服务以供 .NET 客户端使用,我正在考虑将 WSDL 与 NUSoap 一起使用。
或者
一个更现代的解决方案是使用 OData,我不确定它是否会更容易。哪一个会更容易?
php - nusoap如何返回数组?
我写 server.php 如下:
client.php 如下:
我无法从 client.php 获得回报。我想列出 eventId、eventName 的行。请帮帮我,谢谢。
php - nuSOAP 静态类方法命名
我试图让nuSOAP
库公开一个名称不同的 SOAP 方法。现在我正在做:
这可行,我目前正在使用它,但很难组织,如果我有方法名称冲突,我没有办法解决它。我将如何声明一个static
方法但将其公开,如上所示?像这样的东西:
此外,如果有人知道合法的 nuSOAP 参考,我将不胜感激。目前我必须阅读源代码。
php - 如何在 NuSoap 中禁用外部模式下载
我们的一个系统依赖于一个用 PHP 实现的遗留应用程序,它使用 NuSoap 来查询一些 SOAP Web 服务
每当它尝试连接到 Web 服务时,它也会尝试从 http://schemas.xmlsoap.org/soap/encoding/下载架构 ,我们注意到在过去几天该网站出现了一些间歇性中断,并且导致 webapp 失败,即使它使用的 web 服务工作正常。
无论如何我们可以配置(或修补)NuSoap 以禁用对该外部资源的验证?
c# - 用于 c# 应用程序的 PHP Web 服务
我想创建一个要从 C# 应用程序使用的 php webservice 服务器。
我想要一个自动生成 wsdl 文件以便于管理的库(这就是我选择 NuSoap 的原因)。
我尝试在 PHP5 上使用 nusoap。我对 charset 和 Content-Type 有一些问题。
Visual Studio 给出了这个错误:
The HTML document does not contain Web service discovery information.
Metadata contains a reference that cannot be resolved: 'https://www.xxx.yy'.
There is a problem with the XML that was received from the network. See inner exception for more details.
The encoding in the declaration 'ISO-8859-1' does not match the encoding of the document 'utf-8'.
If the service is defined in the current solution, try building the solution and adding the service reference again.
$soap= new soap_server();
$soap->xml_encoding = 'utf-8';
$soap->configureWSDL('Bonjour', 'https://www.xxx.yy');
$soap->wsdl->schemaTargetNamespace = 'http://soapinterop.org/xsd/';
$soap->register('bonjour', array('prenom' => 'xsd:string'));
$HTTP_RAW_POST_DATA = file_get_contents("php://input");
$soap->service($HTTP_RAW_POST_DATA);
header('Content-Type: application/soap+xml; charset=utf-8');
function bonjour($prenom)
{
return "Bonjour ".$prenom;
}
?>
有人知道如何改变它以使其兼容和工作吗?
谢谢
php - 使用 nusoap 返回故障码
使用 nusoap 调用 Web 服务方法会返回错误
是我的电话有问题还是肥皂服务器有问题?
上面是对函数的调用,它接受我检查为有效的 1 个参数 ($url)。
--------完整代码-----
请求应该是这样的(根据提供服务的公司)
Nusoap 提出的实际完整请求:
完整回复:
php - Soap 客户端,如何使用基本 HTTP 身份验证通过 HTTPS 调用函数
这个问题一整天都在扼杀我。
我有一个带有基本 HTTP 身份验证的客户端 Web 服务 https: //*.asmx ?WSDL..
如果我使用 SoapUI 连接到 web 服务,一切都可以完美运行,没有任何错误..
问题是当我切换到 PHP...
我设法连接到它,我可以使用 php 的 soapclient 扩展从服务器获取函数列表(我使用的是 PHP 5.3.0)。
当我尝试使用 PHP 的 soapclient 扩展调用函数时,出现以下错误:
致命错误:未捕获的 SoapFault 异常:[HTTP] Error Fetching http headers in C:\www\xpto_Atestes\soapclient.php:26 堆栈跟踪:#0 [内部函数]:>SoapClient->__doRequest(' * **... ', 'http:// * *** ...', 1, 0) #1 >C:\www\xpto_Atestes\soapclient.php(26): SoapClient->__soapCall('login', Array) #2 {main} >在第 26 行的 C:\www\xpto_Atestes\soapclient.php 中抛出
更清晰的错误(当我对调用结果进行 print_r 时):
[faultstring] => 获取 http 标头时出错
[faultcode] => HTTP
发送以下标头:
POST / * .asmx HTTP/1.1 主机:* .pt 连接:Keep-Alive 用户代理:>PHP-SOAP/5.3.0 内容类型:text/xml;charset=utf-8 SOAPAction: "http:// * * /Login" >Content-Length: 264 授权: Basic AUTHSECRETPASS
我这样称呼它:
$soapParams = array('login' => 'HTTP_LOGIN',
'password' => 'HTTP_PASS',
'authentication' => SOAP_AUTHENTICATION_BASIC,
'trace' => 1,
'exceptions' => 0
);
$client = new SoapClient("https:// * *** .asmx?WSDL", $soapParams); 回声“连接
”;$params = array('account' => '', 'msisdn'=>'NUMBER', 'password'=>'PASSWORD'); $result = $client->__soapCall("login", $params);
经过一段时间的谷歌搜索并试图找出问题所在,我切换到 nusoap .. 令我痛苦的是,它也给出了一个错误:
错误
HTTP 错误:标头的套接字读取超时
要求
POST / * * .asmx HTTP/1.0 主机:* .pt 用户代理:NuSOAP/0.9.5 (1.123) 内容类型:text/xml;charset=ISO-8859-1 SOAPAction:“http:// * *** /Login” 授权:基本 AUTHSECRETPASS 内容长度:481
数字密码
回复
我这样称呼它:
$client = new nusoap_client("https:// * * .asmx?WSDL", true);
$client->setCredentials('HTTPUSER','HTTPPASS','basic');
$params = array('account' => '', 'msisdn'=>'NUMBER', 'password'=>'PASSWORD' );
$result = $client->call('登录', $params);
使用 nusoap,我还尝试启用 curl 扩展来拨打电话:
$client->setUseCurl(true);
但没有这样的运气,它一直报错:
HTTP 错误:cURL 错误:56:从对等 url 接收数据时失败:http:// * ** * ** * ** .asmx
content_type: http_code:
0
header_size: 0
request_size: 750
filetime: -1
ssl_verify_result: 0
redirect_count:0
total_time:21.015
namelookup_time:0
connect_time: 0 pretransfer_time
:0
size_upload:462
size_download:0
speed_download:0
speed_upload:21
download_content_length:-1
upload_content_length:-1
starttransfer_time:0
redirect_time:0
我 100% 确定 web 服务没有任何问题,如果我可以从 SoapUI 调用它而没有任何问题,我不明白为什么我不能从 PHP 调用它。
我不知道我还能做些什么……我想我什么都试过了……
编辑:我刚刚尝试了另一个用于 PHP 的 Soap 类,这次来自 Zend ..
结果是:
致命错误:未捕获的 SoapFault 异常:[WSDL] SOAP-ERROR:解析 WSDL:无法从 'https:// * * .asmx?WSDL' 加载:无法加载外部实体“https:// * .asmx?WSDL ” " 在 C:\www\xpto_Atestes\Zend\Soap\Client\Common.php:51 堆栈跟踪:
#0 C:\www\xpto_Atestes\Zend\Soap\Client\Common.php(51): SoapClient->SoapClient( 'https:// * * ...', Array)
#1 C:\www** * * _Atestes\Zend\Soap\Client.php(1032): Zend_Soap_Client_Common->__construct(Array, 'https:// * * ...', Array)
#2 C:\www** ** _Atestes\Zend\Soap\Client.php(1188): Zend_Soap_Client->_initSoapClientObject()
#3 C:\www** *_Atestes\Zend\Soap\Client.php(1112): Zend_Soap_Client->getSoapClient() #4 [内部函数]: Zend_Soap_Client->__call('Login', Array)
#5 C:\www** ** _Atestes\zend .php(28): Zend_Soap_Client->Login(Array)
#6 {main} 抛出