Javascript 节点SOAP如何随请求发送参数/参数

Javascript 节点SOAP如何随请求发送参数/参数,javascript,xml,node.js,soap,node-soap,Javascript,Xml,Node.js,Soap,Node Soap,我正在对服务进行soap调用,但无法确定如何正确格式化和发送要使用的client.method的参数 client.descripe()提供了以下信息: { SysGestAgentApi: { SysGestAgentApiSoapPort: { EXECSQL: [Object] …还有更多,但是这个EXECSQL是我想要使用的方法。 此方法将SQL查询作为字符串的唯一参数 我尝试的是: var soap = require('soap'); var url = 'h

我正在对服务进行soap调用,但无法确定如何正确格式化和发送要使用的
client.method
的参数

client.descripe()
提供了以下信息:

{ SysGestAgentApi: 
   { SysGestAgentApiSoapPort: 
      { EXECSQL: [Object]
…还有更多,但是这个EXECSQL是我想要使用的方法。 此方法将SQL查询作为字符串的唯一参数

我尝试的是:

var soap = require('soap');
var url = 'http://ipaddress:port/sysgestagentapi/SysGestAgentApi.WSDL';
var args = 'SELECT * FROM _33NWEB';

soap.createClient(url, function(err, client) {
    client.SysGestAgentApi.SysGestAgentApiSoapPort.EXECSQL(args, function(err, result) {
        console.log(result.toJSON());
    });
});
它不断响应错误XML,如下所示:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<SOAP-ENV:Envelope
    xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema"
    xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:SOAPSDK3="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <SOAP-ENV:Fault>
            <faultcode>SOAP-ENV:Server</faultcode>
            <faultstring>WSDLReader:None of the matching operations for soapAction http://tempuri.org/SysGestAgentApi/action/SysGestAgentApi.VERSIUNE could successfully load the incoming request. Potential typemapper problem</faultstring>
            <detail>
                <mserror:errorInfo
                    xmlns:mserror="http://schemas.microsoft.com/soap-toolkit/faultdetail/error/">
                    <mserror:returnCode>-2147024809 : The parameter is incorrect.\r\n</mserror:returnCode>
                    <mserror:serverErrorInfo>
                        <mserror:description>WSDLReader:None of the matching operations for soapAction http://tempuri.org/SysGestAgentApi/action/SysGestAgentApi.VERSIUNE could successfully load the incoming request. Potential typemapper problem HRESULT=0x80070057: The parameter is incorrect.\r\n - Server:One of the parameters supplied is invalid. HRESULT=0x80070057: The parameter is incorrect.\r\n</mserror:description>
                        <mserror:source>WSDLReader</mserror:source>
                    </mserror:serverErrorInfo>
                    <mserror:callStack>
                        <mserror:callElement>
                            <mserror:component>WSDLReader</mserror:component>
                            <mserror:description>None of the matching operations for soapAction http://tempuri.org/SysGestAgentApi/action/SysGestAgentApi.VERSIUNE could successfully load the incoming request. Potential typemapper problem</mserror:description>
                            <mserror:returnCode>-2147024809 : The parameter is incorrect.\r\n</mserror:returnCode>
                        </mserror:callElement>
                        <mserror:callElement>
                            <mserror:component>Server</mserror:component>
                            <mserror:description>One of the parameters supplied is invalid.</mserror:description>
                            <mserror:returnCode>-2147024809 : The parameter is incorrect.\r\n</mserror:returnCode>
                        </mserror:callElement>
                    </mserror:callStack>
                </mserror:errorInfo>
            </detail>
        </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
它用一个包含查询结果的xml进行响应

我不知道我做错了什么,也不知道如何正确发送EXECSQL方法的参数


任何帮助都将不胜感激

您应该获得请求和响应结构,像下面这样打印console.log(JSON.stringify(client.descripe());我确实得到了这个结构,我在这个问题的开头贴了一部分。它的响应如下:{SYSGETAGENTAPI:{SYSGETAGENTAPISOAPPORT:{EXECSQL:[对象]…问题是它不接受我从客户端服务发送到我正在使用的方法的字符串参数。它不断响应,并显示错误“参数格式不正确”。我不知道在创建参数对象时我缺少了什么。但是对象在这里没有展开,请使用JSON.stringify和Print。还有,为什么输入字符串在花括号中?它不会编译。我也尝试过在没有花括号的情况下使用它,它给了我相同的错误。错误在我上面粘贴的XML中。我绝对肯定,这是与客户端,问题是args格式。它不断给我“2147024809:参数不正确。”
$client = new SoapClient($url);
$response_xml_2 = $client->EXECSQL("SELECT * FROM _33NWEB");