An error occurs when php calls the soap interface

WBOY
Release: 2016-10-11 14:23:28
Original
1124 people have browsed it

<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>
Copy after login
Copy after login

The above is an error message

<code>$client = new SoapClient("http://27.148.153.106:9090/mpserver/services/CykProcService");
print_r($client->__getFunctions());
</code>
Copy after login
Copy after login

The above is my code, the following is the wsdl

<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>
Copy after login
Copy after login

The last time I called their http interface, I also set the header (see the code below). I don’t know how to set up this soap

<code>$ch = curl_init();
curl_setopt ( $ch, CURLOPT_HTTPHEADER, array (//不知道为什么一定要这个他们才能接收到post数据
    'content-type: text/html'
));</code>
Copy after login
Copy after login

Reply content:

<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>
Copy after login
Copy after login

The above is an error message

<code>$client = new SoapClient("http://27.148.153.106:9090/mpserver/services/CykProcService");
print_r($client->__getFunctions());
</code>
Copy after login
Copy after login

The above is my code, the following is the wsdl

<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>
Copy after login
Copy after login

The last time I called their http interface, I also set the header (see the code below). I don’t know how to set up this soap

<code>$ch = curl_init();
curl_setopt ( $ch, CURLOPT_HTTPHEADER, array (//不知道为什么一定要这个他们才能接收到post数据
    'content-type: text/html'
));</code>
Copy after login
Copy after login
Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template