s FIS CodeConnect

Testing in Postman

Using Postman for POST

The following will guide you to test an API using a third-party software. This is useful for debugging an API that isn't giving back a response or if you want to quickly check on the response. We'll be using Postman as the third-party application. This guide assumes that you already have an application created and an API that you are attempting to obtain a response from.

If you do not have an application, please refer to the Getting Started guide. If you need to know how to test an API within the API Console, please refer to the Test REST Service guide.

As an example, we'll be testing the Customer API. Each section has been provided with an instructional video to assist you in following the instructions.

  1. First, we'll need to retrieve the sample data for POST /customers. Since using Postman is mainly for debugging purposes, you will need to have an API you are trying to retrieve a response from. Because you are using mocked data, this response will always work. For now, we will pretend that you are not receiving the correct response.

    In the Customer API, go to Documentation Tab > Samples > Create Customer View Content and copy the sample data. Paste it into the newCustomer field. Put 5100 in the feId field. Click Try it Out!

    Multiple text boxes should appear. Copy the URL you see under Request URL.

  2. Click on Authorization tab and make sure that Type is set to No Auth.

  3. Back to POST /customers, look at the CURL Response. You will see that --header appears four times. This means that there are four HTTP headers required for this call. These headers are Content-Type, Accept, feId, and Authorization. We'll be listing these headers in Postman.

    Going back to Postman, click on the Headers tab. HTTP headers are case-sensitive. Under Key should be the header names: Content-Type, Accept, feId, and Authorization. Under Value should be their values. Look at the following screenshot to make sure they've been typed in correctly.

  4. Go to the Body tab, make sure that you've selected the raw radio button, and paste in the input that would have gone in the API Console. If you don't have this, you can go to Documentation > Samples > View Content in the Create Customer row. Copy that sample information and paste it in.

  5. Click Send and you should receive the ipId in the Body tab.

    If your API call still does not work, then you will need to contact Code Connect support. The email to contact is at the bottom of this page.

    Using Postman for GET

    You can also try to use the GET /customers/{customerId} function to retrieve the customer details. The steps are the same. Open a new tab in Postman, make sure that the call is set to GET, copy in the appropriate Request URL, retrieve the correct HTTP headers, and then click Send.

    Below is what the call should look like after you have clicked Send.

    If you need help, please contact Code Connect Support and we will assist you as soon as possible.

Test SOAP Service

The following will guide you to test a desired Soap/XML-based API outside of FIS Code Connect with tools such as SoapUI or Postman.

    Selecting the WSDL

  1. Once you have determined the API to test, download the WSDLs zip file and extract to your desired location.

    Make note of the WSDL that corresponds to the particular service that you will be testing and importing into SoapUI. The WSDLs typically reside in a folder called "interfaces".

  2. Importing WSDL into SoapUI

  3. After launching SoapUI select File - New SOAP Project from the menu bar. Click the browse button and select the desired WSDL.

    Once the new project is created there will be a corresponding entry on the left window pane containing an empty sample xml Request 1.

  4. Getting Your Sample XML

  5. The sample XML to test with can be retrieved by clicking on the Samples link in the Service List tab for the specific service that you are testing with.

    Once the Sample XML pops up in another window save it (cntl + S) to a desired location and open it up with your preferred XML editor (XmlSpy, XmlPad, Notepad, etc.).

    Copy the content from the xml editor and overlay it in Request 1 from SoapUI.

  6. Getting the Endpoint URL

  7. The endpoint URL can be found by clicking the Try Out button on the Services List tab.

    The URLs are located in the Resource URL section. Any of the URLs will work, but it's up to your implementation to choose which one makes sense.

    Copy the desired Resource URL and click the URL drop down in SoapUI and select [add new endpoint..]. Paste the copied endpoint and click OK.

  8. Getting the Header Parameters

  9. The Header Parameters can be found by clicking the Try Out button on the Services List tab.

    The Header Parameters are located in the Set Request Header section. If you don't have an Authorization key, get it from the API Console.

    Set the headers in SoapUI.

    Once the headers are defined, click on the green play button to run the test in SoapUI. A successful response should be displayed.