I all.
Just one year ago I started with a project based on Alfresco 2.0 that has been customized in many ways. The project has been involving a heavy custimization of Alfresco (2.0 and now 2.1). Among these customizations, one consists of creating a new custom web service exposed such as other Alfresco web services (you can find a list of Alfresco WSs in the \alfresco\wsdl folder). The strategy used at that moment was to create a Java class based on the Alfresco core java classes. One of these classes is used for generating a web service (I used the automatic tool of Eclipse for generating a wsdl from a Java class). Using the wsdl I created a java stub for being used by a web service client.
Later, I had to modify something into Alfresco in order to expose correctly the new custom web service:
1. the new file XXX.wsdl was copied into the \alfresco\wsdl folder;
2. the content of the new server-config.wsdd (generated by Eclipse while generating the wsdl) was copied and pasted into the server-config.wsdd Alfresco file;
3. The new custom Java library was copied into the \lib\ folder for being available to Alfresco.
As a result, a new custom web service is available.
This method works well but tha main limit is that we had to modify something into Alfresco instead of using any extension mechanism. I think this task could have been done better, sure. But this was the solution I found more than one year ago.
I think that the Web Scripts mechanism is very useful even if too limited at the moment. If you want to manage in more details documents and implements custom behaviours, I think the best solution is going into the Java code.
All the best,
Sergio