I am using Content Web Services with Java to upload files into Content Server.
The Java version is 1.8 and Content Server 16.
I am using various operations like adding category, adding permissions, remove permissions, create file, create folder etc
Now, I am facing the following issues:-
1. First time, I run the java utility, I need to restart Tomcat Server. Otherwise I keep on getting SoapFaultException
ns0:Core.LoginFailed : Client received SOAP Fault from server: OTDS username and password are required. Please see the server log to find more detail regarding exact cause of the failure.
2. How to refresh token? I am first taking OTDS token, followed by validating that token with the CWS token:
com.opentext.ecm.services.authws.Authentication otdsAuthClient;
otdsAuthClient = otdsAuthService.getAuthenticationPort();
String otdsAuthToken= otdsAuthClient.authenticate(USERNAME, PASSWORD);
Authentication_Service cwsAuthService = new Authentication_Service();
Authentication cwsAuthClient = cwsAuthService.getBasicHttpBindingAuthentication();
String cwsAuthToken = cwsAuthClient.validateUser(otdsAuthToken);
Now, I use cwsAuthToken to perform all my Content Service operations.
How do I renew my token?
OTDS: com.opentext.ecm.services.authws.Authentication does not have refreshToken method
CWS: Authentication has a refreshToken method
I am confused. Whether to:
1. Refresh token according to otds timeout or cws timeout
2. How to use refreshToken method of CWS?
Only option looks to me is to do the OTDS token creation and validating that token with CWS token again.
Please suggest!!