Hello
I am developing a remote DFS client to request the query service.
I try to follow TQueryServiceTest sample.
Here are the key parts of my code.
ContextFactory contextFactory = ContextFactory.getInstance();serviceContext = contextFactory.newContext();RepositoryIdentity repoId = new RepositoryIdentity();repoId.setRepositoryName(repository);//repoId.setUserName(userName);//repoId.setPassword(password);serviceContext.addIdentity(repoId);KerberosTokenHandler handler = new KerberosTokenHandler();@SuppressWarnings("rawtypes")List<javax.xml.ws.handler.Handler> h = Arrays.asList((javax.xml.ws.handler.Handler) handler);IQueryService querySvc = ServiceFactory.getInstance().getRemoteService(IQueryService.class, serviceContext, moduleName, host, h);byte[] ticket = ...;handler.setBinarySecurityToken(new KerberosBinarySecurityToken(ticket, KerberosValueType.KERBEROSV5_AP_REQ));
I already deployed Kerberos SSO to the DFS core service on Java Method Server following the instruction in the DFS deployment manual but
Unfortunately I'm just a newbie with Kerberos SSO. I don't know how to retrieve the Kerberos ticket when I'm writing code for the client
and I also have no idea that the serviceContext that I do is correct or not.
Can anybody please enlighten me to complete my first Java Remote DFS consumer?
Best Regards,
Vongvut Vongmanee
PS Please excuse for my poor English