Using web service with 'Error starting session' exception
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-23-2014 04:13 AM
Hi every one,
When I was using web service API in order to create a link for node,
my part of code as follows:
And it will show error as below:
org.alfresco.webservice.util.WebServiceException: Error starting session.
at org.alfresco.webservice.util.AuthenticationUtils.startSession(AuthenticationUtils.java:88)
at tw.org.iii.cosa.javabacked.webscript.SoftLinkCreator.wsCreateLink(SoftLinkCreator.java:223)
at tw.org.iii.cosa.javabacked.webscript.SoftLinkCreator.executeImpl(SoftLinkCreator.java:95)
at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:64)
Could anyone can help me? thanks in advance.
My alfresco version is 3.4.5 and using alfresco-web-service-client-3.4.5.jar,axis-1.3.jar by the way.
When I was using web service API in order to create a link for node,
my part of code as follows:
CMLCreate create = new CMLCreate(); create.setParent(destinationFolder); create.setAssociationType(Constants.ASSOC_CONTAINS); if (isFolder) { //it`s a link of folder type create.setType("{http://www.alfresco.org/model/application/1.0}folderlink"); }else{ create.setType("{http://www.alfresco.org/model/application/1.0}filelink"); } create.setProperty(prop); create.setChildName("Childname"); CML cml = new CML(); cml.setCreate(new CMLCreate[] { create }); WebServiceFactory.setEndpointAddress("http://140.92.25.160:80/alfresco/api"); AuthenticationUtils.startSession("admin","admin"); RepositoryServiceSoapBindingStub repositoryServiceSoapBindingStub = WebServiceFactory.getRepositoryService(); result = repositoryServiceSoapBindingStub.update(cml); if(result.length > 0 ){ isSuccess = true; } AuthenticationUtils.endSession(); }āāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
And it will show error as below:
org.alfresco.webservice.util.WebServiceException: Error starting session.
at org.alfresco.webservice.util.AuthenticationUtils.startSession(AuthenticationUtils.java:88)
at tw.org.iii.cosa.javabacked.webscript.SoftLinkCreator.wsCreateLink(SoftLinkCreator.java:223)
at tw.org.iii.cosa.javabacked.webscript.SoftLinkCreator.executeImpl(SoftLinkCreator.java:95)
at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:64)
Could anyone can help me? thanks in advance.
My alfresco version is 3.4.5 and using alfresco-web-service-client-3.4.5.jar,axis-1.3.jar by the way.
Labels:
- Labels:
-
Archive
7 REPLIES 7
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-23-2014 05:16 AM
Native webservice is deprecated,please use other API .
opencmis API is recommended .
opencmis API is recommended .
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-23-2014 06:01 AM
Hi kayne,
thanks for your advice,but could you give me more details or example about using opencmis API in this case?
I would appreciate that.
thanks for your advice,but could you give me more details or example about using opencmis API in this case?
I would appreciate that.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-23-2014 10:43 AM
I'm sorry I did not see clearly.you are using alfresco version 3.4.5,it is two old .I don't know whether cmis specification is well supported in that version.
As the error,have you tried the address
Native webservice is not recommended in alfresco 4.x and was removed in alfresco 5.x.Please refer to https://wiki.alfresco.com/wiki/Alfresco_Content_Management_Web_Services for more information
As the error,have you tried the address
http://localhost:8080/alfresco/soapapiā
?Native webservice is not recommended in alfresco 4.x and was removed in alfresco 5.x.Please refer to https://wiki.alfresco.com/wiki/Alfresco_Content_Management_Web_Services for more information
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-24-2014 03:38 AM
I have tried the address http://loacalhost:8080/alfresco/soapapi before,but it got the same error,
so is there any solution to make it work in alfresco version 3.4.5??
so is there any solution to make it work in alfresco version 3.4.5??
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-28-2014 10:52 PM
Update some info:
When I was using pure alfresco without others application to do same thing, and unexpectedly it`s work fine!
However, when I developed some application which is RESTful application based on alfresco, and then it`s fail.
Therefore is there any idea for my situation?
When I was using pure alfresco without others application to do same thing, and unexpectedly it`s work fine!
However, when I developed some application which is RESTful application based on alfresco, and then it`s fail.
Therefore is there any idea for my situation?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-28-2014 11:14 PM
Maybe it is caused by jar packages collisions,please check your classpath.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-29-2014 11:55 PM
Hi Kayne,
I have checked the jar packages,it did not occur collisions.
it perhaps cause by other reasons.
Thanks for ur tip.
I have checked the jar packages,it did not occur collisions.
it perhaps cause by other reasons.
Thanks for ur tip.
