Bug 40325 - allow specification of proxyuser and proxypassword for WebServiceSampler

git-svn-id: https://svn.apache.org/repos/asf/jakarta/jmeter/branches/rel-2-2@517049 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2007-03-11 23:40:52 +00:00
parent 82e9de583d
commit dbca8357e3
2 changed files with 13 additions and 0 deletions

View File

@ -39,6 +39,7 @@ import org.xml.sax.SAXException;
import org.apache.jorphan.io.TextFile;
import org.apache.jorphan.logging.LoggingManager;
import org.apache.jmeter.JMeter;
import org.apache.jmeter.gui.JMeterFileFilter;
import org.apache.jmeter.protocol.http.control.AuthManager;
import org.apache.jmeter.protocol.http.control.Authorization;
@ -88,6 +89,13 @@ public class WebServiceSampler extends HTTPSamplerBase {
public static final String TIMEOUT = "WebserviceSampler.timeout";
private static final String PROXY_USER =
JMeterUtils.getPropDefault(JMeter.HTTP_PROXY_USER,""); // $NON-NLS-1$
private static final String PROXY_PASS =
JMeterUtils.getPropDefault(JMeter.HTTP_PROXY_PASS,""); // $NON-NLS-1$
/*
* Random class for generating random numbers.
*/
@ -484,6 +492,10 @@ public class WebServiceSampler extends HTTPSamplerBase {
if (phost.length() > 0 && pport > 0) {
spconn.setProxyHost(phost);
spconn.setProxyPort(pport);
if (PROXY_USER.length()>0 && PROXY_PASS.length()>0){
spconn.setProxyUserName(PROXY_USER);
spconn.setProxyPassword(PROXY_PASS);
}
}
}
// by default we maintain the session.

View File

@ -176,6 +176,7 @@ Removed deprecated method JMeterUtils.split() - use JOrphanUtils version instead
<li>RunningSample</li>
</ul>
</li>
<li>Bug 40325 - allow specification of proxyuser and proxypassword for WebServiceSampler</li>
</ul>
<h3>Version 2.2</h3>