Site Tools


guides:sample_web_service_project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
guides:sample_web_service_project [2018/10/26 22:21] brett.zamoraguides:sample_web_service_project [2018/10/26 23:02] (current) brett.zamora
Line 1: Line 1:
 ===== CeRTNA Sample Web Service Project ===== ===== CeRTNA Sample Web Service Project =====
  
-CeRTNA has uploaded a sample Visual Studio 2015 C# project that provides a high-level demonstration of how to call the CeRTNA web services. The project can be downloaded by clicking this link: (ChecksumTool Project)+CeRTNA has uploaded a sample Visual Studio 2015 C# project that provides a high-level demonstration of how to call the CeRTNA web services.
  
-The project uses the following NuGet packages, which you will need to install in your Visual Studio setup, if you do not already have them installed:+**Disclaimer:** This sample project is provided as is for reference purposes only. It is not intended to represent production quality code.
  
-Newtonsoft.Json +The application demonstrates functions like: 
-RestSharp+ 
 +  * Obtaining the value of a Base64 document string from an XML file. 
 +  * Calculating a SHA384 Hash and converting the hash to a Base64 string. 
 +  * Logging in to obtain a soft-token for use with the various web services. 
 +  * Calling StoreChecksum web service to store a checksum value. 
 +  * Calling the ValidateChecksum web service to validate a checksum value. 
 + 
 + 
 +The project can be downloaded by clicking this link: ({{guides:checksumtool.zip|Checksum Tool}}) 
 + 
 +The ChecksumTool project uses the following NuGet packages, which you will need to install into your Visual Studio setup, if you do not already have them installed: 
 + 
 +  * Newtonsoft.Json 
 +  RestSharp
  
 The project uses the Windows Presentation Foundation (WPF) classes for the UI. The project uses the Windows Presentation Foundation (WPF) classes for the UI.
Line 12: Line 25:
 Following is a brief outline of how to use the tool: Following is a brief outline of how to use the tool:
  
 +After starting the tool, the following UI will be displayed:
 +
 +
 +{{ :guides:images:checksum_tool.png |}}
 +
 +
 +To use the tool, the typical order of steps would be:
  
 +{{tablelayout?colwidth="200px,400px"&rowsFixed=1&rowsVisible=10&float=center}}
 +^ Step ^ Comment ^
 +| Enter User Name & PW | These are special web service user accounts provided to you by CeRTNA. |
 +| Select/Load an XML file | You can use a REQUEST or RESPONSE file. |
 +| Enter a Doc Seq# | This identies which Doc Seq# contained in the XML file that you wish to work with. |
 +| Click the Calculate button | The SHA3 checksum is calculated and displayed in the Base64 Document Checksum field. |
 +| Click the Store button | The calculated checksum is stored in the CeRTNA Portal and a Checksum Key is returned and displayed in the Base64 Document Checksum Key field. |
 +| Click the Validate button | The ChecksumKey and Checksum values displayed on the form are used to validate the locally calculated checksum value against the stored value in the database. |
 +| Click the Reset button | This clears the form fields. |
  
  
 +**Note:** The Checksum Value field is unprotected so that you can modify the checksum value manually to test the negative result of the ValidateChecksum flow.
  
  
 +There are plenty of other tools available for testing web services as well. One of the tools CeRTNA works with is POSTMAN. You can download a free version of POSTMAN from the following URL: https://www.getpostman.com/apps
  
-{{ :guides:images:web_service_architecture.png |}} 
  
-To receive a 'soft-token' you must successfully authenticate. Once you have successfully authenticated, you will receive a 'soft-token' that can be used for subsequent web service calls. Your 'soft-token' is valid for the duration of your SSL session. 
guides/sample_web_service_project.1540592511.txt.gz · Last modified: by brett.zamora