02-06-2013 09:32 AM
<webscript>
<shortname>Preset Site</shortname>
<description></description>
<url>/preset/site</url>
<format default="json">argument</format>
<authentication>user</authentication>
<transaction>required</transaction>
</webscript>
package de.mypackage
import org.springframework.extensions.webscripts.Cache;
import org.springframework.extensions.webscripts.DeclarativeWebScript;
import org.springframework.extensions.webscripts.Status;
import org.springframework.extensions.webscripts.WebScriptRequest;
import java.util.HashMap;
import java.util.Map;
public class PresetProgramWebscript extends DeclarativeWebScript {
@Override
protected Map<String, Object> executeImpl(WebScriptRequest req, Status status, Cache cache) {
for (String header : req.getHeaderNames()) {
System.out.println("HEADER-Key: " + header);
System.out.println("HEADER-Value: " + req.getHeader(header));
}
System.out.println("———————————-");
for (String param : req.getParameterNames()) {
System.out.println("PARAM-KEY: " + param);
System.out.println("PARAM-Value: " + req.getParameter(param));
}
System.out.println("———————————-");
System.out.println("———————————-");
return new HashMap<String, Object>();
}
}
var connector = remote.connect(endpoint);
connector.post("/preset/site", myData);
02-07-2013 03:44 AM
02-11-2013 12:04 PM
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.