<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
立即学习“PHP免费学习笔记(深入)”;
<code><?xml version="1.0" encoding="UTF-8"?>
<wsdl: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)-->
<wsdl:message name="doProcResponse">
<wsdl:part name="doProcReturn" type="xsd:int"/>
</wsdl:message>
<wsdl:message name="doProcRequest">
<wsdl:part name="seq" type="xsd:string"/>
<wsdl:part name="userId" type="xsd:string"/>
<wsdl:part name="type" type="xsd:int"/>
<wsdl:part name="sign" type="xsd:string"/>
</wsdl:message>
<wsdl:portType name="CykProcService">
<wsdl:operation name="doProc" parameterOrder="seq userId type sign">
<wsdl:input message="impl:doProcRequest" name="doProcRequest"/>
<wsdl:output message="impl:doProcResponse" name="doProcResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="CykProcServiceSoapBinding" type="impl:CykProcService">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="doProc">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="doProcRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://client.webservice.mpserver.ptnetwork.com" use="encoded"/>
</wsdl:input>
<wsdl:output name="doProcResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://client.webservice.mpserver.ptnetwork.com" use="encoded"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="CykProcServiceService">
<wsdl:port binding="impl:CykProcServiceSoapBinding" name="CykProcService">
<wsdlsoap:address location="http://27.148.153.106:9090/mpserver/services/CykProcService"/>
</wsdl:port>
</wsdl:service>
</wsdl: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
立即学习“PHP免费学习笔记(深入)”;
<code><?xml version="1.0" encoding="UTF-8"?>
<wsdl: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)-->
<wsdl:message name="doProcResponse">
<wsdl:part name="doProcReturn" type="xsd:int"/>
</wsdl:message>
<wsdl:message name="doProcRequest">
<wsdl:part name="seq" type="xsd:string"/>
<wsdl:part name="userId" type="xsd:string"/>
<wsdl:part name="type" type="xsd:int"/>
<wsdl:part name="sign" type="xsd:string"/>
</wsdl:message>
<wsdl:portType name="CykProcService">
<wsdl:operation name="doProc" parameterOrder="seq userId type sign">
<wsdl:input message="impl:doProcRequest" name="doProcRequest"/>
<wsdl:output message="impl:doProcResponse" name="doProcResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="CykProcServiceSoapBinding" type="impl:CykProcService">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="doProc">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="doProcRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://client.webservice.mpserver.ptnetwork.com" use="encoded"/>
</wsdl:input>
<wsdl:output name="doProcResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://client.webservice.mpserver.ptnetwork.com" use="encoded"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="CykProcServiceService">
<wsdl:port binding="impl:CykProcServiceSoapBinding" name="CykProcService">
<wsdlsoap:address location="http://27.148.153.106:9090/mpserver/services/CykProcService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
</code>上回有一次调用他们的http接口,也是设置了header才可以(代码见下方),不知道这个soap怎样设置
<code>$ch = curl_init();
curl_setopt ( $ch, CURLOPT_HTTPHEADER, array (//不知道为什么一定要这个他们才能接收到post数据
'content-type: text/html'
));</code>
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号