Token renewal using Protocol integration

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

I would like you to compare your code with the TCPVideoViewer sample, perhaps especially the _tokenExpireTimer_Callback

I hope it leads you to a solution.

Hi,

The _tokenExpireTimer_Callback didn’t help me to find the solution, the .NET way to connect to your SOAP protocol is totally different than Java way to do that.

Can you provide me any example about how to do that in Java? In negative case, do you can give me the contact of someone that he can help me on this issue?

I have lost a lot of time on this issue and I need help.

Thanks in advance

Please, this is getting urgent.

Thanks

From the loginInfo you have the TimeToLive, you should do the renewed login before time time is gone. There is no Java sample in the MIP SDK.