07-25-2007 09:06 AM
AuthenticationUtils.startSession(lgn, psw);- Dans mon appli, je navigue, fait des recherches et autres choses, quand parfois cela me donne une erruer comme celle ci:
WSDoAllSender: password callback failed; nested exception is:- j'ai donc cherché un peu comment faire une connexion plus propre. Sur le forum officiel, je trouve le post: http://forums.alfresco.com/viewtopic.php?t=7195&highlight=ticket qui me renvoie sur la page du wiki suivante: http://wiki.alfresco.com/wiki/Web_Service_Samples_for_Java
org.alfresco.webservice.util.WebServiceException: Ticket could not be found when calling callback handler.
// Get a reference to theCar dans ce cas je dois toujours garder quelque part le username et password pour appeler "authenticationService.startSession(userName, password);"
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);
AuthenticationUtils.startSession(lgn, psw);ou
AuthenticationResult result = authenticationService?
.startSession(userName, password);
String ticket = result.getTicket();
07-26-2007 04:13 AM
07-30-2007 09:51 AM
public List<ContentResult> getRankedContent(String username, String password) throws ServiceException, AuthenticationFault, RemoteException {j'ai un "Ticket could not be found when calling callback handler" au niveau de l'appel de repositorry.query(store, query, true);
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());
07-31-2007 04:18 AM
08-02-2007 10:50 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.