com.appperfect.devcommon.script
Interface SoapScript

All Superinterfaces:
IScript

public interface SoapScript
extends IScript

A request object which can be executed by IScriptEngine.execute(request) method.

An object of this class is created using createSoapRequest method of IScriptEngine. Once the object is created, it should be populated as per the requirements of the SOAP protocol and then executed using IScriptEngine.


Field Summary
static int DOCUMENT
  
static int ONE_WAY
  
static int REQUEST_RESPONSE
  
static int RPC
  
static int SOAP_1_1
  
static int SOAP_1_2
  
 
Method Summary
 void addHeader(java.lang.String headerName, java.lang.String headerValue, java.lang.String testParameterName)
 Each HTTP request sends a set of headers to the server, which helps the server understand the kind of request.
 void addParameter(java.lang.String parameterName, java.lang.String parameterValue, java.lang.String testParameterName)
 Use this method to add SOAP parameters.
 void addSoapAttachment(java.lang.String parameterName, java.lang.String attachment, java.lang.String contentId, java.lang.String contentType, java.lang.String testParameterName)
 Use this method to add Attachments in a Soap request
 void addSoapHeader(java.lang.String parameterName, java.lang.String parameterValue, java.lang.String testParameterName)
 Use this method to add SOAP headers.
 void addSoapHeader(java.lang.String parameterName, java.lang.String parameterValue, java.lang.String testParameterName, java.lang.String mustUnderstand, java.lang.String actor)
 Use this method to add SOAP headers.
 void addThinkTime(int virtualUser, int type, int startValue, int endValue, int valueType)
 Delay in seconds before the task is actually executed.
 boolean assertInDatabase(java.lang.String description, java.lang.String databaseId, java.lang.String query)
 Once the task is executed, database can be validated by firing the specified SELECT query
 boolean assertSoapElement(java.lang.String description, java.lang.String attributeName, java.lang.String attributeValue)
 Once the task is executed, attributes of the node in the DOM tree of the SOAP response data can be validated.
 boolean assertSoapFault(java.lang.String description, java.lang.String faultCode)
 Once the task is executed, Soap Response can be validated for any soap fault.
 boolean assertText(java.lang.String description, java.lang.String[] txt, boolean bCaseSensitive, boolean contains, boolean bAll, boolean checkForExistance, boolean regularExpression)
 Once the task is executed, response can be validated for presence/absence of some text along with other attributes for fine-tuning the search
 boolean assertText(java.lang.String description, java.lang.String[] txt, boolean bCaseSensitive, boolean contains, boolean bAll, boolean checkForExistance, boolean regularExpression, java.lang.String prefix, java.lang.String suffix)
 Once the task is executed, response can be validated for presence/absence of some text along with other attributes for fine-tuning the search
 boolean assertText(java.lang.String description, java.lang.String txt, boolean bCaseSensitive, boolean checkForExistance, boolean regularExpression)
 Once the task is executed, response can be validated for presence/absence of some text along with other attributes for fine-tuning the search
 boolean assertText(java.lang.String description, java.lang.String txt, boolean bCaseSensitive, boolean checkForExistance, boolean regularExpression, java.lang.String prefix, java.lang.String suffix)
 Once the task is executed, response can be validated for presence/absence of some text along with other attributes for fine-tuning the search
 boolean assertTodaysDate(java.lang.String description, java.lang.String dateFormat)
 Once the task is executed, response can be validated to contain today's date in specified format
 boolean assertTodaysDate(java.lang.String description, java.lang.String dateFormat, java.lang.String prefix, java.lang.String suffix)
 Once the task is executed, response can be validated to contain today's date in specified format
 java.lang.String getResponse()
 After task execution the response page can be fetched using this method
 int getResponseCode()
 Get Response Code as a result of task execution
 long getResponseTime()
 Get the response time of executed task
 IValidationResult getValidationResult()
 Once the task is executed, detailed validation result can be fetched using this method.
 boolean isValidationSuccessful()
 Once the task is executed, this method returns the status of the validation carried out
 void setBindingStyle(java.lang.String bndStyle)
 specify the binding style
 void setNameSpace(java.lang.String nameSpace)
 set namespace for operation
 void setOperation(java.lang.String operation)
 set operation to call
 void setOperationType(java.lang.String operationType)
 set type of the operation to call Possible values are SoapScript.ONE_WAY or SoapScript.REQUEST_RESPONSE
 void setPath(java.lang.String uri)
 This can be used to set path directly from script.
 void setPath(java.lang.String uri, java.lang.String encodeChar)
 This can be used to set path directly from script.
 void setPortType(java.lang.String portType)
 specify the port type
 void setResponseTime(long responseTimeInMillis)
 This can be used to set value of session parameter.
 void setSkipSoapActionHeader(boolean skipSoapAction)
 specify if SoapAction header should be skipped
 void setSoapActionHeader(java.lang.String soapAction)
 specify soap action header
 void setSoapInputEncoded(boolean inputSoapEncoded)
 specify if input soap is encoded
 void setSoapVersion(java.lang.String soapVersion)
 specify soap version
 void setUseAuthentication(boolean useAuthentication)
 A task may require authentication credentials when sent to the server, this can be configured using this method.
 void setValidationSuccessful(boolean success)
 Once the task is executed, this method can be used to set the status of validation
 void setWSDLFile(java.lang.String wsdlFile)
 specify the wsdl file cached in the recorded folder when the task is added.
 void setWSDLSource(java.lang.String wsdlSource)
 specify the source of the wsdl of this soap task
 
