AnsweredAssumed Answered

Alfresco Web Services Via Ruby

Question asked by bdunbar on May 24, 2007
Latest reply on Apr 16, 2012 by frank_miller
I am trying to get Ruby to interface with Alfresco web services. I am following the instructions on the wiki ( I am successfully authenticating with the server and getting a ticket, but any operations after that seem to be failing with the following message in the Ruby console:

#<SOAP::Mapping::Object:0x34b82d4>: Server Error (SOAP::FaultError)

One thing that may be causing this is that the wiki says:

"In addition to installing this library, and because this library is not fully implemented, you will have to patch it with the patch containing MessageText code instead of the default MessageDigest."

I could not find any documentation on what that meant on the wiki or by doing an pretty extensive Google search. So, I have not done any patching.

Here is the sample code I am trying to run, and it is pretty much like the code in the Wiki.

require 'soap/wsdlDriver'
require "wss4r/rpc/wssdriver"
require "wss4r/tokenresolver/authenticateuserresolver"
require "pathname"

authentication_wsdl_url = "file://" + + "/../wsdl/authentication-service.wsdl"
authenticator =
authentication_result = authenticator.startSession(:username => 'admin', :password => 'admin').startSessionReturn
p authentication_result
ticket = authentication_result.ticket
p ticket

repository_wsdl_url = "file://" + + "/../wsdl/repository-service.wsdl"
repository =

# adding authentication information
resolver =, ticket))

# the query itself
#query_result = repository.query({:store => {:scheme => 'workspace', :address => 'SpacesStore'},
#                                 :query => {:language => 'lucene', :statement => 'TEXT:"hello"'},
#                                 :includeMetaData => false})
stores = repository.getStores({})
p stores

I have tried with the commented out query as well and that ended up with the same result.

Does anyone have any ideas what I am doing wrong? Or, do you have any suggestions on at least finding out where the problem is? I could not find anything in the alfresco log.

Thanks in advance for your help,