cancel
Showing results for 
Search instead for 
Did you mean: 

wcservice vs service web scripts

smcardle
Champ in-the-making
Champ in-the-making
Hi All

I have a 4.2.b installation and there seems to be an issue with the calling of web scripts when using wcservice in the URL

For instance calling
http://localhost:8080/alfresco/wcservice/AdminHome

Results in the following error page


The Web Script /alfresco/wcservice/AdminHome has responded with a status of 500 - Internal Error.

500 Description:   An error inside the HTTP server which prevented it from fulfilling the request.

Message:   100544940 Read-Write transaction started within read-only transaction
   
Exception:   org.alfresco.error.AlfrescoRuntimeException - 100544940 Read-Write transaction started within read-only transaction
   
   org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:360)
   org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:304)
   org.alfresco.web.bean.repository.User.getUserPreferencesRef(User.java:220)
   org.alfresco.web.bean.repository.User.getPreferences(User.java:188)
   org.alfresco.web.bean.repository.PreferencesService.getPreferences(PreferencesService.java:55)
….

Where as calling

http://localhost:8080/alfresco/service/AdminHome

Produces the correct page…

Has something changed in 4.2 ?

if not, can anybody explain why I am getting the 500 error using wcservice ?

Regards

Steve
2 REPLIES 2

abarisone
Star Contributor
Star Contributor
Hi,
the difference between service and wcservice is stated here http://wiki.alfresco.com/wiki/3.0_Web_Scripts_Framework#Servlet_Runtime
Maybe an issue related to authentication….

Regards,
Andrea

smcardle
Champ in-the-making
Champ in-the-making
Investigating this issue further I have some observations….

If we select the following URL

http://localhost:8080/alfresco/wcservice/AdminHome


We end up with the internal server 500 error "Read-Write transaction started within read-only transaction" as shown above after we enter the credentials.

This would seem to be an issue with the wsc authentication process and the reason I think this is because if we login directly to the Alfresco repository first (no issue, login works as expected) and then navigate to the above URL (auth already taken place) there are NO errors and everything works as expected.

What is the difference in the Auth process for the Alfresco repository login (works as expected) and the Auth process for wsc scripts (Does not work ends with the exception shown above)?

Regards

Steve