use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetEncryptionKeyExchangeOnGMeterAsyncResponse in project open-smart-grid-platform by OSGP.
the class SetEncryptionKeyExchangeOnGMeterSteps method theExchangeUserKeyRequestIsReceived.
@When("^the exchange user key request is received$")
public void theExchangeUserKeyRequestIsReceived(final Map<String, String> requestData) throws Throwable {
final SetEncryptionKeyExchangeOnGMeterRequest setEncryptionKeyExchangeOnGMeterRequest = SetEncryptionKeyExchangeOnGMeterRequestFactory.fromParameterMap(requestData);
final SetEncryptionKeyExchangeOnGMeterAsyncResponse setEncryptionKeyExchangeOnGMeterAsyncResponse = this.smartMeteringConfigurationClient.setEncryptionKeyExchangeOnGMeter(setEncryptionKeyExchangeOnGMeterRequest);
assertThat(setEncryptionKeyExchangeOnGMeterAsyncResponse).as("Set encryptionKey exchange on GMeter async response should not be null").isNotNull();
ScenarioContext.current().put(PlatformSmartmeteringKeys.KEY_CORRELATION_UID, setEncryptionKeyExchangeOnGMeterAsyncResponse.getCorrelationUid());
}
use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetEncryptionKeyExchangeOnGMeterAsyncResponse in project open-smart-grid-platform by OSGP.
the class SmartMeteringConfigurationEndpoint method setEncryptionKeyExchangeOnGMeter.
@PayloadRoot(localPart = "SetEncryptionKeyExchangeOnGMeterRequest", namespace = SMARTMETER_CONFIGURATION_NAMESPACE)
@ResponsePayload
public SetEncryptionKeyExchangeOnGMeterAsyncResponse setEncryptionKeyExchangeOnGMeter(@OrganisationIdentification final String organisationIdentification, @RequestPayload final SetEncryptionKeyExchangeOnGMeterRequest 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.SET_ENCRYPTION_KEY_EXCHANGE_ON_G_METER).withMessageType(MessageType.SET_ENCRYPTION_KEY_EXCHANGE_ON_G_METER).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, SetEncryptionKeyExchangeOnGMeterAsyncResponse.class);
}
Aggregations