woolfel     2004/01/13 20:05:20

  Modified:    src/protocol/http/org/apache/jmeter/protocol/http/sampler
                        WebServiceSampler.java
  Log:
  updated the sampler to check the system properties to see if the
  user passed proxy host and port from command line. if the proxy
  host and port were not explicitly provided in the test plan, but it
  was passed in command line, the sampler will now pick up those
  values and use them.
  
  peter lin
  
  CVS: ----------------------------------------------------------------------
  CVS: PR:
  CVS:   If this change addresses a PR in the problem report tracking
  CVS:   database, then enter the PR number(s) here.
  CVS: Obtained from:
  CVS:   If this change has been taken from another system, such as NCSA,
  CVS:   then name the system in this line, otherwise delete it.
  CVS: Submitted by:
  CVS:   If this code has been contributed to Apache by someone else; i.e.,
  CVS:   they sent us a patch or a new module, then include their name/email
  CVS:   address here. If this is your work then delete this line.
  CVS: Reviewed by:
  CVS:   If we are doing pre-commit code reviews and someone else has
  CVS:   reviewed your changes, include their name(s) here.
  CVS:   If you have not had it reviewed then delete this line.
  
  Revision  Changes    Path
  1.8       +20 -1     
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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- WebServiceSampler.java    9 Jan 2004 03:57:16 -0000       1.7
  +++ WebServiceSampler.java    14 Jan 2004 04:05:20 -0000      1.8
  @@ -340,6 +340,16 @@
         * @return
         */     
        public String getProxyHost(){
  +             // we check to see the host is set
  +             String host = this.getPropertyAsString(PROXY_HOST);
  +             if (host == null || host.length() == 0){
  +                     // it's not set, lets check if the user passed
  +                     // proxy host and port from command line
  +                     if (System.getProperty("http.proxyHost") != null){
  +                             host = System.getProperty("http.proxyHost");
  +                             this.setProxyHost(host);
  +                     }
  +             }
                return this.getPropertyAsString(PROXY_HOST);
        }
   
  @@ -356,6 +366,15 @@
         * @return
         */     
        public int getProxyPort(){
  +             String port = this.getPropertyAsString(PROXY_PORT);
  +             if (port == null || port.length() == 0){
  +                     // it's not set, lets check if the user passed
  +                     // proxy host and port from command line
  +                     if (System.getProperty("http.proxyPort") != null){
  +                             port = System.getProperty("http.proxyPort");
  +                             this.setProxyPort(port);
  +                     }
  +             }
                return this.getPropertyAsInt(PROXY_PORT);
        }
        
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to