我正在使用 node-soap 包来使用以下 SOAP 服务:https ://paymentssuat.mppglobal.com/interface/mpp/ipaypaymentpages/ipaypaymentpages.asmx?wsdl
对于 iPayPaymentPagesSoap 端口,有两个操作名称相同,但参数不同。
使用 describe 函数 node-soap 只显示每个端口类型的最后一个操作。有没有办法选择调用哪个操作?
<wsdl:portType name="iPayPaymentPagesSoap">
<wsdl:operation name="CreateSession">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
Retrieves a Guid from the system populated with details. Used in conjunction with ipayment pages.
</wsdl:documentation>
<wsdl:input name="CreateSessionBySOAP" message="tns:CreateSessionBySOAPSoapIn"/>
<wsdl:output name="CreateSessionBySOAP" message="tns:CreateSessionBySOAPSoapOut"/>
</wsdl:operation>
<wsdl:operation name="CreateSession">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
Retrieves a Guid from the system populated with user details. Used in conjunction with ipayment pages.
</wsdl:documentation>
<wsdl:input name="CreateSessionByGET" message="tns:CreateSessionByGETSoapIn"/>
<wsdl:output name="CreateSessionByGET" message="tns:CreateSessionByGETSoapOut"/>
</wsdl:operation>
</wsdl:portType>
呈现给:
{
iPayPaymentPages: {
iPayPaymentPagesSoap: {
CreateSession: {
input: {
affiliateId: "s:int",
password: "s:string"
},
output: {
CreateSessionByGETResult: {
Guid: "s:string",
ErrorNumber: "s:int",
ErrorMessage: "s:string",
targetNSAlias: "tns",
targetNamespace: "https://secure1.mppglobal.com/interface/ipaypaymentpages/ipaypaymentpages.asmx"
}
}
}
}
}
}
但是,我的目标是将 CreateSession 与 CreateSessionBySOAP 参数一起使用,但 node-soap 默认为 CreateSessionByGET。
*我无法控制 WSDL,并且更愿意不将 SOAP 与 Node.js 一起使用,但在这种情况下我坚持使用它!