- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我正在使用 nusoap 连接到 .net 服务,但我在第 54 行收到错误消息“注意: undefined variable :C:\xampplite\htdocs\newsoap\searchwwcc.php 中的 HEADER
fatal error :未捕获的 SoapFault 异常:[Client] 函数(“serializeEnvelope”)不是 C:\xampplite\htdocs\newsoap\searchwwcc.php:54 中此服务的有效方法堆栈跟踪:#0 [内部函数]: SoapClient->__call('serializeEnvelo...', Array) #1 C:\xampplite\htdocs\newsoap\searchwwcc.php(54): SoapClient->serializeEnvelope('
这是我正在使用的引用代码
require_once('lib/nusoap.php');
$serverpath ='https://service.website.net/ws/bridge.asmx?wsdl';
$SOAPClient = new soapclient($serverpath);
$SOAPACTION = "http://connect2.askadmissions.net/webservices/GetContact";
$BODY='<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetContact xmlns="http://service.website.net/webservices/">
<ClientName>clientname</ClientName>
<PassKey>*******</PassKey>
<SearchCriteriaXml>
<![CDATA[
<attributes>
<attribute>
<name>email</name>
<value>name@name.com</value>
<operator>equals</operator>
</attribute>
</attributes>
]]>
</SearchCriteriaXml>
<AttributesXml>
<![CDATA[
<attributes>
<attribute>
<name>firstname</name>
</attribute>
<attribute>
<name>lastname</name>
</attribute>
</attributes>
]]>
</AttributesXml>
</GetContact>
</soap:Body>
</soap:Envelope>';
$SOAPMESSAGE = $SOAPClient->serializeEnvelope($BODY,$HEADER,array(),'document', 'literal');
$RESULT = $SOAPClient->send($BODY, $SOAPACTION);
echo $SOAPClient->response;
最佳答案
我发现哪里出了问题:
我换行:
$SOAPClient = new soapclient($serverpath);
到
$SOAPClient = new nusoap_client($serverpath);
我遇到了哪个固定错误,它开始给我空白页。我发现空白页是因为没有安装 curl。
使用以下代码来回显错误:
$soapError = $SOAPClient->getError();
if (! empty($soapError)) {
$errorMessage = 'SOAPClient failed: ' . $soapError;
throw new Exception($errorMessage);
}
在开始工作之后我收到了警告:
Notice: Undefined property: nusoap_client::$operation in C:\xampplite\htdocs\newsoap\lib\nusoap.php on line 7674
我去了 nusoap.php 并在那行之前插入了:
if(empty($this->operation)) {
$this->operation = "";
}
关于php - 使用 .net 和 nusoap 的 Web 服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5033769/
我在 stackoverflow 上的某处读到,使用 NuSoap 不是一个好主意,它已经死了。如果是,创建 WSDL 文件的最佳解决方案是什么。我只是 nusoap 只是为了创建 wsdl 文件,我
我在使用 NuSOAP 传输文件时遇到问题。我知道您可以读取文件并将其作为字符串传输,但它不起作用。这是一个例子: 客户: require('libraries/nusoap/nusoap.php')
require_once('soap/nusoap.php'); $soap = new soap_server(); $soap->configureWSDL('ClientSecurityServ
我是这方面的新手,也是编程新手。我正在尝试创建一个基于 nusoap 和 php 的 Web 服务,以便它从 mysql 数据库传递一些值。我浏览了许多网站(包括堆栈溢出答案),发现了一些我尝试过但尚
使用 .NET WCF 网络服务时,我收到以下响应(错误): Unsupported HTTP response status 415 Cannot process the message becau
无法弄清楚如何使 NuSOAP 使用 UTF-8 作为内容类型。它不断吐出“ISO-8859-1”。这是我尝试过的相关代码位: $soapclient=new soapclient($url1,'ws
我正在用 php 编写 soap 服务器和 soap 客户端。对于 soap 服务的身份验证,我想使用“usernametoken”来确保安全。任何人都可以将使用 nusoap 在服务器和客户端中应用
当尝试实例化我的 nuSoap 方法 authenticateUser 时,它说: Fatal error: Uncaught SoapFault exception: [Client] Functi
我有 NuSOAP 网络服务器:... $server->register('getMembersEvents', array('date' => 'xsd:str
您好,我正在为 nusoap 服务器使用此代码,但是当我在 Web 浏览器中调用服务器时,它显示消息“此服务不提供 Web 描述”这是代码 register('hello'); // create t
我正在使用 PHP 中的 NuSoap 库构建 Web 服务。我的网络服务将充当客户端和供应商已经存在的网络服务之间的中间层。因此,客户端不会直接连接到供应商,而是连接到我的 Web 服务,我的 We
我有一个 php 类,我想将它与 Nusoap 一起使用.我可以使用 register 命令注册 nusoap 中已经存在的类方法吗? 示例: 在这里我们注册了一个我们在这个脚本中定义的函数。但是如果
我想在我的网络服务中返回一个字符串数组 我试过: configureWSDL('NewsService', 'urn:NewsService'); $server->register('GetAllN
我在尝试发送重复标签时遇到了 NuSOAP 问题。这是我需要发送的代码: string1 string2 我正在使用以下代码进行通话: $pn[] = 'APPSP2101
我想在 Laravel 5.3 和 PHP7 上使用 nusoap。但是当我尝试使用那个包中的 composer 安装它时: https://github.com/codecasts/nusoap-p
我正在使用 nosoap 在 PHP 中开发 Web 服务。这是我的文件,webservice.php configureWSDL('myWS', $namespace); $server->wsdl
我正在使用 NuSOAP 尝试使用以 Java 构建的 Web 服务。到目前为止我有这段代码: 'John'); echo $client->call('Hey', $param); unset($c
我一直在使用 nuSOAP 在 PHP 中编写演示 Web 服务。 我想知道 nuSOAP 对 SOAP PHP5 类的优势是什么。 另外,这是一个用作模型的测试网络服务。 我想知道我应该测试哪些典型
按照目前的情况,这个问题不适合我们的问答形式。我们希望答案得到事实、引用或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
目前我使用的是 PHP 版本 5.4.16 和 NuSoap 0.95,我试过这个例子: here 它显示了这样的服务器代码; $server->wsdl->addComplexType( '
我是一名优秀的程序员,十分优秀!