Hi all,
We are developing a java client using JAX-WS to connect to xProtect Corporate 2014 via Protocol Integration.
We are experiencing problems while renewing the token.
We log in satisfactorily first time using the ServerCommandService to get a token using this snippet of code:
ServerCommandService serverCommandServiceTemp;
URL url = new URL(wsdlLocation);
Authenticator.setDefault(new MyAuthenticator(m_user, m_password));
serverCommandServiceTemp = new ServerCommandService(url, new QName(“http://videoos.net/2/XProtectCSServerCommand”, “ServerCommandService”));
serverCommandService = serverCommandServiceTemp.getServerCommandServiceSoap();
if (serverCommandService != null && serverCommandService instanceof BindingProvider) {
((BindingProvider)serverCommandService).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointAddress);
}
…
String currentToken = “”;
if(loginInfo != null){
currentToken = loginInfo.getToken();
}
loginInfo = serverCommandService.login(guid, currentToken);
Attending to the SKD doc, we should be able to renew the token by calling the same service but passing the token, but we are receiving the error “401:Unauthorized” as a result of the call.
Any advice?
Thanks in advance