use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetMbusEncryptionKeyStatusAsyncResponse in project open-smart-grid-platform by OSGP.
the class GetMbusEncryptionKeyStatusSteps method aGetMbusEncryptionKeyStatusRequestIsReceived.
@When("^a get M-Bus encryption key status request is received$")
public void aGetMbusEncryptionKeyStatusRequestIsReceived(final Map<String, String> requestData) throws WebServiceSecurityException, GeneralSecurityException, IOException {
final GetMbusEncryptionKeyStatusRequest request = GetMbusEncryptionKeyStatusRequestFactory.fromParameterMap(requestData);
final GetMbusEncryptionKeyStatusAsyncResponse asyncResponse = this.smartMeterConfigurationClient.getMbusEncryptionKeyStatus(request);
assertThat(asyncResponse).as(OPERATION + ": Async response should not be null").isNotNull();
LOGGER.info(OPERATION + ": Async response is received {}", asyncResponse);
ScenarioContext.current().put(PlatformSmartmeteringKeys.KEY_CORRELATION_UID, asyncResponse.getCorrelationUid());
ScenarioContext.current().put(PlatformSmartmeteringKeys.KEY_DEVICE_IDENTIFICATION, asyncResponse.getDeviceIdentification());
}
use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetMbusEncryptionKeyStatusAsyncResponse in project open-smart-grid-platform by OSGP.
the class SmartMeteringConfigurationEndpoint method getMbusEncryptionKeyStatus.
@PayloadRoot(localPart = "GetMbusEncryptionKeyStatusRequest", namespace = SMARTMETER_CONFIGURATION_NAMESPACE)
@ResponsePayload
public GetMbusEncryptionKeyStatusAsyncResponse getMbusEncryptionKeyStatus(@OrganisationIdentification final String organisationIdentification, @RequestPayload final GetMbusEncryptionKeyStatusRequest request, @MessagePriority final String messagePriority, @ScheduleTime final String scheduleTime, @ResponseUrl final String responseUrl, @BypassRetry final String bypassRetry) throws OsgpException {
final RequestMessageMetadata requestMessageMetadata = RequestMessageMetadata.newBuilder().withOrganisationIdentification(organisationIdentification).withDeviceIdentification(request.getDeviceIdentification()).withDeviceFunction(DeviceFunction.GET_MBUS_ENCRYPTION_KEY_STATUS).withMessageType(MessageType.GET_MBUS_ENCRYPTION_KEY_STATUS).withMessagePriority(messagePriority).withScheduleTime(scheduleTime).withBypassRetry(bypassRetry).build();
final AsyncResponse asyncResponse = this.requestService.enqueueAndSendRequest(requestMessageMetadata, null);
this.saveResponseUrlIfNeeded(asyncResponse.getCorrelationUid(), responseUrl);
return this.configurationMapper.map(asyncResponse, GetMbusEncryptionKeyStatusAsyncResponse.class);
}
Aggregations