Web Services Twinfield请提供有效的soap操作

insrf1ej  于 2022-11-15  发布在  其他
关注(0)|答案(2)|浏览(254)

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>'
hmtdttj4

hmtdttj41#

SoapAction在wsdl文件中。您还需要添加正确的公司代码。
要获得office,正确的api是parserxml,而不是finder。

7bsow1i6

7bsow1i62#

我认为类型应该是“OFF”而不是“offices”,如以下链接的文档中所述:
https://accounting.twinfield.com/webservices/documentation/#/ApiReference/Miscellaneous/Finder

相关问题