Methods inherited from interface com.appperfect.devcommon.script.IScript
getReasonForFailure, isIgnored, isTaskSuccessful, isTaskTimedOut, setIgnored, setReasonForFailure, setTaskSuccessful, setTaskTimedout, setThinkTime, setTimeout
 

Field Detail

DOCUMENT

static final int DOCUMENT
See Also:
Constant Field Values

ONE_WAY

static final int ONE_WAY
See Also:
Constant Field Values

REQUEST_RESPONSE

static final int REQUEST_RESPONSE
See Also:
Constant Field Values

RPC

static final int RPC
See Also:
Constant Field Values

SOAP_1_1

static final int SOAP_1_1
See Also:
Constant Field Values

SOAP_1_2

static final int SOAP_1_2
See Also:
Constant Field Values
Method Detail

addHeader

void addHeader(java.lang.String headerName,
               java.lang.String headerValue,
               java.lang.String testParameterName)
Each HTTP request sends a set of headers to the server, which helps the server understand the kind of request. This method is used to add a header to the request

Parameters:
headerName - name of the header
headerValue - value of the header
testParameterName - name of the TestParameter if the header value is parameterized

addParameter

void addParameter(java.lang.String parameterName,
                  java.lang.String parameterValue,
                  java.lang.String testParameterName)
Use this method to add SOAP parameters.

Parameters:
parameterName -
parameterValue -
testParameterName -

addSoapAttachment

void addSoapAttachment(java.lang.String parameterName,
                       java.lang.String attachment,
                       java.lang.String contentId,
                       java.lang.String contentType,
                       java.lang.String testParameterName)
Use this method to add Attachments in a Soap request

Parameters:
parameterName -
attachment -
contentId -
contentType -
testParameterName -

addSoapHeader

void addSoapHeader(java.lang.String parameterName,
                   java.lang.String parameterValue,
                   java.lang.String testParameterName)
Use this method to add SOAP headers.

Parameters:
parameterName -
parameterValue -
testParameterName -

addSoapHeader

void addSoapHeader(java.lang.String parameterName,
                   java.lang.String parameterValue,
                   java.lang.String testParameterName,
                   java.lang.String mustUnderstand,
                   java.lang.String actor)
Use this method to add SOAP headers.

Parameters:
parameterName -
parameterValue -
testParameterName -
mustUnderstand -
actor -

addThinkTime

void addThinkTime(int virtualUser,
                  int type,
                  int startValue,
                  int endValue,
                  int valueType)
