Calling the CGT Report Operation
Postman App
The CGiX SOAP API guides illustrate how to call the web service using the Postman app.
1. Creating the Request
Depending on the CGiX installation, the URL to the reports web service will be something like https://fslpresaleswif.fslcgix-uat.co.uk/report.asmx.
Launch Postman and create a new request.
Fill in the request as follows:
- Change the
HTTP verb
from GET to POST. - Specify the
URL
to the CGiX reports web service i.e., https://fslpresaleswif.fslcgix-uat.co.uk/report.asmx - Click on the
Body
tab and then the raw option. - Change the
content type
to XML; the dropdown is found to the right of the raw option and defaults to Text. - Click on the
Headers
tab and if the headers are hidden, click on β8 hiddenβ to unhide. - Override the auto-generated
Content-Type
header by adding another header with keyContent-Type
and valuetext/xml
.
- Paste in your SOAP XML as the request body i.e.,
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<AuthenticationHeader xmlns="http://www.CGiX.co.uk/Reports">
<Username>testuser</Username>
<Password>Pa55word</Password>
<Company>FSL</Company>
</AuthenticationHeader>
</soap:Header>
<soap:Body>
<Report_CGT xmlns="http://www.CGiX.co.uk/Reports">
<clientID>JF20001</clientID>
<companyID>FSL</companyID>
<startDate>2017-04-06</startDate>
<endDate>2018-04-05</endDate>
</Report_CGT>
</soap:Body>
</soap:Envelope>
The important details to amend are:
- The SOAP header contains an AuthenticationHeader section; ensure a valid CGiX login is provided.
- The SOAP body is where the client and report details are specified.
The above example was created by navigating to https://fslpresaleswif.fslcgix-uat.co.uk/report.asmx?op=Report_CGT, copying then amending the XML template.
2. Sending the Request
The prepared request should look like the below.
Click the Send button.
3. The Response Message
Postman should receive a response message. Clicking on the Pretty tab can make the XML response easier to read.
WSDL Reference
The WSDL for the reports web service can be found by appending ?WSDL to the URL i.e., https://fslpresaleswif.fslcgix-uat.co.uk/report.asmx?WSDL.
Updated about 1 year ago