05-06-2008 11:14 PM
05-06-2008 11:28 PM
05-07-2008 08:41 AM
hink how you might invoke them from a Java programCan I using struts 2, put calls to Alfresco and receive/send messages from/to Alfresco?
05-14-2008 03:06 PM
05-14-2008 03:25 PM
06-11-2008 05:10 PM
06-11-2008 09:07 PM
06-12-2008 05:25 PM
<%@ page import="org.apache.commons.httpclient.HttpClient" %>
<%@ page import="org.apache.commons.httpclient.UsernamePasswordCredentials" %>
<%@ page import="org.apache.commons.httpclient.auth.AuthScope" %>
<%@ page import="org.apache.commons.httpclient.methods.GetMethod" %>
<html>
<title>Sample Web Script call from JSP</title>
<body>
<h1>Search results </h1>
<hr/>
<%
String resultString = "";
String fld_title= request.getParameter("fld_title");
if (fld_title == "") {
resultString = "Enter a search parameter…";
} else {
resultString = "";
HttpClient client = new HttpClient();
client.getState().setCredentials(
new AuthScope("localhost", 8080, "Alfresco"),
new UsernamePasswordCredentials("demo", "demo")
);
GetMethod get = new GetMethod("http://localhost:8080/alfresco/s/api/search/keyword.html?q=@cm%5C%5C%5C:title%5C:%22" + fld_title + "%22");
get.setDoAuthentication( true );
try {
int status = client.executeMethod( get );
resultString = get.getResponseBodyAsString();
} finally {
get.releaseConnection();
}
}
%>
<%=resultString%>
</body>06-12-2008 09:19 PM
06-13-2008 02:21 AM
GetMethod get = new GetMethod("http://localhost:8080/alfresco/s/api/search/keyword.html?q=@cm%5C%5C%5C:title%5C:%22" + fld_title + "%22");
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.