Search in sources :

Example 1 with FindAllDevicesRequest

use of org.opensmartgridplatform.adapter.ws.schema.publiclighting.adhocmanagement.FindAllDevicesRequest in project open-smart-grid-platform by OSGP.

the class OsgpPublicLightingClientSoapService method findAllDevicesRequest.

/**
 * Creates a WebServiceTemplate with a FindAllDevices Request using the SoapRequestHelper class.
 * Sends the request to the Platform, and returns the List with Devices from the Response (after
 * it is converted by Orika).
 *
 * @return a list of devices
 */
public List<org.opensmartgridplatform.webdemoapp.domain.Device> findAllDevicesRequest() {
    final FindAllDevicesRequest findAllDevicesRequest = new FindAllDevicesRequest();
    final WebServiceTemplate template = this.soapRequestHelper.createPublicLightingRequest();
    final FindAllDevicesResponse response = (FindAllDevicesResponse) template.marshalSendAndReceive(findAllDevicesRequest);
    return this.publicLightingAdHocMapperFacade.mapAsList(response.getDevicePage().getDevices(), org.opensmartgridplatform.webdemoapp.domain.Device.class);
}
Also used : FindAllDevicesRequest(org.opensmartgridplatform.adapter.ws.schema.publiclighting.adhocmanagement.FindAllDevicesRequest) WebServiceTemplate(org.springframework.ws.client.core.WebServiceTemplate) FindAllDevicesResponse(org.opensmartgridplatform.adapter.ws.schema.publiclighting.adhocmanagement.FindAllDevicesResponse)

Aggregations

FindAllDevicesRequest (org.opensmartgridplatform.adapter.ws.schema.publiclighting.adhocmanagement.FindAllDevicesRequest)1 FindAllDevicesResponse (org.opensmartgridplatform.adapter.ws.schema.publiclighting.adhocmanagement.FindAllDevicesResponse)1 WebServiceTemplate (org.springframework.ws.client.core.WebServiceTemplate)1