public static class SAFSPlus.Rest
extends java.lang.Object
Constructor and Description |
---|
Rest() |
Modifier and Type | Method and Description |
---|---|
static boolean |
CleanResponseMap(java.lang.String... params) |
static boolean |
DeleteCustom(Component comp,
java.lang.String... params)
Perform the "DELETE" method with Headers (defined by customer) on a REST service.
|
static boolean |
DeleteResponse(java.lang.String... params) |
static boolean |
DeleteResponseStore(java.lang.String... params) |
static boolean |
EndServiceSession(Component comp,
java.lang.String... params)
Stop a session for a REST service.
|
static boolean |
GetBinary(Component comp,
java.lang.String... params)
Perform the "GET" method with Headers containing "Accept : application/octet-stream" on a REST service, and verify the returned content is binary before returning it.
|
static boolean |
GetCSS(Component comp,
java.lang.String... params)
Perform the "GET" method with Headers containing "Accept : text/css" on a REST service, and verify the returned content is css before returning it.
|
static boolean |
GetCustom(Component comp,
java.lang.String... params)
Perform the "GET" method with Headers (defined by customer) on a REST service, and get back the content.
|
static boolean |
GetHtml(Component comp,
java.lang.String... params)
Perform the "GET" method with Headers containing "Accept : text/html" on a REST service, and verify the returned content is html before returning it.
|
static boolean |
GetImage(Component comp,
java.lang.String... params)
Perform the "GET" method with Headers containing "Accept : image" on a REST service, and verify the returned content is image before returning it.
|
static boolean |
GetJson(Component comp,
java.lang.String... params)
Perform the "GET" method with Headers containing "Accept : application/json" on a REST service, and verify the returned content is json before returning it.
|
static boolean |
GetScript(Component comp,
java.lang.String... params)
Perform the "GET" method with Headers containing "Accept : application/javascript" on a REST service, and verify the returned content is javascript before returning it.
|
static boolean |
GetText(Component comp,
java.lang.String... params)
Perform the "GET" method with Headers containing "Accept : text/plain" on a REST service, and verify the returned content is text before returning it.
|
static boolean |
GetXML(Component comp,
java.lang.String... params)
Perform the "GET" method with Headers containing "Accept : text/xml" on a REST service, and verify the returned content is xml before returning it.
|
static boolean |
HeadBinary(Component comp,
java.lang.String... params)
Perform the "HEAD" method with Headers containing "Accept : application/octet-stream" on a REST service, and verify the returned content is binary before returning the header part.
|
static boolean |
HeadCSS(Component comp,
java.lang.String... params)
Perform the "HEAD" method with Headers containing "Accept : text/css" on a REST service, and verify the returned content is css before returning the header part.
|
static boolean |
HeadCustom(Component comp,
java.lang.String... params)
Perform the "HEAD" method (with Headers defined by user) on a REST service, and get back the header information.
|
static boolean |
HeadersLoad(java.lang.String... params) |
static boolean |
HeaderXML(Component comp,
java.lang.String... params)
Deprecated.
It has been renamed to
HeadXML(org.safs.model.Component, String...) |
static boolean |
HeadHTML(Component comp,
java.lang.String... params)
Perform the "HEAD" method with Headers containing "Accept : text/html" on a REST service, and verify the returned content is html before returning the header part.
|
static boolean |
HeadImage(Component comp,
java.lang.String... params)
Perform the "HEAD" method with Headers containing "Accept : image" on a REST service, and verify the returned content is image before returning the header part.
|
static boolean |
HeadJSON(Component comp,
java.lang.String... params)
Perform the "HEAD" method with Headers containing "Accept : application/json" on a REST service, and verify the returned content is json before returning the header part.
|
static boolean |
HeadScript(Component comp,
java.lang.String... params)
Perform the "HEAD" method with Headers containing "Accept : application/javascript" on a REST service, and verify the returned content is javascript before returning the header part.
|
static boolean |
HeadText(Component comp,
java.lang.String... params)
Perform the "HEAD" method with Headers containing "Accept : text/plain" on a REST service, and verify the returned content is text before returning the header part.
|
static boolean |
HeadXML(Component comp,
java.lang.String... params)
Perform the "HEAD" method with Headers containing "Accept : text/xml" on a REST service, and verify the returned content is xml before returning the header part.
|
static boolean |
PatchBinary(Component comp,
java.lang.String... params) |
static boolean |
PatchCSS(Component comp,
java.lang.String... params) |
static boolean |
PatchCustom(Component comp,
java.lang.String... params) |
static boolean |
PatchHTML(Component comp,
java.lang.String... params) |
static boolean |
PatchImage(Component comp,
java.lang.String... params) |
static boolean |
PatchJSON(Component comp,
java.lang.String... params) |
static boolean |
PatchScript(Component comp,
java.lang.String... params) |
static boolean |
PatchText(Component comp,
java.lang.String... params) |
static boolean |
PatchXML(Component comp,
java.lang.String... params) |
static boolean |
PostBinary(Component comp,
java.lang.String... params) |
static boolean |
PostCSS(Component comp,
java.lang.String... params) |
static boolean |
PostCustom(Component comp,
java.lang.String... params) |
static boolean |
PostHTML(Component comp,
java.lang.String... params) |
static boolean |
PostImage(Component comp,
java.lang.String... params) |
static boolean |
PostJSON(Component comp,
java.lang.String... params) |
static boolean |
PostScript(Component comp,
java.lang.String... params) |
static boolean |
PostText(Component comp,
java.lang.String... params) |
static boolean |
PostXML(Component comp,
java.lang.String... params) |
static boolean |
PutBinary(Component comp,
java.lang.String... params) |
static boolean |
PutCSS(Component comp,
java.lang.String... params)
Perform the "PUT" method with Headers containing "Content-Type : text/css" on a REST service.
|
static boolean |
PutCustom(Component comp,
java.lang.String... params)
Perform the "PUT" method with Headers (defined by customer) on a REST service.
|
static boolean |
PutHTML(Component comp,
java.lang.String... params)
Perform the "PUT" method with Headers containing "Content-Type : text/html" on a REST service.
|
static boolean |
PutImage(Component comp,
java.lang.String... params) |
static boolean |
PutJSON(Component comp,
java.lang.String... params)
Perform the "PUT" method with Headers containing "Content-Type : application/json" on a REST service.
|
static boolean |
PutScript(Component comp,
java.lang.String... params)
Perform the "PUT" method with Headers containing "Content-Type : application/javascript" on a REST service.
|
static boolean |
PutText(Component comp,
java.lang.String... params)
Perform the "PUT" method with Headers containing "Content-Type : text/plain" on a REST service.
|
static boolean |
PutXML(Component comp,
java.lang.String... params)
Perform the "PUT" method with Headers containing "Content-Type : text/xml" on a REST service.
|
static boolean |
Request(Component comp,
java.lang.String... params)
Perform an HTTP method with Headers (defined by customer) on a REST service.
|
static boolean |
StartServiceSession(Component comp,
java.lang.String... params)
Start a session for a REST service..
|
static boolean |
StoreResponse(java.lang.String... params) |
static boolean |
VerifyResponse(java.lang.String... params) |
static boolean |
VerifyResponseContains(java.lang.String... params) |
public static boolean DeleteCustom(Component comp, java.lang.String... params)
comp
- org.safs.model.Component, it does not represent a real GUI component.params
- String[], parameters
Sets prevResults TestRecordHelper to the results received or null if an error occurred.
SAFSPlus.prevResults
,
TestRecordData.getStatusCode()
,
TestRecordData.getStatusInfo()
,
#StartWebBrowser(String, String, String...)
We can define map file as below:
[BAYERREST]
BAYERREST=SAFSREST
BAYERSERVICE001=SESSION_ID_BAYERSERVICE001
BAYERSERVICE001_NONEXIST=
Then we call as below
Rest.StartServiceSession(Map.BAYERREST.BAYERSERVICE001, "http://www.thomas-bayer.com/sqlrest/");
//within session, try to get content from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/",
//which is concatenated by parameter relativeURI "CUSTOMER/" and baseURL "http://www.thomas-bayer.com/sqlrest/" stored in session.
//The headers (sent with 'get' method) are defined in the project-relative file "customHeader.txt".
Rest.GetCustom(Map.BAYERREST.BAYERSERVICE001, "CUSTOMER/", "ResponseIDVariable", "", "customHeader.txt");
Rest.EndServiceSession(Map.BAYERREST.BAYERSERVICE001);
//BAYERSERVICE001_NONEXIST is defined as empty string, which is not a valid session ID.
//out of session, try to get content from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/".
//The headers "If-Modified-Since: Sat, 29 OCT 1994 19:43:31 GMT" will be sent with 'get' method.
Rest.GetCustom(Map.BAYERREST.BAYERSERVICE001_NONEXIST, "http://www.thomas-bayer.com/sqlrest/CUSTOMER/", "ResponseIDVariable", "", "If-Modified-Since: Sat, 29 OCT 1994 19:43:31 GMT");
public static boolean EndServiceSession(Component comp, java.lang.String... params)
comp
- org.safs.model.Component, it does not represent a real GUI component.params
- String[], optional parameters, not used yet.Sets prevResults TestRecordHelper to the results received or null if an error occurred.
SAFSPlus.prevResults
,
TestRecordData.getStatusCode()
,
TestRecordData.getStatusInfo()
,
#StartWebBrowser(String, String, String...)
We can define map file as below: [BAYERREST] BAYERREST=SAFSREST BAYERSERVICE001=SESSION_ID_BAYERSERVICE001 Then we call as belowRest.StartServiceSession(Map.BAYERREST.BAYERSERVICE001, "baseURL"); //do some rest test ... Rest.EndServiceSession(Map.BAYERREST.BAYERSERVICE001);
Or, we can create Component in program and use it to start/stop session.org.safs.model.Component safsrest = new org.safs.model.Component("SAFSREST");//the name must be "SAFSREST" org.safs.model.Component bayerSession = new org.safs.model.Component(safsrest, "SESSION_ID_BAYERSERVICE001"); Rest.StartServiceSession(bayerSession, "http://www.thomas-bayer.com/sqlrest/"); //do some rest test ... Rest.EndServiceSession(bayerSession);
public static boolean GetBinary(Component comp, java.lang.String... params)
comp
- org.safs.model.Component, it does not represent a real GUI component.params
- String[], parameters
Sets prevResults TestRecordHelper to the results received or null if an error occurred.
SAFSPlus.prevResults
,
TestRecordData.getStatusCode()
,
TestRecordData.getStatusInfo()
,
#StartWebBrowser(String, String, String...)
We can define map file as below:
[BAYERREST]
BAYERREST=SAFSREST
BAYERSERVICE001=SESSION_ID_BAYERSERVICE001
BAYERSERVICE001_NONEXIST=
Then we call as below
Rest.StartServiceSession(Map.BAYERREST.BAYERSERVICE001, "http://www.thomas-bayer.com/sqlrest/");
//within session, try to get binary content from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/",
//which is concatenated by parameter relativeURI "CUSTOMER/" and baseURL "http://www.thomas-bayer.com/sqlrest/" stored in session.
Rest.GetBinary(Map.BAYERREST.BAYERSERVICE001, "CUSTOMER/", "ResponseIDVariable" );
Rest.EndServiceSession(Map.BAYERREST.BAYERSERVICE001);
//BAYERSERVICE001_NONEXIST is defined as empty string, which is not a valid session ID.
//out of session, try to get binary content from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/"
Rest.GetBinary(Map.BAYERREST.BAYERSERVICE001_NONEXIST, "http://www.thomas-bayer.com/sqlrest/CUSTOMER/", "ResponseIDVariable" );
public static boolean GetCSS(Component comp, java.lang.String... params)
comp
- org.safs.model.Component, it does not represent a real GUI component.params
- String[], parameters
Sets prevResults TestRecordHelper to the results received or null if an error occurred.
SAFSPlus.prevResults
,
TestRecordData.getStatusCode()
,
TestRecordData.getStatusInfo()
,
#StartWebBrowser(String, String, String...)
We can define map file as below:
[BAYERREST]
BAYERREST=SAFSREST
BAYERSERVICE001=SESSION_ID_BAYERSERVICE001
BAYERSERVICE001_NONEXIST=
Then we call as below
Rest.StartServiceSession(Map.BAYERREST.BAYERSERVICE001, "http://www.thomas-bayer.com/sqlrest/");
//within session, try to get css text content from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/",
//which is concatenated by parameter relativeURI "CUSTOMER/" and baseURL "http://www.thomas-bayer.com/sqlrest/" stored in session.
Rest.GetCSS(Map.BAYERREST.BAYERSERVICE001, "CUSTOMER/", "ResponseIDVariable" );
Rest.EndServiceSession(Map.BAYERREST.BAYERSERVICE001);
//BAYERSERVICE001_NONEXIST is defined as empty string, which is not a valid session ID.
//out of session, try to get css text content from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/"
Rest.GetCSS(Map.BAYERREST.BAYERSERVICE001_NONEXIST, "http://www.thomas-bayer.com/sqlrest/CUSTOMER/", "ResponseIDVariable" );
public static boolean GetCustom(Component comp, java.lang.String... params)
comp
- org.safs.model.Component, it does not represent a real GUI component.params
- String[], parameters
Sets prevResults TestRecordHelper to the results received or null if an error occurred.
SAFSPlus.prevResults
,
TestRecordData.getStatusCode()
,
TestRecordData.getStatusInfo()
,
#StartWebBrowser(String, String, String...)
We can define map file as below:
[BAYERREST]
BAYERREST=SAFSREST
BAYERSERVICE001=SESSION_ID_BAYERSERVICE001
BAYERSERVICE001_NONEXIST=
Then we call as below
Rest.StartServiceSession(Map.BAYERREST.BAYERSERVICE001, "http://www.thomas-bayer.com/sqlrest/");
//within session, try to get content from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/",
//which is concatenated by parameter relativeURI "CUSTOMER/" and baseURL "http://www.thomas-bayer.com/sqlrest/" stored in session.
//The headers (sent with 'get' method) are defined in the project-relative file "customHeader.txt".
Rest.GetCustom(Map.BAYERREST.BAYERSERVICE001, "CUSTOMER/", "ResponseIDVariable", "", "customHeader.txt");
Rest.EndServiceSession(Map.BAYERREST.BAYERSERVICE001);
//BAYERSERVICE001_NONEXIST is defined as empty string, which is not a valid session ID.
//out of session, try to get content from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/".
//The headers "If-Modified-Since: Sat, 29 OCT 1994 19:43:31 GMT" will be sent with 'get' method.
Rest.GetCustom(Map.BAYERREST.BAYERSERVICE001_NONEXIST, "http://www.thomas-bayer.com/sqlrest/CUSTOMER/", "ResponseIDVariable", "", "If-Modified-Since: Sat, 29 OCT 1994 19:43:31 GMT");
public static boolean GetHtml(Component comp, java.lang.String... params)
comp
- org.safs.model.Component, it does not represent a real GUI component.params
- String[], parameters
Sets prevResults TestRecordHelper to the results received or null if an error occurred.
SAFSPlus.prevResults
,
TestRecordData.getStatusCode()
,
TestRecordData.getStatusInfo()
,
#StartWebBrowser(String, String, String...)
We can define map file as below:
[BAYERREST]
BAYERREST=SAFSREST
BAYERSERVICE001=SESSION_ID_BAYERSERVICE001
BAYERSERVICE001_NONEXIST=
Then we call as below
Rest.StartServiceSession(Map.BAYERREST.BAYERSERVICE001, "http://www.thomas-bayer.com/sqlrest/");
//within session, try to get html text content from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/",
//which is concatenated by parameter relativeURI "CUSTOMER/" and baseURL "http://www.thomas-bayer.com/sqlrest/" stored in session.
Rest.GetHtml(Map.BAYERREST.BAYERSERVICE001, "CUSTOMER/", "ResponseIDVariable" );
Rest.EndServiceSession(Map.BAYERREST.BAYERSERVICE001);
//BAYERSERVICE001_NONEXIST is defined as empty string, which is not a valid session ID.
//out of session, try to get html text content from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/"
Rest.GetHtml(Map.BAYERREST.BAYERSERVICE001_NONEXIST, "http://www.thomas-bayer.com/sqlrest/CUSTOMER/", "ResponseIDVariable" );
public static boolean GetImage(Component comp, java.lang.String... params)
comp
- org.safs.model.Component, it does not represent a real GUI component.params
- String[], parameters
Sets prevResults TestRecordHelper to the results received or null if an error occurred.
SAFSPlus.prevResults
,
TestRecordData.getStatusCode()
,
TestRecordData.getStatusInfo()
,
#StartWebBrowser(String, String, String...)
We can define map file as below:
[BAYERREST]
BAYERREST=SAFSREST
BAYERSERVICE001=SESSION_ID_BAYERSERVICE001
BAYERSERVICE001_NONEXIST=
Then we call as below
Rest.StartServiceSession(Map.BAYERREST.BAYERSERVICE001, "http://www.thomas-bayer.com/sqlrest/");
//within session, try to get image content from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/",
//which is concatenated by parameter relativeURI "CUSTOMER/" and baseURL "http://www.thomas-bayer.com/sqlrest/" stored in session.
Rest.GetImage(Map.BAYERREST.BAYERSERVICE001, "CUSTOMER/", "ResponseIDVariable" );
Rest.EndServiceSession(Map.BAYERREST.BAYERSERVICE001);
//BAYERSERVICE001_NONEXIST is defined as empty string, which is not a valid session ID.
//out of session, try to get image content from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/"
Rest.GetImage(Map.BAYERREST.BAYERSERVICE001_NONEXIST, "http://www.thomas-bayer.com/sqlrest/CUSTOMER/", "ResponseIDVariable" );
public static boolean GetJson(Component comp, java.lang.String... params)
comp
- org.safs.model.Component, it does not represent a real GUI component.params
- String[], parameters
Sets prevResults TestRecordHelper to the results received or null if an error occurred.
SAFSPlus.prevResults
,
TestRecordData.getStatusCode()
,
TestRecordData.getStatusInfo()
,
#StartWebBrowser(String, String, String...)
We can define map file as below:
[BAYERREST]
BAYERREST=SAFSREST
BAYERSERVICE001=SESSION_ID_BAYERSERVICE001
BAYERSERVICE001_NONEXIST=
Then we call as below
Rest.StartServiceSession(Map.BAYERREST.BAYERSERVICE001, "http://www.thomas-bayer.com/sqlrest/");
//within session, try to get json text content from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/",
//which is concatenated by parameter relativeURI "CUSTOMER/" and baseURL "http://www.thomas-bayer.com/sqlrest/" stored in session.
Rest.GetJson(Map.BAYERREST.BAYERSERVICE001, "CUSTOMER/", "ResponseIDVariable" );
Rest.EndServiceSession(Map.BAYERREST.BAYERSERVICE001);
//BAYERSERVICE001_NONEXIST is defined as empty string, which is not a valid session ID.
//out of session, try to get json text content from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/"
Rest.GetJson(Map.BAYERREST.BAYERSERVICE001_NONEXIST, "http://www.thomas-bayer.com/sqlrest/CUSTOMER/", "ResponseIDVariable" );
public static boolean GetScript(Component comp, java.lang.String... params)
comp
- org.safs.model.Component, it does not represent a real GUI component.params
- String[], parameters
Sets prevResults TestRecordHelper to the results received or null if an error occurred.
SAFSPlus.prevResults
,
TestRecordData.getStatusCode()
,
TestRecordData.getStatusInfo()
,
#StartWebBrowser(String, String, String...)
We can define map file as below:
[BAYERREST]
BAYERREST=SAFSREST
BAYERSERVICE001=SESSION_ID_BAYERSERVICE001
BAYERSERVICE001_NONEXIST=
Then we call as below
Rest.StartServiceSession(Map.BAYERREST.BAYERSERVICE001, "http://www.thomas-bayer.com/sqlrest/");
//within session, try to get javascript text content from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/",
//which is concatenated by parameter relativeURI "CUSTOMER/" and baseURL "http://www.thomas-bayer.com/sqlrest/" stored in session.
Rest.GetScript(Map.BAYERREST.BAYERSERVICE001, "CUSTOMER/", "ResponseIDVariable" );
Rest.EndServiceSession(Map.BAYERREST.BAYERSERVICE001);
//BAYERSERVICE001_NONEXIST is defined as empty string, which is not a valid session ID.
//out of session, try to get javascript text content from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/"
Rest.GetScript(Map.BAYERREST.BAYERSERVICE001_NONEXIST, "http://www.thomas-bayer.com/sqlrest/CUSTOMER/", "ResponseIDVariable" );
public static boolean GetText(Component comp, java.lang.String... params)
comp
- org.safs.model.Component, it does not represent a real GUI component.params
- String[], parameters
Sets prevResults TestRecordHelper to the results received or null if an error occurred.
SAFSPlus.prevResults
,
TestRecordData.getStatusCode()
,
TestRecordData.getStatusInfo()
,
#StartWebBrowser(String, String, String...)
We can define map file as below:
[BAYERREST]
BAYERREST=SAFSREST
BAYERSERVICE001=SESSION_ID_BAYERSERVICE001
BAYERSERVICE001_NONEXIST=
Then we call as below
Rest.StartServiceSession(Map.BAYERREST.BAYERSERVICE001, "http://www.thomas-bayer.com/sqlrest/");
//within session, try to get plain text content from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/",
//which is concatenated by parameter relativeURI "CUSTOMER/" and baseURL "http://www.thomas-bayer.com/sqlrest/" stored in session.
Rest.GetText(Map.BAYERREST.BAYERSERVICE001, "CUSTOMER/", "ResponseIDVariable" );
Rest.EndServiceSession(Map.BAYERREST.BAYERSERVICE001);
//BAYERSERVICE001_NONEXIST is defined as empty string, which is not a valid session ID.
//out of session, try to get plain text content from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/"
Rest.GetText(Map.BAYERREST.BAYERSERVICE001_NONEXIST, "http://www.thomas-bayer.com/sqlrest/CUSTOMER/", "ResponseIDVariable" );
public static boolean GetXML(Component comp, java.lang.String... params)
comp
- org.safs.model.Component, it does not represent a real GUI component.params
- String[], parameters
Sets prevResults TestRecordHelper to the results received or null if an error occurred.
SAFSPlus.prevResults
,
TestRecordData.getStatusCode()
,
TestRecordData.getStatusInfo()
,
#StartWebBrowser(String, String, String...)
We can define map file as below:
[BAYERREST]
BAYERREST=SAFSREST
BAYERSERVICE001=SESSION_ID_BAYERSERVICE001
BAYERSERVICE001_NONEXIST=
Then we call as below
Rest.StartServiceSession(Map.BAYERREST.BAYERSERVICE001, "http://www.thomas-bayer.com/sqlrest/");
//within session, try to get xml text content from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/",
//which is concatenated by parameter relativeURI "CUSTOMER/" and baseURL "http://www.thomas-bayer.com/sqlrest/" stored in session.
Rest.GetXML(Map.BAYERREST.BAYERSERVICE001, "CUSTOMER/", "ResponseIDVariable" );
Rest.EndServiceSession(Map.BAYERREST.BAYERSERVICE001);
//BAYERSERVICE001_NONEXIST is defined as empty string, which is not a valid session ID.
//out of session, try to get xml text content from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/"
Rest.GetXML(Map.BAYERREST.BAYERSERVICE001_NONEXIST, "http://www.thomas-bayer.com/sqlrest/CUSTOMER/", "ResponseIDVariable" );
public static boolean HeadBinary(Component comp, java.lang.String... params)
comp
- org.safs.model.Component, it does not represent a real GUI component.params
- String[], parameters
Sets prevResults TestRecordHelper to the results received or null if an error occurred.
SAFSPlus.prevResults
,
TestRecordData.getStatusCode()
,
TestRecordData.getStatusInfo()
,
#StartWebBrowser(String, String, String...)
We can define map file as below:
[BAYERREST]
BAYERREST=SAFSREST
BAYERSERVICE001=SESSION_ID_BAYERSERVICE001
BAYERSERVICE001_NONEXIST=
Then we call as below
Rest.StartServiceSession(Map.BAYERREST.BAYERSERVICE001, "http://www.thomas-bayer.com/sqlrest/");
//within session, try to get binary content (only the head part) from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/",
//which is concatenated by parameter relativeURI "CUSTOMER/" and baseURL "http://www.thomas-bayer.com/sqlrest/" stored in session.
Rest.HeadBinary(Map.BAYERREST.BAYERSERVICE001, "CUSTOMER/", "ResponseIDVariable" );
Rest.EndServiceSession(Map.BAYERREST.BAYERSERVICE001);
//BAYERSERVICE001_NONEXIST is defined as empty string, which is not a valid session ID.
//out of session, try to get binary content from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/"
Rest.HeadBinary(Map.BAYERREST.BAYERSERVICE001_NONEXIST, "http://www.thomas-bayer.com/sqlrest/CUSTOMER/", "ResponseIDVariable" );
public static boolean HeadCSS(Component comp, java.lang.String... params)
comp
- org.safs.model.Component, it does not represent a real GUI component.params
- String[], parameters
Sets prevResults TestRecordHelper to the results received or null if an error occurred.
SAFSPlus.prevResults
,
TestRecordData.getStatusCode()
,
TestRecordData.getStatusInfo()
,
#StartWebBrowser(String, String, String...)
We can define map file as below:
[BAYERREST]
BAYERREST=SAFSREST
BAYERSERVICE001=SESSION_ID_BAYERSERVICE001
BAYERSERVICE001_NONEXIST=
Then we call as below
Rest.StartServiceSession(Map.BAYERREST.BAYERSERVICE001, "http://www.thomas-bayer.com/sqlrest/");
//within session, try to get css content (only the head part) from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/",
//which is concatenated by parameter relativeURI "CUSTOMER/" and baseURL "http://www.thomas-bayer.com/sqlrest/" stored in session.
Rest.HeadCSS(Map.BAYERREST.BAYERSERVICE001, "CUSTOMER/", "ResponseIDVariable" );
Rest.EndServiceSession(Map.BAYERREST.BAYERSERVICE001);
//BAYERSERVICE001_NONEXIST is defined as empty string, which is not a valid session ID.
//out of session, try to get binary content from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/"
Rest.HeadCSS(Map.BAYERREST.BAYERSERVICE001_NONEXIST, "http://www.thomas-bayer.com/sqlrest/CUSTOMER/", "ResponseIDVariable" );
public static boolean HeadCustom(Component comp, java.lang.String... params)
comp
- org.safs.model.Component, it does not represent a real GUI component.params
- String[], parameters
Sets prevResults TestRecordHelper to the results received or null if an error occurred.
SAFSPlus.prevResults
,
TestRecordData.getStatusCode()
,
TestRecordData.getStatusInfo()
,
#StartWebBrowser(String, String, String...)
We can define map file as below:
[BAYERREST]
BAYERREST=SAFSREST
BAYERSERVICE001=SESSION_ID_BAYERSERVICE001
BAYERSERVICE001_NONEXIST=
Then we call as below
Rest.StartServiceSession(Map.BAYERREST.BAYERSERVICE001, "http://www.thomas-bayer.com/sqlrest/");
//within session, try to get css content (only the head part) from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/",
//which is concatenated by parameter relativeURI "CUSTOMER/" and baseURL "http://www.thomas-bayer.com/sqlrest/" stored in session.
Rest.HeadCSS(Map.BAYERREST.BAYERSERVICE001, "CUSTOMER/", "ResponseIDVariable" );
Rest.EndServiceSession(Map.BAYERREST.BAYERSERVICE001);
//BAYERSERVICE001_NONEXIST is defined as empty string, which is not a valid session ID.
//out of session, try to get binary content from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/"
Rest.HeadCSS(Map.BAYERREST.BAYERSERVICE001_NONEXIST, "http://www.thomas-bayer.com/sqlrest/CUSTOMER/", "ResponseIDVariable" );
public static boolean HeadHTML(Component comp, java.lang.String... params)
comp
- org.safs.model.Component, it does not represent a real GUI component.params
- String[], parameters
Sets prevResults TestRecordHelper to the results received or null if an error occurred.
SAFSPlus.prevResults
,
TestRecordData.getStatusCode()
,
TestRecordData.getStatusInfo()
,
#StartWebBrowser(String, String, String...)
We can define map file as below:
[BAYERREST]
BAYERREST=SAFSREST
BAYERSERVICE001=SESSION_ID_BAYERSERVICE001
BAYERSERVICE001_NONEXIST=
Then we call as below
Rest.StartServiceSession(Map.BAYERREST.BAYERSERVICE001, "http://www.thomas-bayer.com/sqlrest/");
//within session, try to get html content (only the head part) from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/",
//which is concatenated by parameter relativeURI "CUSTOMER/" and baseURL "http://www.thomas-bayer.com/sqlrest/" stored in session.
Rest.HeadHTML(Map.BAYERREST.BAYERSERVICE001, "CUSTOMER/", "ResponseIDVariable" );
Rest.EndServiceSession(Map.BAYERREST.BAYERSERVICE001);
//BAYERSERVICE001_NONEXIST is defined as empty string, which is not a valid session ID.
//out of session, try to get binary content from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/"
Rest.HeadHTML(Map.BAYERREST.BAYERSERVICE001_NONEXIST, "http://www.thomas-bayer.com/sqlrest/CUSTOMER/", "ResponseIDVariable" );
public static boolean HeadImage(Component comp, java.lang.String... params)
comp
- org.safs.model.Component, it does not represent a real GUI component.params
- String[], parameters
Sets prevResults TestRecordHelper to the results received or null if an error occurred.
SAFSPlus.prevResults
,
TestRecordData.getStatusCode()
,
TestRecordData.getStatusInfo()
,
#StartWebBrowser(String, String, String...)
We can define map file as below:
[BAYERREST]
BAYERREST=SAFSREST
BAYERSERVICE001=SESSION_ID_BAYERSERVICE001
BAYERSERVICE001_NONEXIST=
Then we call as below
Rest.StartServiceSession(Map.BAYERREST.BAYERSERVICE001, "http://www.thomas-bayer.com/sqlrest/");
//within session, try to get image content (only the head part) from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/",
//which is concatenated by parameter relativeURI "CUSTOMER/" and baseURL "http://www.thomas-bayer.com/sqlrest/" stored in session.
Rest.HeadImage(Map.BAYERREST.BAYERSERVICE001, "CUSTOMER/", "ResponseIDVariable" );
Rest.EndServiceSession(Map.BAYERREST.BAYERSERVICE001);
//BAYERSERVICE001_NONEXIST is defined as empty string, which is not a valid session ID.
//out of session, try to get binary content from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/"
Rest.HeadImage(Map.BAYERREST.BAYERSERVICE001_NONEXIST, "http://www.thomas-bayer.com/sqlrest/CUSTOMER/", "ResponseIDVariable" );
public static boolean HeadJSON(Component comp, java.lang.String... params)
comp
- org.safs.model.Component, it does not represent a real GUI component.params
- String[], parameters
Sets prevResults TestRecordHelper to the results received or null if an error occurred.
SAFSPlus.prevResults
,
TestRecordData.getStatusCode()
,
TestRecordData.getStatusInfo()
,
#StartWebBrowser(String, String, String...)
We can define map file as below:
[BAYERREST]
BAYERREST=SAFSREST
BAYERSERVICE001=SESSION_ID_BAYERSERVICE001
BAYERSERVICE001_NONEXIST=
Then we call as below
Rest.StartServiceSession(Map.BAYERREST.BAYERSERVICE001, "http://www.thomas-bayer.com/sqlrest/");
//within session, try to get json content (only the head part) from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/",
//which is concatenated by parameter relativeURI "CUSTOMER/" and baseURL "http://www.thomas-bayer.com/sqlrest/" stored in session.
Rest.HeadJSON(Map.BAYERREST.BAYERSERVICE001, "CUSTOMER/", "ResponseIDVariable" );
Rest.EndServiceSession(Map.BAYERREST.BAYERSERVICE001);
//BAYERSERVICE001_NONEXIST is defined as empty string, which is not a valid session ID.
//out of session, try to get binary content from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/"
Rest.HeadJSON(Map.BAYERREST.BAYERSERVICE001_NONEXIST, "http://www.thomas-bayer.com/sqlrest/CUSTOMER/", "ResponseIDVariable" );
public static boolean HeadScript(Component comp, java.lang.String... params)
comp
- org.safs.model.Component, it does not represent a real GUI component.params
- String[], parameters
Sets prevResults TestRecordHelper to the results received or null if an error occurred.
SAFSPlus.prevResults
,
TestRecordData.getStatusCode()
,
TestRecordData.getStatusInfo()
,
#StartWebBrowser(String, String, String...)
We can define map file as below:
[BAYERREST]
BAYERREST=SAFSREST
BAYERSERVICE001=SESSION_ID_BAYERSERVICE001
BAYERSERVICE001_NONEXIST=
Then we call as below
Rest.StartServiceSession(Map.BAYERREST.BAYERSERVICE001, "http://www.thomas-bayer.com/sqlrest/");
//within session, try to get javascript content (only the head part) from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/",
//which is concatenated by parameter relativeURI "CUSTOMER/" and baseURL "http://www.thomas-bayer.com/sqlrest/" stored in session.
Rest.HeadScript(Map.BAYERREST.BAYERSERVICE001, "CUSTOMER/", "ResponseIDVariable" );
Rest.EndServiceSession(Map.BAYERREST.BAYERSERVICE001);
//BAYERSERVICE001_NONEXIST is defined as empty string, which is not a valid session ID.
//out of session, try to get binary content from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/"
Rest.HeadScript(Map.BAYERREST.BAYERSERVICE001_NONEXIST, "http://www.thomas-bayer.com/sqlrest/CUSTOMER/", "ResponseIDVariable" );
public static boolean HeadText(Component comp, java.lang.String... params)
comp
- org.safs.model.Component, it does not represent a real GUI component.params
- String[], parameters
Sets prevResults TestRecordHelper to the results received or null if an error occurred.
SAFSPlus.prevResults
,
TestRecordData.getStatusCode()
,
TestRecordData.getStatusInfo()
,
#StartWebBrowser(String, String, String...)
We can define map file as below:
[BAYERREST]
BAYERREST=SAFSREST
BAYERSERVICE001=SESSION_ID_BAYERSERVICE001
BAYERSERVICE001_NONEXIST=
Then we call as below
Rest.StartServiceSession(Map.BAYERREST.BAYERSERVICE001, "http://www.thomas-bayer.com/sqlrest/");
//within session, try to get text content (only the head part) from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/",
//which is concatenated by parameter relativeURI "CUSTOMER/" and baseURL "http://www.thomas-bayer.com/sqlrest/" stored in session.
Rest.HeadText(Map.BAYERREST.BAYERSERVICE001, "CUSTOMER/", "ResponseIDVariable" );
Rest.EndServiceSession(Map.BAYERREST.BAYERSERVICE001);
//BAYERSERVICE001_NONEXIST is defined as empty string, which is not a valid session ID.
//out of session, try to get binary content from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/"
Rest.HeadText(Map.BAYERREST.BAYERSERVICE001_NONEXIST, "http://www.thomas-bayer.com/sqlrest/CUSTOMER/", "ResponseIDVariable" );
public static boolean HeadXML(Component comp, java.lang.String... params)
comp
- org.safs.model.Component, it does not represent a real GUI component.params
- String[], parameters
Sets prevResults TestRecordHelper to the results received or null if an error occurred.
SAFSPlus.prevResults
,
TestRecordData.getStatusCode()
,
TestRecordData.getStatusInfo()
,
#StartWebBrowser(String, String, String...)
We can define map file as below:
[BAYERREST]
BAYERREST=SAFSREST
BAYERSERVICE001=SESSION_ID_BAYERSERVICE001
BAYERSERVICE001_NONEXIST=
Then we call as below
Rest.StartServiceSession(Map.BAYERREST.BAYERSERVICE001, "http://www.thomas-bayer.com/sqlrest/");
//within session, try to get xml content (only the head part) from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/",
//which is concatenated by parameter relativeURI "CUSTOMER/" and baseURL "http://www.thomas-bayer.com/sqlrest/" stored in session.
Rest.HeadXML(Map.BAYERREST.BAYERSERVICE001, "CUSTOMER/", "ResponseIDVariable" );
Rest.EndServiceSession(Map.BAYERREST.BAYERSERVICE001);
//BAYERSERVICE001_NONEXIST is defined as empty string, which is not a valid session ID.
//out of session, try to get binary content from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/"
Rest.HeadXML(Map.BAYERREST.BAYERSERVICE001_NONEXIST, "http://www.thomas-bayer.com/sqlrest/CUSTOMER/", "ResponseIDVariable" );
@Deprecated public static boolean HeaderXML(Component comp, java.lang.String... params)
HeadXML(org.safs.model.Component, String...)
public static boolean PatchBinary(Component comp, java.lang.String... params)
public static boolean PatchCSS(Component comp, java.lang.String... params)
public static boolean PatchCustom(Component comp, java.lang.String... params)
public static boolean PatchHTML(Component comp, java.lang.String... params)
public static boolean PatchImage(Component comp, java.lang.String... params)
public static boolean PatchJSON(Component comp, java.lang.String... params)
public static boolean PatchScript(Component comp, java.lang.String... params)
public static boolean PatchText(Component comp, java.lang.String... params)
public static boolean PatchXML(Component comp, java.lang.String... params)
public static boolean PostBinary(Component comp, java.lang.String... params)
public static boolean PostCSS(Component comp, java.lang.String... params)
public static boolean PostCustom(Component comp, java.lang.String... params)
public static boolean PostHTML(Component comp, java.lang.String... params)
public static boolean PostImage(Component comp, java.lang.String... params)
public static boolean PostJSON(Component comp, java.lang.String... params)
public static boolean PostScript(Component comp, java.lang.String... params)
public static boolean PostText(Component comp, java.lang.String... params)
public static boolean PostXML(Component comp, java.lang.String... params)
public static boolean PutBinary(Component comp, java.lang.String... params)
public static boolean PutCSS(Component comp, java.lang.String... params)
comp
- org.safs.model.Component, it does not represent a real GUI component.params
- String[], parameters
Sets prevResults TestRecordHelper to the results received or null if an error occurred.
SAFSPlus.prevResults
,
TestRecordData.getStatusCode()
,
TestRecordData.getStatusInfo()
,
#StartWebBrowser(String, String, String...)
We can define map file as below:
[SERVICETEST]
SERVICETEST=SAFSREST
SERVICE001=SESSION_ID_SERVICE001
SERVICE001_NONEXIST=
Then we call as below
Rest.StartServiceSession(Map.SERVICETEST.SERVICE001, "http://www.service.com/");
//within session, try to put css content to URL "http://www.service.com/cssStyles/61/",
//which is concatenated by parameter relativeURI "cssStyles/61/" and baseURL "http://www.service.com/" stored in session.
Rest.PutCSS(Map.SERVICETEST.SERVICE001, "cssStyles/61/", "ResponseIDVariable", "user.css" );
Rest.EndServiceSession(Map.SERVICETEST.SERVICE001);
//SERVICE001_NONEXIST is defined as empty string, which is not a valid session ID.
//out of session, try to put css content to URL "http://www.service.com/cssStyles/61/"
Rest.PutCSS(Map.SERVICETEST.SERVICE001_NONEXIST, "http://www.service.com/cssStyles/61/", "ResponseIDVariable", "user.css");
public static boolean PutCustom(Component comp, java.lang.String... params)
comp
- org.safs.model.Component, it does not represent a real GUI component.params
- String[], parameters
Sets prevResults TestRecordHelper to the results received or null if an error occurred.
SAFSPlus.prevResults
,
TestRecordData.getStatusCode()
,
TestRecordData.getStatusInfo()
,
#StartWebBrowser(String, String, String...)
We can define map file as below:
[SERVICETEST]
SERVICETEST=SAFSREST
SERVICE001=SESSION_ID_SERVICE001
SERVICE001_NONEXIST=
Then we call as below
Rest.StartServiceSession(Map.SERVICETEST.SERVICE001, "http://www.service.com/");
//within session, try to put html content to URL "http://www.service.com/entities/61/",
//which is concatenated by parameter relativeURI "entities/61/" and baseURL "http://www.service.com/" stored in session.
//The headers (sent with 'put' method) are defined in the project-relative file "customHeader.txt".
//"entityFile" is a project-relative file containing the content to send with 'put' command, its content type should be defined in "customHeader.txt".
Rest.PutHTML(Map.SERVICETEST.SERVICE001, "entities/61/", "ResponseIDVariable", "entityFile", "customHeader.txt");
Rest.EndServiceSession(Map.SERVICETEST.SERVICE001);
//SERVICE001_NONEXIST is defined as empty string, which is not a valid session ID.
//out of session, try to put html content to URL "http://www.service.com/entities/61/"
//The headers (sent with 'put' method) are defined in the project-relative file "customHeader.txt".
//"entityFile" is a project-relative file containing the content to send with 'put' command, its content type should be defined in "customHeader.txt".
Rest.PutHTML(Map.SERVICETEST.SERVICE001_NONEXIST, "http://www.service.com/entities/61/", "ResponseIDVariable", "entityFile", "customHeader.txt");
public static boolean PutHTML(Component comp, java.lang.String... params)
comp
- org.safs.model.Component, it does not represent a real GUI component.params
- String[], parameters
Sets prevResults TestRecordHelper to the results received or null if an error occurred.
SAFSPlus.prevResults
,
TestRecordData.getStatusCode()
,
TestRecordData.getStatusInfo()
,
#StartWebBrowser(String, String, String...)
We can define map file as below:
[SERVICETEST]
SERVICETEST=SAFSREST
SERVICE001=SESSION_ID_SERVICE001
SERVICE001_NONEXIST=
Then we call as below
Rest.StartServiceSession(Map.SERVICETEST.SERVICE001, "http://www.service.com/");
//within session, try to put html content to URL "http://www.service.com/htmlContents/61/",
//which is concatenated by parameter relativeURI "htmlContents/61/" and baseURL "http://www.service.com/" stored in session.
Rest.PutHTML(Map.SERVICETEST.SERVICE001, "htmlContents/61/", "ResponseIDVariable", "userEntity.html" );
Rest.EndServiceSession(Map.SERVICETEST.SERVICE001);
//SERVICE001_NONEXIST is defined as empty string, which is not a valid session ID.
//out of session, try to put html content to URL "http://www.service.com/htmlContents/61/"
Rest.PutHTML(Map.SERVICETEST.SERVICE001_NONEXIST, "http://www.service.com/htmlContents/61/", "ResponseIDVariable", "userEntity.html");
public static boolean PutImage(Component comp, java.lang.String... params)
public static boolean PutJSON(Component comp, java.lang.String... params)
comp
- org.safs.model.Component, it does not represent a real GUI component.params
- String[], parameters
Sets prevResults TestRecordHelper to the results received or null if an error occurred.
SAFSPlus.prevResults
,
TestRecordData.getStatusCode()
,
TestRecordData.getStatusInfo()
,
#StartWebBrowser(String, String, String...)
We can define map file as below:
[SERVICETEST]
SERVICETEST=SAFSREST
SERVICE001=SESSION_ID_SERVICE001
SERVICE001_NONEXIST=
Then we call as below
Rest.StartServiceSession(Map.SERVICETEST.SERVICE001, "http://www.service.com/");
//within session, try to put json content to URL "http://www.service.com/users/61/",
//which is concatenated by parameter relativeURI "users/61/" and baseURL "http://www.service.com/" stored in session.
Rest.PutJSON(Map.SERVICETEST.SERVICE001, "users/61/", "ResponseIDVariable", "userEntity.json" );
Rest.EndServiceSession(Map.SERVICETEST.SERVICE001);
//SERVICE001_NONEXIST is defined as empty string, which is not a valid session ID.
//out of session, try to put json content to URL "http://www.service.com/users/61/"
Rest.PutJSON(Map.SERVICETEST.SERVICE001_NONEXIST, "http://www.service.com/users/61/", "ResponseIDVariable", "userEntity.json");
public static boolean PutScript(Component comp, java.lang.String... params)
comp
- org.safs.model.Component, it does not represent a real GUI component.params
- String[], parameters
Sets prevResults TestRecordHelper to the results received or null if an error occurred.
SAFSPlus.prevResults
,
TestRecordData.getStatusCode()
,
TestRecordData.getStatusInfo()
,
#StartWebBrowser(String, String, String...)
We can define map file as below:
[SERVICETEST]
SERVICETEST=SAFSREST
SERVICE001=SESSION_ID_SERVICE001
SERVICE001_NONEXIST=
Then we call as below
Rest.StartServiceSession(Map.SERVICETEST.SERVICE001, "http://www.service.com/");
//within session, try to put script content to URL "http://www.service.com/scripts/61/",
//which is concatenated by parameter relativeURI "scripts/61/" and baseURL "http://www.service.com/" stored in session.
Rest.PutScript(Map.SERVICETEST.SERVICE001, "scripts/61/", "ResponseIDVariable", "scriptEntity.txt" );
Rest.EndServiceSession(Map.SERVICETEST.SERVICE001);
//SERVICE001_NONEXIST is defined as empty string, which is not a valid session ID.
//out of session, try to put script content to URL "http://www.service.com/scripts/61/"
Rest.PutScript(Map.SERVICETEST.SERVICE001_NONEXIST, "http://www.service.com/scripts/61/", "ResponseIDVariable", "scriptEntity.txt");
public static boolean PutText(Component comp, java.lang.String... params)
comp
- org.safs.model.Component, it does not represent a real GUI component.params
- String[], parameters
Sets prevResults TestRecordHelper to the results received or null if an error occurred.
SAFSPlus.prevResults
,
TestRecordData.getStatusCode()
,
TestRecordData.getStatusInfo()
,
#StartWebBrowser(String, String, String...)
We can define map file as below:
[SERVICETEST]
SERVICETEST=SAFSREST
SERVICE001=SESSION_ID_SERVICE001
SERVICE001_NONEXIST=
Then we call as below
Rest.StartServiceSession(Map.SERVICETEST.SERVICE001, "http://www.service.com/");
//within session, try to put text content to URL "http://www.service.com/users/61/",
//which is concatenated by parameter relativeURI "users/61/" and baseURL "http://www.service.com/" stored in session.
Rest.PutText(Map.SERVICETEST.SERVICE001, "users/61/", "ResponseIDVariable", "userEntity.txt" );
Rest.EndServiceSession(Map.SERVICETEST.SERVICE001);
//SERVICE001_NONEXIST is defined as empty string, which is not a valid session ID.
//out of session, try to put text content to URL "http://www.service.com/users/61/"
Rest.PutText(Map.SERVICETEST.SERVICE001_NONEXIST, "http://www.service.com/users/61/", "ResponseIDVariable", "userEntity.txt");
public static boolean PutXML(Component comp, java.lang.String... params)
comp
- org.safs.model.Component, it does not represent a real GUI component.params
- String[], parameters
Sets prevResults TestRecordHelper to the results received or null if an error occurred.
SAFSPlus.prevResults
,
TestRecordData.getStatusCode()
,
TestRecordData.getStatusInfo()
,
#StartWebBrowser(String, String, String...)
We can define map file as below:
[BAYERREST]
BAYERREST=SAFSREST
BAYERSERVICE001=SESSION_ID_BAYERSERVICE001
BAYERSERVICE001_NONEXIST=
Then we call as below
Rest.StartServiceSession(Map.BAYERREST.BAYERSERVICE001, "http://www.thomas-bayer.com/sqlrest/");
//within session, try to put xml content to URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/61/",
//which is concatenated by parameter relativeURI "CUSTOMER/61/" and baseURL "http://www.thomas-bayer.com/sqlrest/" stored in session.
Rest.PutXML(Map.BAYERREST.BAYERSERVICE001, "CUSTOMER/61/", "ResponseIDVariable", "customerEntity.xml" );
Rest.EndServiceSession(Map.BAYERREST.BAYERSERVICE001);
//BAYERSERVICE001_NONEXIST is defined as empty string, which is not a valid session ID.
//out of session, try to put xml content to URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/61/"
Rest.PutXML(Map.BAYERREST.BAYERSERVICE001_NONEXIST, "http://www.thomas-bayer.com/sqlrest/CUSTOMER/61/", "ResponseIDVariable", "customerEntity.xml");
public static boolean Request(Component comp, java.lang.String... params)
comp
- org.safs.model.Component, it does not represent a real GUI component.params
- String[], parameters
Sets prevResults TestRecordHelper to the results received or null if an error occurred.
SAFSPlus.prevResults
,
TestRecordData.getStatusCode()
,
TestRecordData.getStatusInfo()
,
#StartWebBrowser(String, String, String...)
We can define map file as below:
[BAYERREST]
BAYERREST=SAFSREST
BAYERSERVICE001=SESSION_ID_BAYERSERVICE001
BAYERSERVICE001_NONEXIST=
Then we call as below
Rest.StartServiceSession(Map.BAYERREST.BAYERSERVICE001, "http://www.thomas-bayer.com/sqlrest/");
//within session, try to GET XML content from URL "http://www.thomas-bayer.com/sqlrest/CUSTOMER/",
//which is concatenated by parameter relativeURI "CUSTOMER/" and baseURL "http://www.thomas-bayer.com/sqlrest/" stored in session.
Rest.Request(Map.BAYERREST.BAYERSERVICE001, "GET", "CUSTOMER/", "ResponseIDVariable", "", "Accept: text/xml");
Rest.EndServiceSession(Map.BAYERREST.BAYERSERVICE001);
//BAYERSERVICE001_NONEXIST is defined as empty string, which is not a valid session ID.
//out of session, try to get content from URL "http://www.thomas-bayer.com/CUSTOMER/".
//The headers "If-Modified-Since: Sat, 29 OCT 1994 19:43:31 GMT" will be sent with 'get' method.
Rest.Request(Map.BAYERREST.BAYERSERVICE001_NONEXIST, "GET", "http://www.thomas-bayer.com/sqlrest/CUSTOMER/", "ResponseIDVariable", "", "If-Modified-Since: Sat, 29 OCT 1994 19:43:31 GMT");
public static boolean StartServiceSession(Component comp, java.lang.String... params)
comp
- org.safs.model.Component, it does not represent a real GUI component.params
- String[], optional parameters.
Sets prevResults TestRecordHelper to the results received or null if an error occurred.
SAFSPlus.prevResults
,
TestRecordData.getStatusCode()
,
TestRecordData.getStatusInfo()
,
#StartWebBrowser(String, String, String...)
We can define map file as below: [BAYERREST] BAYERREST=SAFSREST BAYERSERVICE001=SESSION_ID_BAYERSERVICE001 Then we can start a session with global authentication (VM parameter, Map) if exist.//Start a session identified by 'SESSION_ID_BAYERSERVICE001', with base URL 'http://www.thomas-bayer.com/'. Rest.StartServiceSession(Map.BAYERREST.BAYERSERVICE001, "http://www.thomas-bayer.com/sqlrest/"); //do some rest test ... Rest.EndServiceSession(Map.BAYERREST.BAYERSERVICE001);
Or, we can start a session with custom authentication//Start a session identified by 'SESSION_ID_BAYERSERVICE001', with base URL 'http://www.thomas-bayer.com/' //and a custom authentication stored in <project>/configure/simpleauth.xml. Rest.StartServiceSession(Map.BAYERREST.BAYERSERVICE001, "http://www.thomas-bayer.com/sqlrest/", "configure/simpleauth.xml"); //do some rest test ... Rest.EndServiceSession(Map.BAYERREST.BAYERSERVICE001);
Or, we can start a session without any authentication even the global authentication is defined.//Start a session identified by 'SESSION_ID_BAYERSERVICE001', with base URL 'http://www.thomas-bayer.com/', and without any authentication. Rest.StartServiceSession(Map.BAYERREST.BAYERSERVICE001, "http://www.thomas-bayer.com/sqlrest/", "NOAUTHENTICATION"); //do some rest test ... Rest.EndServiceSession(Map.BAYERREST.BAYERSERVICE001);
public static boolean CleanResponseMap(java.lang.String... params)
public static boolean DeleteResponse(java.lang.String... params)
public static boolean DeleteResponseStore(java.lang.String... params)
public static boolean HeadersLoad(java.lang.String... params)
public static boolean StoreResponse(java.lang.String... params)
public static boolean VerifyResponse(java.lang.String... params)
public static boolean VerifyResponseContains(java.lang.String... params)
Copyright © SAS Institute. All Rights Reserved.