cancel
Showing results for 
Search instead for 
Did you mean: 

Error starting session !!!

hadabechir
Champ in-the-making
Champ in-the-making
Hi
I am trying to connect to the Alfresco repository by using the webService API, so to do that i used this lines of code:
WebServiceFactory.setEndpointAddress("http://localhost:8080/alfresco/api");
         AuthenticationUtils.startSession("user", "pwd");
         AuthenticationUtils.getTicket();
The problem that it works in standalone java class but  It does not work in JSF!! Smiley Sad
So can you help me please .
4 REPLIES 4

mangar
Star Contributor
Star Contributor

hadabechir
Champ in-the-making
Champ in-the-making
Thanks for the answer, but It dosen't work i have the same problem  :!:

mangar
Star Contributor
Star Contributor
Stack trace?

hadabechir
Champ in-the-making
Champ in-the-making
Hi,
this is the error:

Caused by: org.alfresco.webservice.util.WebServiceException: Error starting session.
   at org.alfresco.webservice.util.AuthenticationUtils.startSession(AuthenticationUtils.java:94)
   at beans.FirstWebServiceClient.hello(FirstWebServiceClient.java:63)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.apache.el.parser.AstValue.invoke(AstValue.java:170)
   at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
   at org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
   at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
   … 36 more
Caused by: java.lang.ClassCastException: org.apache.axis.attachments.AttachmentsImpl
   at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
   at org.apache.axis.client.Call.invoke(Call.java:1828)
   at org.alfresco.webservice.authentication.AuthenticationServiceSoapBindingStub.startSession(AuthenticationServiceSoapBindingStub.java:187)
   at org.alfresco.webservice.util.AuthenticationUtils.startSession(AuthenticationUtils.java:79)
   … 45 more
Caused by: java.lang.ClassCastException: org.apache.axis.attachments.AttachmentsImpl
   at org.apache.axis.Message.setup(Message.java:352)
   at org.apache.axis.Message.<init>(Message.java:246)
   at org.apache.axis.client.Call.invoke(Call.java:2425)
   at org.apache.axis.client.Call.invoke(Call.java:2366)
   at org.apache.axis.client.Call.invoke(Call.java:1812)