This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | |
"http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<title>Scripto Post Body Demo</title> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/> | |
<meta name="apple-mobile-web-app-capable" content="yes"/> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<meta http-equiv="refresh" content="3600"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.commons.httpclient.Credentials | |
import org.apache.commons.httpclient.HostConfiguration | |
import org.apache.commons.httpclient.HttpClient | |
import org.apache.commons.httpclient.UsernamePasswordCredentials | |
import org.apache.commons.httpclient.auth.AuthScope | |
import org.apache.commons.httpclient.methods.GetMethod | |
import org.apache.commons.httpclient.methods.PostMethod | |
import org.apache.commons.httpclient.NameValuePair | |
import org.apache.commons.httpclient.*; | |
import java.util.*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovyx.net.http.HTTPBuilder | |
import static groovyx.net.http.ContentType.* | |
import static groovyx.net.http.Method.* | |
int TENSECONDS = 10*1000; | |
int THIRTYSECONDS = 30*1000; | |
HTTPBuilder builder = new HTTPBuilder('http://www.axeda.com') | |
//HTTPBuilder has no direct methods to add timeouts. We have to add them to the HttpParams of the underlying HttpClient |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.xml.StreamingMarkupBuilder | |
import net.sf.json.JSONObject | |
import groovy.xml.XmlUtil | |
class ReturnSerializer { | |
static final ReturnSerializer INSTANCE = new ReturnSerializer(); | |
final className = "com.axeda.innovation.ReturnSerializer" | |
ReturnSerializer() { | |
if(ReturnSerializer.INSTANCE != null) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.util.GroovyTestCase | |
import groovyx.net.http.HTTPBuilder | |
import groovyx.net.http.RESTClient | |
import groovy.json.JsonOutput | |
import groovy.util.XmlSlurper | |
import groovy.xml.MarkupBuilder | |
import groovyx.net.http.Method | |
import org.apache.http.HttpEntity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovyx.net.http.* | |
import static groovyx.net.http.ContentType.* | |
import static groovyx.net.http.Method.* | |
http = new HTTPBuilder('http://ajax.googleapis.com') | |
// perform a GET request, expecting JSON response data | |
http.request( GET, JSON){ | |
uri.path = '/ajax/services/search/web' | |
uri.query = [ v: '1.0', q: 'Axeda Corp.' ] | |
headers.'User-Agent' = 'Mozilla/5.0 Ubuntu/8/10 Firefox/3.0.4' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.axeda.drm.util.Emailer; | |
import com.axeda.drm.sdk.contact.Email | |
import javax.mail.internet.AddressException; | |
import javax.mail.internet.InternetAddress; | |
import static com.axeda.sdk.v2.dsl.Bridges.* | |
import com.axeda.services.v2.FileInfoCriteria | |
import org.apache.commons.io.IOUtils | |
import java.security.MessageDigest | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.axeda.drm.sdk.Context | |
import static com.axeda.sdk.v2.dsl.Bridges.* | |
import com.axeda.drm.sdk.scripto.Request | |
import com.axeda.drm.sdk.device.Device | |
import com.axeda.drm.sdk.device.DeviceFinder | |
import org.apache.commons.net.ftp.* | |
import groovy.json.* | |
import net.sf.json.JSONObject | |
import com.axeda.drm.sdk.device.Model | |
import com.axeda.drm.sdk.device.ModelFinder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.axeda.drm.sdk.Context | |
import com.axeda.drm.sdk.scripto.Request | |
import com.axeda.drm.sdk.audit.AuditCategory | |
import com.axeda.drm.sdk.audit.AuditMessage | |
import com.axeda.drm.sdk.contact.Location | |
import com.axeda.drm.sdk.contact.Organization | |
import com.axeda.drm.sdk.data.UploadedFile | |
import com.axeda.drm.sdk.device.Device | |
import com.axeda.drm.sdk.rules.ActionContext | |
import com.axeda.drm.util.Emailer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import static com.axeda.sdk.v2.dsl.Bridges.* | |
import com.axeda.services.v2.ExtendedMap | |
import com.axeda.services.v2.ExtendedMapCriteria | |
import com.axeda.services.v2.ExtendedList | |
import com.axeda.services.v2.ExtendedListCriteria | |
import com.axeda.services.v2.FindExtendedMapResult | |
import com.axeda.services.v2.FindExtendedListResult | |
import com.axeda.services.v2.NamedValue | |
NewerOlder