Hi Roy.
Once I have created a class direct injected with basic Alfresco services, the next step is to be able to use that class as a web service published into Alfresco like any other Alfresco WS.
I tried the following:
1) created a .wsdl file for the class;
2) copied the .class file with its own package into the Alfresco \lib folder;
3) modified the server-config.wsdd Alfresco file including the reference to the new web service;
4) copied the .wsdl file into the \alfresco\wsdl folder;
5) direct injected into the .class file nodeService bean using Spring through a -context.xml file.
The bean is loaded fine, but when I try to call the web service using a client the nodeService - initially correctly loaded - seems to be null and everything goes wrong.
I suppose that when the ws is called by the client, a new instance of the Java class is created, so I am not able to point to the fisrt instance of the Java class initially loaded as a Spring bean. As a consequence, I am not able to use the nodeService (and whatever Alfresco service) via the web service.
This is a big problem for me, and I have no idea how to resolve it. The web service should be able to run inside the same context initially created during the boot of Alfresco. In this way, I would be able to direct inject into my web service whatever parameter I want just only during the Alfresco start-up.
I will appreciate a lot any help.
All the best,
Sergio