<code>SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://27.148.153.106:9090/mpserver/services/CykProcService' : Extra content at the end of the document in /Users/haua/Desktop/zuji_web/www/quan.189go.cn/test2.php:47 Stack trace: #0 /Users/haua/Desktop/zuji_web/www/quan.189go.cn/test2.php </code>
上面是报错
<code>$client = new SoapClient("http://27.148.153.106:9090/mpserver/services/CykProcService"); print_r($client->__getFunctions()); </code>
上面是我的代码,下面是wsdl
<code><?xml version="1.0" encoding="UTF-8"?> <definitions targetnamespace="http://client.webservice.mpserver.ptnetwork.com" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://client.webservice.mpserver.ptnetwork.com" xmlns:intf="http://client.webservice.mpserver.ptnetwork.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <!--WSDL created by Apache Axis version: 1.4 Built on Apr 22, 2006 (06:55:48 PDT)--> <message name="doProcResponse"> <part name="doProcReturn" type="xsd:int"></part> </message> <message name="doProcRequest"> <part name="seq" type="xsd:string"></part> <part name="userId" type="xsd:string"></part> <part name="type" type="xsd:int"></part> <part name="sign" type="xsd:string"></part> </message> <porttype name="CykProcService"> <operation name="doProc" parameterorder="seq userId type sign"> <input message="impl:doProcRequest" name="doProcRequest"> <output message="impl:doProcResponse" name="doProcResponse"></output> </operation> </porttype> <binding name="CykProcServiceSoapBinding" type="impl:CykProcService"> <binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"></binding> <operation name="doProc"> <operation soapaction=""></operation> <input name="doProcRequest"> <output name="doProcResponse"> <body encodingstyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://client.webservice.mpserver.ptnetwork.com" use="encoded"></body> </output> </operation> </binding> <service name="CykProcServiceService"> <port binding="impl:CykProcServiceSoapBinding" name="CykProcService"> <address location="http://27.148.153.106:9090/mpserver/services/CykProcService"></address> </port> </service> </definitions> </code>
上回有一次调用他们的http接口,也是设置了header才可以(代码见下方),不知道这个soap怎样设置
<code>$ch = curl_init(); curl_setopt ( $ch, CURLOPT_HTTPHEADER, array (//不知道为什么一定要这个他们才能接收到post数据 'content-type: text/html' ));</code>
回复内容:
<code>SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://27.148.153.106:9090/mpserver/services/CykProcService' : Extra content at the end of the document in /Users/haua/Desktop/zuji_web/www/quan.189go.cn/test2.php:47 Stack trace: #0 /Users/haua/Desktop/zuji_web/www/quan.189go.cn/test2.php </code>
上面是报错
<code>$client = new SoapClient("http://27.148.153.106:9090/mpserver/services/CykProcService"); print_r($client->__getFunctions()); </code>
上面是我的代码,下面是wsdl
<code><?xml version="1.0" encoding="UTF-8"?> <definitions targetnamespace="http://client.webservice.mpserver.ptnetwork.com" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://client.webservice.mpserver.ptnetwork.com" xmlns:intf="http://client.webservice.mpserver.ptnetwork.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <!--WSDL created by Apache Axis version: 1.4 Built on Apr 22, 2006 (06:55:48 PDT)--> <message name="doProcResponse"> <part name="doProcReturn" type="xsd:int"></part> </message> <message name="doProcRequest"> <part name="seq" type="xsd:string"></part> <part name="userId" type="xsd:string"></part> <part name="type" type="xsd:int"></part> <part name="sign" type="xsd:string"></part> </message> <porttype name="CykProcService"> <operation name="doProc" parameterorder="seq userId type sign"> <input message="impl:doProcRequest" name="doProcRequest"> <output message="impl:doProcResponse" name="doProcResponse"></output> </operation> </porttype> <binding name="CykProcServiceSoapBinding" type="impl:CykProcService"> <binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"></binding> <operation name="doProc"> <operation soapaction=""></operation> <input name="doProcRequest"> <output name="doProcResponse"> <body encodingstyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://client.webservice.mpserver.ptnetwork.com" use="encoded"></body> </output> </operation> </binding> <service name="CykProcServiceService"> <port binding="impl:CykProcServiceSoapBinding" name="CykProcService"> <address location="http://27.148.153.106:9090/mpserver/services/CykProcService"></address> </port> </service> </definitions> </code>
上回有一次调用他们的http接口,也是设置了header才可以(代码见下方),不知道这个soap怎样设置
<code>$ch = curl_init(); curl_setopt ( $ch, CURLOPT_HTTPHEADER, array (//不知道为什么一定要这个他们才能接收到post数据 'content-type: text/html' ));</code>

php把负数转为正整数的方法:1、使用abs()函数将负数转为正数,使用intval()函数对正数取整,转为正整数,语法“intval(abs($number))”;2、利用“~”位运算符将负数取反加一,语法“~$number + 1”。

实现方法:1、使用“sleep(延迟秒数)”语句,可延迟执行函数若干秒;2、使用“time_nanosleep(延迟秒数,延迟纳秒数)”语句,可延迟执行函数若干秒和纳秒;3、使用“time_sleep_until(time()+7)”语句。

php字符串有下标。在PHP中,下标不仅可以应用于数组和对象,还可应用于字符串,利用字符串的下标和中括号“[]”可以访问指定索引位置的字符,并对该字符进行读写,语法“字符串名[下标值]”;字符串的下标值(索引值)只能是整数类型,起始值为0。

php除以100保留两位小数的方法:1、利用“/”运算符进行除法运算,语法“数值 / 100”;2、使用“number_format(除法结果, 2)”或“sprintf("%.2f",除法结果)”语句进行四舍五入的处理值,并保留两位小数。

在php中,可以使用substr()函数来读取字符串后几个字符,只需要将该函数的第二个参数设置为负值,第三个参数省略即可;语法为“substr(字符串,-n)”,表示读取从字符串结尾处向前数第n个字符开始,直到字符串结尾的全部字符。

判断方法:1、使用“strtotime("年-月-日")”语句将给定的年月日转换为时间戳格式;2、用“date("z",时间戳)+1”语句计算指定时间戳是一年的第几天。date()返回的天数是从0开始计算的,因此真实天数需要在此基础上加1。

方法:1、用“str_replace(" ","其他字符",$str)”语句,可将nbsp符替换为其他字符;2、用“preg_replace("/(\s|\ \;||\xc2\xa0)/","其他字符",$str)”语句。

查找方法:1、用strpos(),语法“strpos("字符串值","查找子串")+1”;2、用stripos(),语法“strpos("字符串值","查找子串")+1”。因为字符串是从0开始计数的,因此两个函数获取的位置需要进行加1处理。


热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

AI Hentai Generator
免费生成ai无尽的。

热门文章

热工具

Dreamweaver CS6
视觉化网页开发工具

螳螂BT
Mantis是一个易于部署的基于Web的缺陷跟踪工具,用于帮助产品缺陷跟踪。它需要PHP、MySQL和一个Web服务器。请查看我们的演示和托管服务。

ZendStudio 13.5.1 Mac
功能强大的PHP集成开发环境

记事本++7.3.1
好用且免费的代码编辑器

DVWA
Damn Vulnerable Web App (DVWA) 是一个PHP/MySQL的Web应用程序,非常容易受到攻击。它的主要目标是成为安全专业人员在合法环境中测试自己的技能和工具的辅助工具,帮助Web开发人员更好地理解保护Web应用程序的过程,并帮助教师/学生在课堂环境中教授/学习Web应用程序安全。DVWA的目标是通过简单直接的界面练习一些最常见的Web漏洞,难度各不相同。请注意,该软件中