Delay in seconds before the task is actually executed.

Parameters:
virtualUser - % Virtual User who should use this think time setting
type - Type of value whether its Fixed (0) value or Random Value (1)
startValue - Think time value
endValue - End value of think time in case of random value
valueType - Whether value specified is in seconds (0) or in milliseconds (1)

assertInDatabase

boolean assertInDatabase(java.lang.String description,
                         java.lang.String databaseId,
                         java.lang.String query)
Once the task is executed, database can be validated by firing the specified SELECT query

Parameters:
description - of validation
databaseId - database id configured with the application in Tools->Options
query - SQL query to be fired to the given database id
Returns:
true if the query return non-empty ResultSet; false otherwise

assertSoapElement

boolean assertSoapElement(java.lang.String description,
                          java.lang.String attributeName,
                          java.lang.String attributeValue)
Once the task is executed, attributes of the node in the DOM tree of the SOAP response data can be validated.

Parameters:
description - of validation
attributeName - name of the attribute
attributeValue - value of the attribute
Returns:
true if the response matches this validation; false otherwise

assertSoapFault

boolean assertSoapFault(java.lang.String description,
                        java.lang.String faultCode)
Once the task is executed, Soap Response can be validated for any soap fault.

Parameters:
description - of validation
faultCode - fault code to be validated. Any for all types of faults
Returns:
true if there is NO fault or fault that does not match specified fault code false otherwise

assertText

boolean assertText(java.lang.String description,
                   java.lang.String[] txt,
                   boolean bCaseSensitive,
                   boolean contains,
                   boolean bAll,
                   boolean checkForExistance,
                   boolean regularExpression)
Once the task is executed, response can be validated for presence/absence of some text along with other attributes for fine-tuning the search

Parameters:
description - of validation
txt - list of text to look for in the response
bCaseSensitive - true if search should be case-sensitive; false otherwise
contains - true if search for existence of the text; false otherwise
bAll - true if search for all the elements of the list; false for any element of the list
regularExpression - true if text is a regular expression; false otherwise
Returns:
true if the response matches this validation; false otherwise

assertText

boolean assertText(java.lang.String description,
                   java.lang.String[] txt,
                   boolean bCaseSensitive,
                   boolean contains,
                   boolean bAll,
                   boolean checkForExistance,
                   boolean regularExpression,
                   java.lang.String prefix,
                   java.lang.String suffix)
Once the task is executed, response can be validated for presence/absence of some text along with other attributes for fine-tuning the search

Parameters:
description - of validation
txt - list of text to look for in the response
bCaseSensitive - true if search should be case-sensitive; false otherwise
contains - true if search for existence of the text; false otherwise
bAll - true if search for all the elements of the list; false for any element of the list
regularExpression - true if text is a regular expression; false otherwise
prefix - text present before the txt
suffix - text present after the txt
Returns:
true if the response matches this validation; false otherwise

assertText

boolean assertText(java.lang.String description,
                   java.lang.String txt,
                   boolean bCaseSensitive,
                   boolean checkForExistance,
                   boolean regularExpression)
Once the task is executed, response can be validated for presence/absence of some text along with other attributes for fine-tuning the search

Parameters:
description - of validation
txt - text to look for in the response
bCaseSensitive - true if search should be case-sensitive; false otherwise
checkForExistance - true if search for existence of the text; false otherwise
regularExpression - true if text is a regular expression; false otherwise
Returns:
true if the response matches this validation; false otherwise

assertText

boolean assertText(java.lang.String description,
                   java.lang.String txt,
                   boolean bCaseSensitive,
                   boolean checkForExistance,
                   boolean regularExpression,
                   java.lang.String prefix,
                   java.lang.String suffix)
Once the task is executed, response can be validated for presence/absence of some text along with other attributes for fine-tuning the search

Parameters:
description - of validation
txt - text to look for in the response
bCaseSensitive - true if search should be case-sensitive; false otherwise
checkForExistance - true if search for existence of the text; false otherwise
regularExpression - true if text is a regular expression; false otherwise
prefix - text present before the txt
suffix - text present after the txt
Returns:
true if the response matches this validation; false otherwise

