SOAP错误:解析WSDL:无法绑定到服务

通过初始化SoapClient提交数据(向其中一种)荷兰养老基金,它返回错误:

  

SOAP错误:解析WSDL:无法绑定到服务。

很遗憾,我无法从该站点获得足够的技术支持。目前,我正在测试WSDL。我的服务器IP地址需要列入白名单,这似乎至少要读取WSDL。另外,似乎用户名/密码是正确的。

有人对错误的含义有任何建议吗?我添加了位置网址,但不确定100%是否正确。可能是这个吗?也许还有其他建议?

$UPA_wsdl =  "https://upa-ws-swo.tkppensioen.nl/ws/upa.wsdl";
$UPA_un = "TSTUPAEXT3";   
$UPA_pw = "wE{vyRVKe";                              

$params = array (
    'login' => $UPA_un,'password' => $UPA_pw,'encoding' => 'UTF-8','verifypeer' => false,'verifyhost' => false,'soap_version' => SOAP_1_1,'trace' => 1,'exceptions' => 1,'features'=>SOAP_WAIT_ONE_WAY_CALLS,'location' => "http://www.pensioenfederatie.nl/uniformePensioenAangifte/2015/05/WS"
);

try {
    $client = new SoapClient($UPA_wsdl,$params);   
} catch (SoapFault $client) {
    echo $client->getMessage();

    OutputXML($client->__getLastRequest(),true);   
}

服务的wsdl看起来像这样;

