Using SoapUi
Last updated
Last updated
This chapter will describe the steps needed to test the Open Smart Grid Platform.
Start SoapUI by double clicking the shortcut on the Desktop or run it manually by typing the following command in a terminal:
Go to File -> Preferences -> SSL Settings, and browse for the KeyStore to /home/dev/Sources/OSGP/Config/certificates/osgp-ca/certs/test-org.pfx
and fill out the password (the password is 1234)
Go to WSDL Settings and check 'Generate Example Values in New Requests' and 'Generate Comments with Type Information in New Requests'
There are several SoapUI project prepared, see /home/dev/Sources/OSGP/Config/soapui/
. Import all SoapUI projects present in the folder mentioned above. Below, 2 projects are shown as examples.
Import the 'admin' project by clicking File -> Import project. Browse to /home/dev/Sources/OSGP/Config/soapui/
, select 'admin-soapui-project.xml' and click open.
Alternatively you can create the 'admin' project yourself by following the steps below:
Create a new SOAP Project and call it 'admin'
Open the Project View by double-clicking on the 'admin' project. Go to 'WS-Security Configurations' and select the 'Keystores' Tab. Click on the '+' to add the test-org.pfx
in /home/dev/Sources/OSGP/Config/certificates/osgp-ca/certs/
Fill out the password (1234) and click Ok and close the Project View window.
Right click the 'admin' project and choose 'Add WSDL'. Enter the following URL in the WSDL Location field:
Make sure the box 'Create sample requests for all operations' is checked, and click OK.
Import the 'public-lighting' project by clicking File -> Import project. Browse to /home/dev/Sources/OSGP/Config/soapui/
, select 'public-lighting-soapui-project.xml' and click open.
Alternatively you can create the 'public-lighting' project yourself by following the steps below:
Open the Project View by double-clicking on the 'public-lighting' project. Go to 'WS-Security Configurations' and select the 'Keystores' Tab. Click on the '+' to add the test-org.pfx
in /home/dev/Sources/OSGP/Config/certificates/osgp-ca/certs/
Right click the 'public-lighting' project and choose 'Add WSDL'. Enter the following URL in the WSDL Location field:
Before sending the request, the test-org.pfx should be added as SSL Keystore: Go to the properties interface for the request (bottom left of the screen, after selecting 'Request 1' under UpdateKey in the 'admin' project'), and choose test-org.pfx
from the drop-down box.
This has to be done for each request!
An SSLD needs to be added to the platform, as well as a manufacturer and a public key for the SSLD. A couple of steps need to be performed to realize this.
1 Add manufacturer 2 Add device model 3 Add SSLD 4 Setup a protocol for the SSLD to use 5 Set the public key for the SSLD (in case of OSLP)
The AddManufacturer function adds a new manufacturer to OSGP. All devices are coupled to a manufacturer.
The AddDeviceModel function adds a new device model to OSGP. All devices are coupled to a device model.
The AddDevice function adds a new SSLD to OSGP. The device is coupled to a device model and a manufacturer.
The function UpdateDeviceProtocol sets a protocol for a device.
The UpdateKey function of the admin webservice sets a public key for a device. Double click 'Request 1' under UpdateKey in the 'admin' project. Add the following request:
After the SSLD has been added, let's see if the function FindAllDevices shows the SSLD. Continue with the FindAllDevices request from the public-lighting project. Since this is not the same project, we have to change the endpoint; in this case in https://localhost:443/osgp-adapter-ws-publiclighting/publiclighting/adHocManagementService/. Do not forget to set the SSL keystore in the Request Properties. Use the following parameters in the request:
In order to be able to use the SSLD-000-00-01 Device, the device needs to be simulated in the Device Simulator. To do this we have to create it. In the Firefox Browser, open the Device Simulator by going to the following URL:
Fill out the fields like this:
Device Identification: SSLD_000-00-01
IP Address: 127.0.0.1
Device Type: SSLD
Protocol: OSLP ELSTER
Now that the Device is known in the platform, and simulated in the Device-Simulator, the device can be used. Let's switch on the Light. Using SoapUI, click on Request 1 under SetLight at the public-lighting project. Set the following parameters in the request (And do not forget to set the Keystore in the request properties):
The last request concerns the response from the previous SetLight request. In SoapUi open Request 1 under 'GetSetLightResponse' in the 'public-lighting' project. Set the following parameters in the request (And the keystore in the request properties). Make sure to replace the CorrelationUid with the value from the respons from the SetLight request.
Do not forget to set the CorrelationUid to value in the response you received from the setLight request.
The server replied Ok, indicicating that the SetLight request has been processed succesfully.
This step also concludes the installation manual.
Create another new SOAP Project and call it 'public-lighting'
Fill out the password (1234) and click Ok and close the Project View window.
Make sure the box 'Create sample requests for all operations' is checked, and click OK.
Click the 'play' button to submit the request to the endpoint. You should receive similar response as shown in the screenshot below:
After the request has been submitted, the response should include the SSLD device with ID SSLD_000_00_01
If you encounter an Untrusted Connection page, go to 'I Understand the Risks' -> Add Exception.. -> Confirm Security Exception
Click Add Device
Click Create Device
You should return to the Devices screen and see the message "Device with identification SSLD_000-00-01 was created."
Now click on the newly created device and click the 'Register Device' button. After a while the message "Device identification with identification SSLD_000-00-01 was registered at XXXXXXXX" appears.
Then click the 'Confirm Registration' button. The message should read: "Device with identification SSLD_000-00-01 was confirmed to be registered."
Submit the request. Take note of the CorrelationUid in the response. You can use this Id in another request to ask the server for the status of this request.
In the home screen of the OSLP device simulator, the lightbulb should light up for SSLD_000-00-01. This means that the request succeeded.