woolfel     2004/01/08 19:58:59

  Modified:    src/protocol/http/org/apache/jmeter/protocol/http/control/gui
                        WebServiceSamplerGui.java
  Log:
  added a check box for use proxy and 2 text fields, one for host and
  one for port. thanks to peter reid for reporting the bug.
  
  PR:
  Obtained from:
  Submitted by: 
  Reviewed by:  
  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.7       +55 -1     
jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/control/gui/WebServiceSamplerGui.java
  
  Index: WebServiceSamplerGui.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/control/gui/WebServiceSamplerGui.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- WebServiceSamplerGui.java 22 Nov 2003 03:26:36 -0000      1.6
  +++ WebServiceSamplerGui.java 9 Jan 2004 03:58:59 -0000       1.7
  @@ -151,6 +151,24 @@
           new JCheckBox(JMeterUtils.getResString("read_soap_response"));
           
       /**
  +     * checkbox for use proxy
  +     */
  +     JCheckBox useProxy =
  +             new JCheckBox(JMeterUtils.getResString("webservice_use_proxy"));
  +
  +     /**
  +      * text field for the proxy host
  +      */
  +     JLabeledTextField proxyHost =
  +             new JLabeledTextField(
  +                     JMeterUtils.getResString("webservice_proxy_host"));
  +     /**
  +      * text field for the proxy port
  +      */
  +     JLabeledTextField proxyPort =
  +             new JLabeledTextField(
  +                     JMeterUtils.getResString("webservice_proxy_port"));
  +    /**
        * Text note about read response and it's usage.
        */
       JLabel readMessage =
  @@ -201,6 +219,9 @@
               sampler.setXmlPathLoc(randomXmlFile.getText());
               sampler.setMemoryCache(memCache.isSelected());
               sampler.setReadResponse(readResponse.isSelected());
  +            sampler.setUseProxy(useProxy.isSelected());
  +            sampler.setProxyHost(proxyHost.getText());
  +            sampler.setProxyPort(proxyPort.getText());
           }
           catch (MalformedURLException e)
           {
  @@ -237,6 +258,9 @@
               sampler.setXmlPathLoc(randomXmlFile.getText());
               sampler.setMemoryCache(memCache.isSelected());
               sampler.setReadResponse(readResponse.isSelected());
  +                     sampler.setUseProxy(useProxy.isSelected());
  +                     sampler.setProxyHost(proxyHost.getText());
  +                     sampler.setProxyPort(proxyPort.getText());
           }
           catch (MalformedURLException e)
           {
  @@ -311,6 +335,12 @@
           mainPanel.add(readMessage2);
           mainPanel.add(readMessage3);
   
  +             // add the proxy elements
  +             mainPanel.add(useProxy);
  +             useProxy.addActionListener(this);
  +             mainPanel.add(proxyHost);
  +             mainPanel.add(proxyPort);
  +
           this.add(mainPanel);
       }
   
  @@ -348,6 +378,17 @@
           randomXmlFile.setText(sampler.getXmlPathLoc());
           memCache.setSelected(sampler.getMemoryCache());
           readResponse.setSelected(sampler.getReadResponse());
  +        useProxy.setSelected(sampler.getUseProxy());
  +        if (sampler.getProxyHost().length() == 0){
  +             proxyHost.setEnabled(false);
  +        } else {
  +             proxyHost.setText(sampler.getProxyHost());
  +        }
  +        if (sampler.getProxyPort() == 0){
  +             proxyPort.setEnabled(false);
  +        } else {
  +             proxyPort.setText(String.valueOf(sampler.getProxyPort()));
  +        }
       }
   
       /**
  @@ -421,6 +462,19 @@
           if (event.getSource() == selectButton)
           {
               this.configureFromWSDL();
  +        }
  +        else if (event.getSource() == useProxy)
  +        {
  +             // if use proxy is checked, we enable
  +             // the text fields for the host and port
  +             boolean use = useProxy.isSelected();
  +             if (use){
  +                             proxyHost.setEnabled(true);
  +                             proxyPort.setEnabled(true);
  +                     } else {
  +                             proxyHost.setEnabled(false);
  +                             proxyPort.setEnabled(false);
  +             }
           }
           else
           {
  
  
  

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

Reply via email to