我想将 API 与 Soap 结合使用,但遇到了一些问题。
如果我运行我的代码,则会收到此错误消息:
<块引用>合作伙伴 ID 不存在。
但是为什么,当我发送所有参数时?
XML:
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="urn:SedoInterface" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" name="SedoInterface" targetNamespace="urn:SedoInterface">
<types>
<xsd:schema targetNamespace="urn:SedoInterface">
<xsd:complexType name="GetRelatedLinksRequest">
<xsd:complexType name="DomainStatusRequest">
<xsd:all>
<xsd:element name="domainlist" type="tns:ArrayOfString" nillable="true"/>
<xsd:element name="partnerid" type="xsd:int" nillable="true"/>
<xsd:element name="signkey" type="xsd:string" nillable="true"/>
</xsd:all>
</xsd:complexType>
</types> ....
'use strict';
const soap = require('soap');
soap
.createClientAsync('https://api.sedo.com/api/sedointerface.php?wsdl', {endpoint: 'https://api.sedo.com/api/sedointerface.php'})
.then((client) => client.DomainStatus({
name: [{
domainlist: new Array('https://car.com'), Partnerid: xxxxx, Signkey: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
}],
}, (error, result) => {
if (error) {
console.error(error);
}
console.log(result);
}))
.catch( (error) => {
console.error(error);
});