03-30-2009 12:00 PM
03-30-2009 02:12 PM
03-31-2009 04:40 AM
<webscript>
<shortname>XForms for Alfresco 3.0</shortname>
<description>BlueXML XForms data service for Alfresco 3.0</description>
<url>/wscript</url>
<format default="xml"/>any</format>
<authentication>none</authentication>
<transaction>none</transaction>
<family>bluexml</family>
<family>xforms</family>
</webscript>
- the template file wscript.get.xml.ftl, which contains the code below (I don't know whether "response" is a valid variable). I didn't try making it empty.
<?xml version="1.0" encoding="UTF-8"?>
<result>
${response}
</result>
- the jar file, in webapps\alfresco\WEB-INF\lib
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!– BlueXML XForms Data Controller –>
<bean id="webscript.extension.com.bluexml.xforms.wscript.get"
class="com.bluexml.xforms.controller.alfresco3x0.XFormsWebScript"
parent="webscript">
<property name="dictionaryService">
<ref bean="dictionaryService" />
</property>
</bean>
</beans>
03-31-2009 06:03 AM
06-04-2009 10:41 AM
<!– SimpleWebScript –>
<bean id="webscript.org.alfresco.demo.simple.get" class="org.alfresco.module.demoscripts.SimpleWebScript" parent="webscript"><property name="dictionaryService" ref="DictionaryService"/>
</bean>
The Web Script /alfresco/service/demo/simple 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: Web Script format '' is not registered
…blah blah blah
06-08-2009 02:42 PM
org.alfresco.web.scripts.DeclarativeWebScript
In this way WebScript Dispatcher will execute your custom webscripts files in the following order:org.alfresco.web.scripts.AbstractWebScript
To see more information you can see the WebScript wiki page.06-20-2014 12:00 PM
08-20-2009 03:59 PM
08-20-2009 06:46 PM
<bean id="webscript.org.alfresco.java.simple.get" class="test.webscript.SimpleWebScript" parent="webscript" />
package test.webscript;
import java.io.IOException;
import org.alfresco.web.scripts.AbstractWebScript;
import org.alfresco.web.scripts.WebScriptException;
import org.alfresco.web.scripts.WebScriptRequest;
import org.alfresco.web.scripts.WebScriptResponse;
import org.json.JSONException;
import org.json.JSONObject;
public class SimpleWebScript extends AbstractWebScript
{
public void execute(WebScriptRequest req, WebScriptResponse res)
throws IOException
{
try
{
// build a json object
JSONObject obj = new JSONObject();
// put some data on it
obj.put("field1", "data1");
// build a JSON string and send it back
String jsonString = obj.toString();
res.getWriter().write(jsonString);
}
catch(JSONException e)
{
throw new WebScriptException("Unable to serialize JSON");
}
}
}
<webscript>
<shortname>The World's Simplest Webscript</shortname>
<description>Hands back a little bit of JSON</description>
<url>/java/simple</url>
<authentication>none</authentication>
<format default="">argument</format>
</webscript>
08-21-2009 04:34 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.