【问题标题】:Twinfield Please supply a valid soap actionTwinfield 请提供有效的肥皂动作
【发布时间】:2022-08-17 17:00:30
【问题描述】:

Twinfield SOAP XML Web 服务返回以下错误,我们能否从 wsdl 中找到操作方法( https://api.accounting2.twinfield.com/webservices/finder.asmx?wsdl) 或者我应该给出什么操作方法?

<?xml version=\"1.0\" encoding=\"utf-8\"?>
<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">
    <soap:Body>
        <soap:Fault>
            <faultcode>soap:Client</faultcode>
            <faultstring>Unable to handle request without a valid action parameter. Please supply a valid soap action.</faultstring>
            <detail />
        </soap:Fault>
    </soap:Body>
</soap:Envelope>


curl --location --request POST \'https://api.accounting2.twinfield.com/webservices/finder.asmx?wsdl\' \\
--header \'AccessToken: eyJ0eXAiOiJKV1QiLCJhbGciOiJ...\' \\
--header \'Content-Type: application/xml\' \\
--data-raw \'       <soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:twin=\"http://www.twinfield.com/\">
        <soapenv:Header>
<twin:Header>            <twin:AccessToken>eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1Ni....</twin:AccessToken>
<twin:CompanyCode>
                #####
            </twin:CompanyCode>
               </twin:Header>
             </soapenv:Header>
            
                    <soapenv:Body>
                  
        <twin:ProcessXmlDocument>
         <twin:xmlRequest><list xmlns=\"\"><type>offices</type></list></twin:xmlRequest>
      </twin:ProcessXmlDocument>
     </soapenv:Body>
</soapenv:Envelope>\'

    标签: xml web-services soap twinfield


    【解决方案1】:

    SoapAction 在 wsdl 文件中。此外,您还需要添加正确的公司代码。

    拿到office,正确的api是parserxml,而不是finder

    【讨论】:

      【解决方案2】:

      我认为类型应该是“关闭”而不是“办公室”,如下面链接的文档中所述:

      https://accounting.twinfield.com/webservices/documentation/#/ApiReference/Miscellaneous/Finder

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2018-04-12
        • 1970-01-01
        • 2011-02-10
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-07-29
        • 1970-01-01
        相关资源
        最近更新 更多