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

时间:2019-11-13 15:13:43

标签: php 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>

1 个答案:

答案 0 :(得分:0)

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

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