woolfel 2005/05/26 18:11:37
Modified: src/protocol/http/org/apache/jmeter/protocol/http/sampler
WebServiceSampler.java
Log:
added support for basic/digest auth. thanks to KiYun Roe for contributing the
patch.
peter
Revision Changes Path
1.26 +13 -3
jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/sampler/WebServiceSampler.java
Index: WebServiceSampler.java
===================================================================
RCS file:
/home/cvs/jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/sampler/WebServiceSampler.java,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- WebServiceSampler.java 19 May 2005 23:26:15 -0000 1.25
+++ WebServiceSampler.java 27 May 2005 01:11:36 -0000 1.26
@@ -38,6 +38,8 @@
import org.apache.jorphan.logging.LoggingManager;
import org.apache.jmeter.gui.JMeterFileFilter;
+import org.apache.jmeter.protocol.http.control.AuthManager;
+import org.apache.jmeter.protocol.http.control.Authorization;
import org.apache.jmeter.protocol.http.util.DOMPool;
import org.apache.jmeter.samplers.SampleResult;
import org.apache.jmeter.util.JMeterUtils;
@@ -469,7 +471,15 @@
getSOAPHeader();
} else {
spconn = new SOAPHTTPConnection();
- }
+ }
+ // set the auth. thanks to KiYun Roe for contributing the patch
+ // I cleaned up the patch slightly. 5-26-05
+ if (getAuthManager() != null) {
+ AuthManager authmanager = getAuthManager();
+ Authorization auth = authmanager.getAuthForURL(getUrl());
+ spconn.setUserName(auth.getUser());
+ spconn.setPassword(auth.getPass());
+ }
// check the proxy
String phost = "";
int pport = 0;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]