<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://www.pensioenfederatie.nl/uniformePensioenAangifte/2015/05/WS" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="UPAServiceO" targetNamespace="http://www.pensioenfederatie.nl/uniformePensioenAangifte/2015/05/WS">
<xsd:annotation>
<xsd:documentation>-- Versie informatie --</xsd:documentation>
<xsd:documentation>Versie 2019:</xsd:documentation>
<xsd:documentation>
- nieuwe versie gemaakt; Nu UTF-8 encoding,verder geen wijzigingen
</xsd:documentation>
<xsd:documentation>Versie 2018:</xsd:documentation>
<xsd:documentation> - nieuwe versie gemaakt; verder niks</xsd:documentation>
<xsd:documentation>Versie 2017:</xsd:documentation>
<xsd:documentation>
- Idber als optioneel veld toegevoegd bij OntvangberichtAlsZIP
</xsd:documentation>
<xsd:documentation>Versie 0.95: september 2015:</xsd:documentation>
<xsd:documentation> - Initiele versie</xsd:documentation>
</xsd:annotation>
<wsdl:types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.pensioenfederatie.nl/uniformePensioenAangifte/2015/05/WS">
<xs:element name="ZendberichtAlsZIP">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" name="idLcr" nillable="false" type="xs:string"/>
<xs:element minOccurs="1" name="idber" nillable="false" type="xs:string"/>
<xs:element minOccurs="1" name="berichtZIP" nillable="false" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ZendberichtAlsZIPResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" name="ZendberichtAlsZIPResult" nillable="false" type="tns:StatusResponseType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="StatusResponseType">
<xs:sequence>
<xs:element name="Status" nillable="false" type="xs:string"/>
<xs:element minOccurs="0" name="Foutmelding" nillable="false" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:element name="StatusResponseType" nillable="false" type="tns:StatusResponseType"/>
<xs:element name="OntvangberichtAlsZIP">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" name="idLcr" nillable="false" type="xs:string"/>
<xs:element minOccurs="0" name="idber" nillable="false" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="OntvangberichtAlsZIPResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" name="OntvangberichtAlsZIPResult" nillable="false" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
<xs:schema xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/" xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/">
<xs:element name="anyType" nillable="true" type="xs:anyType"/>
<xs:element name="anyURI" nillable="true" type="xs:anyURI"/>
<xs:element name="base64Binary" nillable="true" type="xs:base64Binary"/>
<xs:element name="boolean" nillable="true" type="xs:boolean"/>
<xs:element name="byte" nillable="true" type="xs:byte"/>
<xs:element name="dateTime" nillable="true" type="xs:dateTime"/>
<xs:element name="decimal" nillable="true" type="xs:decimal"/>
<xs:element name="double" nillable="true" type="xs:double"/>
<xs:element name="float" nillable="true" type="xs:float"/>
<xs:element name="int" nillable="true" type="xs:int"/>
<xs:element name="long" nillable="true" type="xs:long"/>
<xs:element name="QName" nillable="true" type="xs:QName"/>
<xs:element name="short" nillable="true" type="xs:short"/>
<xs:element name="string" nillable="true" type="xs:string"/>
<xs:element name="unsignedByte" nillable="true" type="xs:unsignedByte"/>
<xs:element name="unsignedInt" nillable="true" type="xs:unsignedInt"/>
<xs:element name="unsignedLong" nillable="true" type="xs:unsignedLong"/>
<xs:element name="unsignedShort" nillable="true" type="xs:unsignedShort"/>
<xs:element name="char" nillable="true" type="tns:char"/>
<xs:simpletype name="char">
<xs:restriction base="xs:int"/>
</xs:simpletype>
<xs:element name="duration" nillable="true" type="tns:duration"/>
<xs:simpletype name="duration">
<xs:restriction base="xs:duration">
<xs:pattern value="\-?P(\d*D)?(T(\d*H)?(\d*M)?(\d*(\.\d*)?S)?)?"/>
<xs:minInclusive value="-P10675199DT2H48M5.4775808S"/>
<xs:maxInclusive value="P10675199DT2H48M5.4775807S"/>
</xs:restriction>
</xs:simpletype>
<xs:element name="guid" nillable="true" type="tns:guid"/>
<xs:simpletype name="guid">
<xs:restriction base="xs:string">
<xs:pattern value="[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}"/>
</xs:restriction>
</xs:simpletype>
<xs:attribute name="FactoryType" type="xs:QName"/>
<xs:attribute name="Id" type="xs:ID"/>
<xs:attribute name="Ref" type="xs:IDREF"/>
</xs:schema>
</wsdl:types>
<wsdl:message name="UPAWebService_ZendberichtAlsZIP_InputMessage">
<wsdl:part element="tns:ZendberichtAlsZIP" name="parameters"/>
</wsdl:message>
<wsdl:message name="UPAWebService_ZendberichtAlsZIP_OutputMessage">
<wsdl:part element="tns:ZendberichtAlsZIPResponse" name="parameters"/>
</wsdl:message>
<wsdl:message name="UPAWebService_OntvangberichtAlsZIP_InputMessage">
<wsdl:part element="tns:OntvangberichtAlsZIP" name="parameters"/>
</wsdl:message>
<wsdl:message name="UPAWebService_OntvangberichtAlsZIP_OutputMessage">
<wsdl:part element="tns:OntvangberichtAlsZIPResponse" name="parameters"/>
</wsdl:message>
<wsdl:portType name="UPAWebService">
<wsdl:operation name="ZendberichtAlsZIP">
<wsdl:input message="tns:UPAWebService_ZendberichtAlsZIP_InputMessage" wsaw:action="http://www.pensioenfederatie.nl/uniformePensioenAangifte/2015/05/WS/UPAWebService/ZendberichtAlsZIP"/>
<wsdl:output message="tns:UPAWebService_ZendberichtAlsZIP_OutputMessage" wsaw:action="http://www.pensioenfederatie.nl/uniformePensioenAangifte/2015/05/WS/UPAWebService/ZendberichtAlsZIPResponse"/>
</wsdl:operation>
<wsdl:operation name="OntvangberichtAlsZIP">
<wsdl:input message="tns:UPAWebService_OntvangberichtAlsZIP_InputMessage" wsaw:action="http://www.pensioenfederatie.nl/uniformePensioenAangifte/2015/05/WS/UPAWebService/OntvangberichtAlsZIP"/>
<wsdl:output message="tns:UPAWebService_OntvangberichtAlsZIP_OutputMessage" wsaw:action="http://www.pensioenfederatie.nl/uniformePensioenAangifte/2015/05/WS/UPAWebService/OntvangberichtAlsZIPResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="BasicHttpBinding_UPAWebService" type="tns:UPAWebService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="ZendberichtAlsZIP">
<soap:operation soapaction="http://www.pensioenfederatie.nl/uniformePensioenAangifte/2015/05/WS/UPAWebService/ZendberichtAlsZIP" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="OntvangberichtAlsZIP">
<soap:operation soapaction="http://www.pensioenfederatie.nl/uniformePensioenAangifte/2015/05/WS/UPAWebService/OntvangberichtAlsZIP" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
</wsdl:definitions>
book1841 回答:SOAP错误:解析WSDL:无法绑定到服务

我认为您的问题与此相同:PHP-EWS Error: Couldn't bind to service

您需要在您的WSDL中添加一个wsdl:service定义。

本文链接:https://www.f2er.com/3108943.html

大家都在问