Calling the What If Full Result 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 What If web service will be something like https://fslpresaleswif.fslcgix-uat.co.uk/whatif.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 What If web service i.e., https://fslpresaleswif.fslcgix-uat.co.uk/whatif.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/WhatIf">
<Username>testuser</Username>
<Password>Pa55word</Password>
<Company>FSL</Company>
</AuthenticationHeader>
</soap:Header>
<soap:Body>
<GetFullWhatIfResults xmlns="http://www.CGiX.co.uk/WhatIf">
<wifClients>
<Client>
<ClientIDCode>JF20001</ClientIDCode>
<DisposalDate>2019-04-12T00:00:00</DisposalDate>
<Disposal>
<SEDOL>JFC0001</SEDOL>
<TransactionType>sale</TransactionType>
<Shares>100</Shares>
<Proceeds>500</Proceeds>
</Disposal>
</Client>
</wifClients>
</GetFullWhatIfResults>
</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 disposal details are specified.
The above example was created by navigating to https://fslpresaleswif.fslcgix-uat.co.uk/whatif.asmx?op=GetFullWhatIfResults, 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.
Updated about 1 year ago