Testing with SOAP UITesting without a signed keyA normal „serviceCheck“ request for an instance “Cortex” is configured the following way. | Configured instance of Web Service | |
---|
| | |
The related SOAP UI request looks like this. Code Block |
---|
| <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:int="http://interfaces.webservice.kgs.software.com/">
<soapenv:Header/>
<soapenv:Body>
<int:ServiceCheck>
<!--Optional:-->
<applicationName>Cortex</applicationName>
<!--Optional:-->
<username>David</username>
<!--Optional:-->
<seckey></seckey>
</int:ServiceCheck>
</soapenv:Body>
</soapenv:Envelope> |
Testing with signed keyWe have developed a small tool, “KGS Security Key generator” which generates a signed text which can be used together with SOAP UI. We will use the instance “Cortex” as our example. The installation package contains both a private keystore and public keystore for testing. The “private” keystore contains a keypair consisting of both private and public key whereas the “public” keystore consists of certificate with public key. In case of testing with SOAP UI, you need the file private (keystore) located at “security_testing/keystore” and public (keystore) located at “security_test-ing/keystore”. | WebService MainConfiguration | |
---|
| | |
The password for the “public” keystore is “public” (without quotes). Configure the alias “kgs” which is already present in our test (public) keystore. Main -> KGS WebService -> Application Manager Edit the instance “Cortex” and go to the security tab.
| Opened “Cortex” configuration | |
---|
| | |
Save the configuration. As of now, the instance “Cortex” is ready to receive a signed text (in our case is the Application’s name which is ‘Cortex’) Generate a signed text by starting the “KGS Security Key generator”. Simply, double-click the “generator.jar” located at “security_testing/”. A window will open. Password for the pri-vate keystore is “private” (without quotes). Please enter as shown below.
| Screenshot of “KGS Security Key generator” | |
---|
| | |
In this case, the text will be signed by the private key mapped against the alias “kgs” in the private keystore. | Display of signed text. | |
---|
| | |
| Screenshot of SOAP UI with added seckey | |
---|
| | |
| Screenshot of ServiceCheck result | |
---|
| | |
Testing MTOM with SOAP UIPlease follow the following steps to send an attachment using MTOM; We assume that the MTOM interfaces (located at http://Server-IP-Address:Server-Port/WebApplicationName/ webservice/apiV2?wsdl) have been configured in the SOAP UI Select the “ContentServerDocCreate” interface Configure the tag “imageData” with the following format; <imageData>cid:Name -Of-The-File-With-Extension</imageData> Click on the ‘Plus’ sign as shown below.
| Highlighted Plus-button in SOAP UI | |
---|
| | |
| Highlighted “Part”-column in SOAP UI | |
---|
| | |
| Selected attachment in SOAP UI | |
---|
| | |
|