'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>'
Solution 1:[1]
SoapAction is in wsdl file. Also you need to add correct companycode as well.
To get offices, the right api is parserxml, rather finder
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Muhammad Azhar Shahzad |
