21,886
社区成员
发帖
与我相关
我的任务
分享
$client = new Soap_Client("http://172.16.33.26/purchase/Service1.asmx?wsdl");
我这样调用错误。
<?xml version="1.0" encoding="utf-8" ?>
- <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
- <wsdl:types>
- <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
- <s:element name="Invoice">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="kprqq" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="kprqz" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="SAPNUMBER" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="InvoiceResponse">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="InvoiceResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
- <wsdl:message name="InvoiceSoapIn">
<wsdl:part name="parameters" element="tns:Invoice" />
</wsdl:message>
- <wsdl:message name="InvoiceSoapOut">
<wsdl:part name="parameters" element="tns:InvoiceResponse" />
</wsdl:message>
- <wsdl:portType name="Service1Soap">
- <wsdl:operation name="Invoice">
<wsdl:input message="tns:InvoiceSoapIn" />
<wsdl:output message="tns:InvoiceSoapOut" />
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="Service1Soap" type="tns:Service1Soap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="Invoice">
<soap:operation soapAction="http://tempuri.org/Invoice" style="document" />
- <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:binding name="Service1Soap12" type="tns:Service1Soap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="Invoice">
<soap12:operation soapAction="http://tempuri.org/Invoice" style="document" />
- <wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="Service1">
- <wsdl:port name="Service1Soap" binding="tns:Service1Soap">
<soap:address location="http://172.16.33.26/purchase/Service1.asmx" />
</wsdl:port>
- <wsdl:port name="Service1Soap12" binding="tns:Service1Soap12">
<soap12:address location="http://172.16.33.26/purchase/Service1.asmx" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
方法
Array
(
[0] => InvoiceResponse Invoice(Invoice $parameters)
[1] => InvoiceResponse Invoice(Invoice $parameters)
)
数据结构
Array
(
[0] => struct Invoice {
string kprqq;
string kprqz;
string SAPNUMBER;
}
[1] => struct InvoiceResponse {
string InvoiceResult;
}
)
有什么问题请直说$client = new SoapClient($this->serviceUrl);
错误:SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://172.16.33.26/purchase/Service1.asmx?wsdl' : failed to load external entity "http://172.16.33.26/purchase/Service1.asmx?wsdl"