assertTodaysDate

boolean assertTodaysDate(java.lang.String description,
                         java.lang.String dateFormat)
Once the task is executed, response can be validated to contain today's date in specified format

Parameters:
description - of validation
dateFormat - valid date format
Returns:
true if the response matches this validation; false otherwise

assertTodaysDate

boolean assertTodaysDate(java.lang.String description,
                         java.lang.String dateFormat,
                         java.lang.String prefix,
                         java.lang.String suffix)
Once the task is executed, response can be validated to contain today's date in specified format

Parameters:
description - of validation
dateFormat - valid date format
prefix - text present before the date
suffix - text present after the date
Returns:
true if the response matches this validation; false otherwise

getResponse

java.lang.String getResponse()
After task execution the response page can be fetched using this method

Returns:
response page in String form as a result of task execution.

getResponseCode

int getResponseCode()
Get Response Code as a result of task execution

Returns:
Response Code

getResponseTime

long getResponseTime()
Get the response time of executed task

Returns:
the response time of executed task

getValidationResult

IValidationResult getValidationResult()
Once the task is executed, detailed validation result can be fetched using this method.

Returns:
validation result

isValidationSuccessful

boolean isValidationSuccessful()
Once the task is executed, this method returns the status of the validation carried out

Returns:
true if the validation was successful; false otherwise

setBindingStyle

void setBindingStyle(java.lang.String bndStyle)
specify the binding style

Parameters:
bndStyle - possible values are SoapScript.DOCUMENT or SoapScript.RPC

setNameSpace

void setNameSpace(java.lang.String nameSpace)
set namespace for operation

Parameters:
nameSpace -

setOperation

void setOperation(java.lang.String operation)
set operation to call

Parameters:
operation -

setOperationType

void setOperationType(java.lang.String operationType)
set type of the operation to call Possible values are SoapScript.ONE_WAY or SoapScript.REQUEST_RESPONSE

Parameters:
operationType -

setPath

void setPath(java.lang.String uri)
This can be used to set path directly from script.

Parameters:
uri -

setPath

void setPath(java.lang.String uri,
             java.lang.String encodeChar)
This can be used to set path directly from script.

Parameters:
uri -
encodeChar -

setPortType

void setPortType(java.lang.String portType)
specify the port type

Parameters:
portType -

setResponseTime

void setResponseTime(long responseTimeInMillis)
This can be used to set value of session parameter.

Parameters:
responseTimeInMillis -

setSkipSoapActionHeader

void setSkipSoapActionHeader(boolean skipSoapAction)
specify if SoapAction header should be skipped

Parameters:
skipSoapAction -

setSoapActionHeader

void setSoapActionHeader(java.lang.String soapAction)
specify soap action header

Parameters:
soapAction -

setSoapInputEncoded

void setSoapInputEncoded(boolean inputSoapEncoded)
specify if input soap is encoded

Parameters:
inputSoapEncoded -

setSoapVersion

void setSoapVersion(java.lang.String soapVersion)
specify soap version

Parameters:
soapVersion - possible values SoapScript.SOAP_1_1 or SoapScript.SOAP_1_2

setUseAuthentication

void setUseAuthentication(boolean useAuthentication)
A task may require authentication credentials when sent to the server, this can be configured using this method.

Parameters:
useAuthentication - true if this task should use authentication details while it is sent to the server; false otherwise

setValidationSuccessful

void setValidationSuccessful(boolean success)
Once the task is executed, this method can be used to set the status of validation

Parameters:
success - true if the validation is successful; false otherwise

setWSDLFile

void setWSDLFile(java.lang.String wsdlFile)
specify the wsdl file cached in the recorded folder when the task is added.

Parameters:
wsdlFile -

setWSDLSource

void setWSDLSource(java.lang.String wsdlSource)
specify the source of the wsdl of this soap task

Parameters:
wsdlSource -


Copyright © 2003-2016 AppPerfect Corporation. All Rights Reserved.