Hi,I've been pondering on this error for a number of days now and it has become very counter productive. I am deploying a module via an amp file of my customisations for the webscripts and configurations. The structure of the amp file is as follows:
-config
-alfresco
-module
-my-module
-module-context.xml
-application.properties
-webscripts
-packagename
-MyJavaClass.post.desc.xml
-lib
-ezmorph-1.0.5.jar
-json-lib-2.3-jdk15.jar
-my-module.jar
-module.properties
the descriptor file is as folloes:
<webscript>
<shortname>My Module</shortname>
<description>description</description>
<url>/sampler/myjavaclass</url>
<format default="">any</format>
<authentication>user</authentication>
</webscript>
Module-context.xml contains the bean definition for the MyJavaClass controller class. The definition is as follows:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans-2.0.dtd'>
<!– should contain module specific configurations required to be initialised during startup –>
<beans>
<bean id="webscript.packagename.sampler.myjavaclass.post"
class="packagename.sampler.myjavaclass"
parent="webscript" >
<property name="repository" ref="repositoryHelper"/>
<property name="serviceRegistry" ref="ServiceRegistry"/>
</bean>
</beans>
I had all sorts or errors on the configurations but had gotten over them at some point referencing the posts on this forum. The alfresco server is initialised properly allowing me to log in and to view the https://alfresco/service/ URL which displays my web script quite nicely together with all the other web scripts. The MyJavaClass extends AbstractWebScript so I can stream the response directly back to the client without using freemarker. For some reason I've stumbled upon this error: Web Script format '' is not registered. I've tried using "argument" instead of "any" in the descriptor file but I still get the same error.At one point I got the "Does not support the method GET" error which does not make sense because I'm using a POST and to top it off the java dump shows the use of the DeclarativeWebScript whereas I'm using AbstractWebScript.If anyone can shed some light on this in the soonest time possible, please reply. cheers,