As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
AuthenticationUtils.startSession(lgn, psw);
WSDoAllSender: password callback failed; nested exception is: org.alfresco.webservice.util.WebServiceException: Ticket could not be found when calling callback handler.
// Get a reference to the AuthenticationServiceSoapBindingStub authenticationService = (AuthenticationServiceSoapBindingStub) new AuthenticationServiceLocator() .getAuthenticationService(); // Start the session AuthenticationResult result = authenticationService .startSession(userName, password); String ticket = result.getTicket();…// business à faire…// End the session authenticationService.endSession(ticket);
AuthenticationResult result = authenticationService .startSession(userName, password); String ticket = result.getTicket();
public List<ContentResult> getRankedContent(String username, String password) throws ServiceException, AuthenticationFault, RemoteException { List<ContentResult> results = new ArrayList<ContentResult>(); //—————————————- AuthenticationServiceSoapBindingStub authenticationService = (AuthenticationServiceSoapBindingStub) new AuthenticationServiceLocator() .getAuthenticationService(); AuthenticationResult result = authenticationService.startSession( username, password); System.out.println("result: "+ result); //—————————————- try { RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory .getRepositoryService(); // Define query Query query = new Query(Constants.QUERY_LANG_LUCENE, "TEXT:" + this.getText()); // Execute the query with includeMetadata = true QueryResult queryResult = repositoryService.query(store, query, true); System.out.println("Statement: " +query.getStatement());