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);
}
Aggregations