use of com.jasperwireless.api.ws.service.SessionInfoType in project open-smart-grid-platform by OSGP.
the class SessionProviderKpn method getIpAddress.
@Override
public String getIpAddress(final String iccId) throws OsgpException {
GetSessionInfoResponse response;
try {
response = this.jasperWirelessTerminalClient.getSession(iccId);
} catch (final SoapFaultClientException e) {
final String errorMessage = String.format("iccId %s is probably not supported in this session provider", iccId);
LOGGER.error(errorMessage, e);
throw new FunctionalException(FunctionalExceptionType.INVALID_ICCID, ComponentType.PROTOCOL_DLMS, new OsgpException(ComponentType.PROTOCOL_DLMS, e.getMessage()));
}
final SessionInfoType sessionInfoType = this.getSessionInfo(response);
if (sessionInfoType == null) {
return null;
}
return sessionInfoType.getIpAddress();
}
Aggregations