public class ApiRequest
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
byte[] |
baRequest
do dot use.
|
eve.io.File |
fRequest
The request File
|
java.lang.String |
lastError
The last error message
|
java.lang.String |
name
The name of the request
|
java.lang.String |
password
The password used for authentication
|
XMLElement |
soapHeader
do not use
|
java.lang.String |
soapPrefix
do not use
|
java.lang.String |
stEnc
do not use.
|
long |
uniqueID
The ID of the request
|
java.lang.String |
username
The username used for authentication
|
java.util.Vector |
vXml
do not use.
|
XMLElement |
xRequest
The request file as XMLElement
|
Constructor and Description |
---|
ApiRequest(java.lang.String name,
long ID)
Creates a new ApiRequest.
|
Modifier and Type | Method and Description |
---|---|
boolean |
fillInputFields(java.util.Vector inputData)
Fills the input fields from the strings in a Vector
The vector size must match the amount of input fields in the request (marked with wst_title attribute) |
java.util.Hashtable |
getHeaderFields()
Gets the http header fields that were set with setHeaderFields
|
java.lang.Object |
getPOSTdata()
Returns the POSTdata
|
ApiWebservice |
getWebservice()
Returns the webservice this request belongs to
|
boolean |
loadRequestFile()
Loads the XML request file for this ApiRequest
This method is used by the API.getRequestBy... methods.
|
static java.lang.String |
replaceGlobalVars(java.lang.String inputString) |
void |
setHeaderField(java.lang.String name,
java.lang.String value)
Adds a custom HTTP header field to the request or removes it.
|
void |
setPassword(java.lang.String password)
Sets the password to be used for authentication.
|
boolean |
setPOSTdata(java.lang.Object data,
java.lang.String contentType)
Sets the POST data to be sent for POST messages.
|
void |
setUsername(java.lang.String username)
Sets the username to be used
|
boolean |
updateRequestFile()
Updates the XML request file with the input fields content
|
public java.lang.String name
public long uniqueID
public java.lang.String username
public java.lang.String password
public java.lang.String lastError
public XMLElement xRequest
public XMLElement soapHeader
public eve.io.File fRequest
public byte[] baRequest
public java.lang.String stEnc
public java.util.Vector vXml
public java.lang.String soapPrefix
public ApiRequest(java.lang.String name, long ID)
name
- -ID
- -public boolean fillInputFields(java.util.Vector inputData)
inputData
- A Vector of Strings with input data.public java.util.Hashtable getHeaderFields()
public java.lang.Object getPOSTdata()
public ApiWebservice getWebservice()
public boolean loadRequestFile()
public static java.lang.String replaceGlobalVars(java.lang.String inputString)
public void setHeaderField(java.lang.String name, java.lang.String value)
name
- The name of the fieldvalue
- The value of the field. If set to "" the field is removedpublic boolean setPOSTdata(java.lang.Object data, java.lang.String contentType)
data
- The POST data as String or eve.util.ByteArraycontentType
- The Content-Type of the datapublic void setPassword(java.lang.String password)
password
- The passwordpublic void setUsername(java.lang.String username)
username
- The user name to be usedpublic boolean updateRequestFile()