Testing APIs Using WcfStorm

You can use the WcfStorm application as a test workbench for WCF and Web services.

  1. Start the WcfStorm application and navigate to Configuration > Show > Under the hood.

    • If you are working with Web services (.asmx files), select Use Message Contracts, and click OK.

    • If you are working with WCF services (.svc files), clear Use Message Contracts, and click OK.

    Wcf Storm Configuration - Under the hood

  2. In Anthology Student, navigate to Setup > System > File Server & Services and click Configure Web Service Locations.

  3. In the Authentication tab of the Set CampusLink Middle-Tier Web Service Locations form, select and copy (Ctrl+C) the Authentication Web Service URL.

    Note: When testing APIs, the Authentication service always needs to be invoked first to obtain a TokenId for other WCF or Web services.

    Example

    http://CLTQAAPI3:15102/Cmc.CampusLink.WebServices.Security/Authentication.asmx

    Authentication Service URL

  4. In WcfStorm, click File > Service > Add and paste (Ctrl+V) the Authentication Service URL from the clipboard into the service endpoint window.

    WCFStorm Service Endpoint window

  5. Click Run icon to load the Authentication service.

  6. In the left pane, select the GetAuthorizationToken method. Observe the log messages as the method is being invoked.

  7. In the Request pane, specify the following values for the GetAuthorizationToken method:

    • UserName: Specify the user name for the Anthology Student system.

    • Password: Specify the user name for the Anthology Student system.

    • StaffId: A StaffId is required only for API services, such as Degree Audit, that can be invoked by staff or students (via the Web portal). For staff, the StaffId value is 2.

    • TokenNeverExpires: Select True to ensure that your TokenId remains active for subsequent service requests during a session.

    WcfStorm Request TokenId

  8. Click Run icon in the Request pane to send the in-message. The Response pane displays the out-message or an error if the service was not successfully invoked. A successful response displays OK statuses.

  9. In the Response pane, select the TokenId, right-click, and select Copy to clipboard.

    Copy TokenId

  10. Open Notepad and paste (Ctrl+V) the contents of the clipboard into a new file.

  11. In Notepad, select the TokenId value as shown below and copy it to the clipboard (Ctrl+V).

    TokenId in Notepad

  12. In WcfStorm, click File > Service > Add and specify the service endpoint for the method you want to invoke.

    Note: The service must be installed and the endpoint must be configured in Anthology Student. See Configuring API Services.

    Copy and paste the appropriate service URL from the Set CampusLink Middle-Tier Web Service Locations form.

    Example

    http://CLTQAAPI3:15102/Cmc.CampusLink.WebServices/DegreeAuditWebService.asmx

    Note:The server and port information for the selected service, CLTQAAPI3:15102 in our example, must match the server and port information of the Authentication service invoked above.

  13. Click Run icon to load the service. Observe the log messages as the service is being invoked.

  14. Select a method associated with the Web service, for example GetDegreeAudit. The message fields are displayed in the Request pane.

  15. In the Request pane, specify the appropriate values for the selected service.

    Note: Refer to the API documentation for information about required / optional / conditional parameters, default values, message field descriptions, and other related information.

    The following values are required in our example:

    • StudentId: Specify a Student Id value. To obtain the Id, select a student in Anthology Student and right-click the record in the Recent Student list.

    • EnrollId: Specify an Enrollment Id. To obtain the Id, query the database as shown below.

      SQL Query

    • TokenId: Paste in the TokenId from Notepad (see above).

      WcfStorm Request Degree Audit

  16. Click Run icon in the Request pane to send the in-message. The Response pane displays the out-message or an error if the service was not successfully invoked.

    A successful response returns the requested data and shows MessageStatus = OK.

    WcfStorm Response - Degree Audit