顯示具有 WebService 標籤的文章。 顯示所有文章
顯示具有 WebService 標籤的文章。 顯示所有文章

星期四, 12月 16, 2010

[Alfresco WebService]Ticket could not be found when calling callback handler

三種解法Aflreso Webserver login後Ticket有時候會無法正常取得的方法:

1 - start new session for for every separate thread.
2 - store authenticationDetails in the user's session, and use it to call the webservice

登入後使用session keep AuthenticationDetails 物件
AuthenticationUtils.startSession("user", "password");
    request.getSession().setAttribute("authenticationDetails", AuthenticationUtils.getAuthenticationDetails());
每次呼叫WebService時,把session中的AuthenticationDetails在設定回去
AuthenticationUtils.setAuthenticationDetails((AuthenticationDetails) req.getSession().getAttribute("authenticationDetails"));
Node[] nodes = repositoryService.get(new Predicate(null,spacesStore, qt));

3 - Modify AuthenticationUtils to store authenticationDetails in session instead of ThreadLocal, rebuild the SDK.

Reference:
Ticket could not be found when calling callback handler

星期日, 10月 24, 2010

[WebService C#]Call a Java WebService using WCE 3.0 and C#

今天使用.net呼叫java WebService,學習到了動態叫用WebService的需求(待改良XD),不過又遇到另一個ws-seculity的error,原來還需要裝Web Service Enhancement 3.0來達到更安全的叫用WebService。

其他你感興趣的文章

Related Posts with Thumbnails