use of com.jasperwireless.api.ws.service.GetSessionInfoRequest in project open-smart-grid-platform by OSGP.
the class JasperWirelessTerminalClient method getSession.
public GetSessionInfoResponse getSession(final String iccid) {
final GetSessionInfoRequest getSessionInfoRequest = WS_CLIENT_FACTORY.createGetSessionInfoRequest();
getSessionInfoRequest.setLicenseKey(this.jasperWirelessTerminalAccess.getLicenseKey());
getSessionInfoRequest.setMessageId(this.correlationIdProviderService.getCorrelationId("messageID", iccid));
getSessionInfoRequest.setVersion(this.jasperWirelessTerminalAccess.getApiVersion());
getSessionInfoRequest.getIccid().add(iccid);
for (final ClientInterceptor interceptor : this.jasperWebServiceTemplate.getInterceptors()) {
if (interceptor instanceof Wss4jSecurityInterceptor) {
setUsernameToken((Wss4jSecurityInterceptor) interceptor, this.jasperWirelessTerminalAccess.getUsername(), this.jasperWirelessTerminalAccess.getPassword());
}
}
// override default uri
this.jasperWebServiceTemplate.setDefaultUri(this.jasperWirelessTerminalAccess.getUri());
return (GetSessionInfoResponse) this.jasperWebServiceTemplate.marshalSendAndReceive(getSessionInfoRequest, new SoapActionCallback(SERVICE_SESSION_INFO));
}
Aggregations