public class WebServiceSampler extends HTTPSamplerBase
Created on: Jun 26, 2003
HTTPSamplerBase.SourceType
Modifier and Type | Field and Description |
---|---|
static boolean |
MAINTAIN_SESSION_DEFAULT |
ARGUMENTS, AUTH_MANAGER, AUTO_REDIRECTS, BROWSER_COMPATIBLE_MULTIPART, BROWSER_COMPATIBLE_MULTIPART_MODE_DEFAULT, CACHE_MANAGER, CONCURRENT_DWN, CONCURRENT_POOL, CONCURRENT_POOL_SIZE, CONNECT_TIMEOUT, CONTENT_ENCODING, CONTENT_TYPE, COOKIE_MANAGER, DEFAULT_METHOD, DNS_CACHE_MANAGER, DO_MULTIPART_POST, DOMAIN, EMBEDDED_URL_RE, FOLLOW_REDIRECTS, HEADER_MANAGER, IMAGE_PARSER, IMPLEMENTATION, IP_SOURCE, IP_SOURCE_TYPE, MAX_FRAME_DEPTH, MAX_REDIRECTS, METHOD, MONITOR, NON_HTTP_RESPONSE_CODE, NON_HTTP_RESPONSE_MESSAGE, PATH, PORT, POST_BODY_RAW, POST_BODY_RAW_DEFAULT, PROTOCOL, PROXYHOST, PROXYPASS, PROXYPORT, PROXYUSER, RESPONSE_TIMEOUT, UNSPECIFIED_PORT, UNSPECIFIED_PORT_AS_STRING, URL, URL_UNSPECIFIED_PORT, URL_UNSPECIFIED_PORT_AS_STRING, USE_KEEPALIVE
APPLICATION_X_WWW_FORM_URLENCODED, CACHE_CONTROL, CONNECT, CONNECTION_CLOSE, COPY, DATE, DEFAULT_HTTP_PORT, DEFAULT_HTTP_PORT_STRING, DEFAULT_HTTPS_PORT, DEFAULT_HTTPS_PORT_STRING, DELETE, ENCODING_GZIP, ETAG, EXPIRES, GET, HEAD, HEADER_AUTHORIZATION, HEADER_CONNECTION, HEADER_CONTENT_DISPOSITION, HEADER_CONTENT_ENCODING, HEADER_CONTENT_LENGTH, HEADER_CONTENT_TYPE, HEADER_COOKIE, HEADER_HOST, HEADER_LOCAL_ADDRESS, HEADER_LOCATION, HEADER_SET_COOKIE, HTTP_1_1, IF_MODIFIED_SINCE, IF_NONE_MATCH, KEEP_ALIVE, LAST_MODIFIED, LOCK, MKCALENDAR, MKCOL, MOVE, MULTIPART_FORM_DATA, OPTIONS, PATCH, POST, PROPFIND, PROPPATCH, PROTOCOL_HTTP, PROTOCOL_HTTPS, PUT, REPORT, TRACE, TRANSFER_ENCODING, UNLOCK
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS
Constructor and Description |
---|
WebServiceSampler() |
Modifier and Type | Method and Description |
---|---|
void |
addEncodedArgument(String name,
String value,
String metaData)
We override this to prevent the wrong encoding and provide no
implementation.
|
String |
convertSoapHeaders(Map<String,String> ht) |
boolean |
getMaintainSession()
Get the maintain session option.
|
boolean |
getMemoryCache()
Get the memory cache.
|
String |
getProxyHost()
Return the proxy hostname
|
int |
getProxyPort()
Return the proxy port
|
protected String |
getRandomFileName()
Method is used internally to check if a random file should be used for
the message.
|
boolean |
getReadResponse()
Return whether or not to read the response.
|
String |
getSoapAction()
Return the soap action string.
|
String |
getTimeout() |
int |
getTimeoutAsInt() |
boolean |
getUseProxy()
Return whether or not to use proxy
|
String |
getWsdlURL()
method returns the WSDL URL
|
String |
getXmlData()
Get the XML data as a string.
|
String |
getXmlFile()
Get the file location of the xml file.
|
String |
getXmlPathLoc()
Get the path where XML messages are stored.
|
SampleResult |
sample()
Sample the URL using Apache SOAP driver.
|
protected HTTPSampleResult |
sample(URL u,
String s,
boolean b,
int i)
Samples the URL passed in and stores the result in
HTTPSampleResult , following redirects and downloading
page resources as appropriate. |
void |
setMaintainSession(boolean maintainSession)
Set the maintain session option.
|
void |
setMemoryCache(boolean cache)
Set the memory cache.
|
void |
setProxyHost(String host)
Set the proxy hostname
|
void |
setProxyPort(String port)
Set the proxy port
|
void |
setReadResponse(boolean read)
Set whether the sampler should read the response or not.
|
void |
setSoapAction(String data)
Set the soap action which should be in the form of an URN.
|
void |
setTimeout(String text) |
void |
setUseProxy(boolean proxy)
Set whether or not to use a proxy
|
void |
setWsdlURL(String url) |
void |
setXmlData(String data)
Set the XML data.
|
void |
setXmlFile(String filename)
it's kinda obvious, but we state it anyways.
|
void |
setXmlPathLoc(String path)
Set the path where XML messages are stored for random selection.
|
void |
testEnded()
Called once for all threads after the end of a test.
|
void |
testEnded(String host)
Called once for all threads after the end of a test.
|
addArgument, addArgument, addEncodedArgument, addEncodedArgument, addNonEncodedArgument, addTestElement, applies, clearTestElementChildren, clone, downloadPageResources, encodeBackSlashes, encodeSpaces, errorResult, followRedirects, getArguments, getAuthManager, getAutoRedirects, getCacheManager, getConcurrentPool, getConnectTimeout, getContentEncoding, getCookieManager, getDefaultPort, getDNSResolver, getDoBrowserCompatibleMultipart, getDomain, getDoMultipartPost, getEmbeddedUrlRE, getFollowRedirects, getHeaderManager, getHTTPFileCount, getHTTPFiles, getImplementation, getIpSource, getIpSourceType, getMethod, getMonitor, getPath, getPort, getPortIfSpecified, getPostBodyRaw, getProtocol, getProxyPass, getProxyPortInt, getProxyUser, getQueryString, getQueryString, getResponseTimeout, getSendFileAsPostBody, getSendParameterValuesAsPostBody, getSourceTypeList, getUrl, getUseKeepAlive, getUseMultipartForPost, getValidMethodsAsArray, hasArguments, isConcurrentDwn, isImageParser, isMonitor, isProtocolDefaultPort, isSecure, isSecure, isSuccessCode, parseArguments, parseArguments, readResponse, resultProcessing, sample, setArguments, setAuthManager, setAutoRedirects, setCacheManager, setConcurrentDwn, setConcurrentPool, setConnectTimeout, setContentEncoding, setCookieManager, setDNSResolver, setDoBrowserCompatibleMultipart, setDomain, setDoMultipartPost, setEmbeddedUrlRE, setFollowRedirects, setHeaderManager, setHTTPFiles, setImageParser, setImplementation, setIpSource, setIpSourceType, setMD5, setMethod, setMonitor, setMonitor, setPath, setPath, setPort, setPostBodyRaw, setProtocol, setResponseTimeout, setUseKeepAlive, testIterationStart, testStarted, testStarted, threadFinished, threadStarted, toString, useMD5
addPropertiesValues, addProperty, addProperty, canRemove, clear, clearTemporary, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traverseProperty
finalize, getClass, notify, notifyAll, wait, wait, wait
canRemove, clear, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getThreadContext, getThreadName, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse
public static final boolean MAINTAIN_SESSION_DEFAULT
public void setXmlPathLoc(String path)
path
- where XML messages are storedpublic String getXmlPathLoc()
public void setXmlFile(String filename)
filename
- path to xml filepublic String getXmlFile()
protected String getRandomFileName()
public void setXmlData(String data)
data
- xml datapublic String getXmlData()
public void setSoapAction(String data)
data
- soap actionpublic String getSoapAction()
public void setMaintainSession(boolean maintainSession)
maintainSession
- flag whether to maintain a sessionpublic boolean getMaintainSession()
public void setMemoryCache(boolean cache)
cache
- flag whether to use the memory cachepublic boolean getMemoryCache()
public void setReadResponse(boolean read)
read
- flag whether the response should be readpublic boolean getReadResponse()
public void setUseProxy(boolean proxy)
proxy
- flag whether to use a proxypublic boolean getUseProxy()
true
if a proxy should be usedpublic void setProxyHost(String host)
host
- the hostname of the proxypublic String getProxyHost()
getProxyHost
in class HTTPSamplerBase
public void setProxyPort(String port)
port
- the port of the proxypublic int getProxyPort()
public void setWsdlURL(String url)
url
- the URL of the WSDLpublic String getWsdlURL()
protected HTTPSampleResult sample(URL u, String s, boolean b, int i)
HTTPSamplerBase
HTTPSampleResult
, following redirects and downloading
page resources as appropriate.
When getting a redirect target, redirects are not followed and resources are not downloaded. The caller will take care of this.
sample
in class HTTPSamplerBase
u
- URL to samples
- HTTP method: GET, POST,...b
- whether we're getting a redirect targeti
- Depth of this target in the frame structure. Used only to
prevent infinite recursion.public SampleResult sample()
sample
in class HTTPSamplerBase
public void addEncodedArgument(String name, String value, String metaData)
addEncodedArgument
in class HTTPSamplerBase
public String getTimeout()
public int getTimeoutAsInt()
public void setTimeout(String text)
public void testEnded()
HTTPSamplerBase
Called once for all threads after the end of a test. This will use the same element instances as at the start of the test.
N.B. testStarted() and testEnded() are called from different threads.
testEnded
in interface TestStateListener
testEnded
in class HTTPSamplerBase
StandardJMeterEngine.stopTest()
public void testEnded(String host)
HTTPSamplerBase
Called once for all threads after the end of a test. This will use the same element instances as at the start of the test.
N.B. testStarted() and testEnded() are called from different threads.
testEnded
in interface TestStateListener
testEnded
in class HTTPSamplerBase
host
- name of hostStandardJMeterEngine.stopTest()
Copyright © 1998-2016 Apache Software Foundation. All Rights Reserved.