Sampler to handle Web Service requests. It uses Apache SOAP drivers to
perform the XML generation, connection, SOAP encoding and other SOAP
functions.
Created on: Jun 26, 2003
addEncodedArgument
public void addEncodedArgument(String name,
String value,
String metaData)
We override this to prevent the wrong encoding and provide no
implementation. We want to reuse the other parts of HTTPSampler, but not
the connection. The connection is handled by the Apache SOAP driver.
- addEncodedArgument in interface HTTPSamplerBase
convertSoapHeaders
public String convertSoapHeaders(Hashtable ht)
getMemoryCache
public boolean getMemoryCache()
Get the memory cache.
getProxyHost
public String getProxyHost()
Return the proxy hostname
getProxyPort
public int getProxyPort()
Return the proxy port
getRandomFileName
protected String getRandomFileName()
Method is used internally to check if a random file should be used for
the message. Messages must be valid. This is one way to load test with
different messages. The limitation of this approach is parsing XML takes
CPU resources, so it could affect JMeter GUI responsiveness.
getReadResponse
public boolean getReadResponse()
Return whether or not to read the response.
getSoapAction
public String getSoapAction()
Return the soap action string.
getTimeout
public String getTimeout()
getTimeoutAsInt
public int getTimeoutAsInt()
getUseProxy
public boolean getUseProxy()
Return whether or not to use proxy
getWsdlURL
public String getWsdlURL()
method returns the WSDL URL
getXmlData
public String getXmlData()
Get the XML data as a string.
getXmlFile
public String getXmlFile()
Get the file location of the xml file.
getXmlPathLoc
public String getXmlPathLoc()
Get the path where XML messages are stored. this is the directory where
JMeter will randomly select a file.
sample
public SampleResult sample()
Sample the URL using Apache SOAP driver. Implementation note for myself
and those that are curious. Current logic marks the end after the
response has been read. If read response is set to false, the buffered
reader will read, but do nothing with it. Essentially, the stream from
the server goes into the ether.
- sample in interface HTTPSamplerBase
sample
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.
When getting a redirect target, redirects are not followed and resources
are not downloaded. The caller will take care of this.
- sample in interface HTTPSamplerBase
setMemoryCache
public void setMemoryCache(boolean cache)
Set the memory cache.
setProxyHost
public void setProxyHost(String host)
Set the proxy hostname
setProxyPort
public void setProxyPort(String port)
Set the proxy port
setReadResponse
public void setReadResponse(boolean read)
Set whether the sampler should read the response or not.
setSoapAction
public void setSoapAction(String data)
Set the soap action which should be in the form of an URN.
setTimeout
public void setTimeout(String text)
setUseProxy
public void setUseProxy(boolean proxy)
Set whether or not to use a proxy
setWsdlURL
public void setWsdlURL(String url)
setXmlData
public void setXmlData(String data)
Set the XML data.
setXmlFile
public void setXmlFile(String filename)
it's kinda obvious, but we state it anyways. Set the xml file with a
string path.
setXmlPathLoc
public void setXmlPathLoc(String path)
Set the path where XML messages are stored for random selection.