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:

  1. Change the HTTP verb from GET to POST.
  2. Specify the URL to the CGiX reports web service i.e., https://fslpresaleswif.fslcgix-uat.co.uk/report.asmx
  3. Click on the Body tab and then the raw option.
  4. Change the content type to XML; the dropdown is found to the right of the raw option and defaults to Text.
  5. Click on the Headers tab and if the headers are hidden, click on β€˜8 hidden’ to unhide.
  6. Override the auto-generated Content-Type header by adding another header with key Content-Type and value text/xml.
Headers

Request headers in Postman

  1. 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.

CGT Report WSDL Operation

CGT Report WSDL Operation

2. Sending the Request

The prepared request should look like the below.

Request prepared in Postman

Request prepared in Postman

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.

Response received in Postman

Response received in Postman

πŸ“˜

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.