簡體   English   中英

Twinfield 請提供有效的 soap 動作

[英]Twinfield Please supply a valid soap action

Twinfield SOAP XML Web service is returning the following error, Can we find the action method from wsdl ( https://api.accounting2.twinfield.com/webservices/finder.asmx?wsdl ) or what action method shall I give?

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

SoapAction 在 wsdl 文件中。 此外,您還需要添加正確的公司代碼。

拿到辦公室,正確的api是parserxml,而不是finder

我認為類型應該是“關閉”而不是“辦公室”,如下面鏈接的文檔中所述:

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM