View | Details | Raw Unified | Return to bug 38901
Collapse All | Expand All

(-)jakarta-jmeter-2.1.1/src/protocol/http/org/apache/jmeter/protocol/http/control/gui/SoapSamplerGui.java (-2 / +38 lines)
Lines 20-26 Link Here
20
20
21
import java.awt.BorderLayout;
21
import java.awt.BorderLayout;
22
import java.awt.Dimension;
22
import java.awt.Dimension;
23
import java.awt.GridBagLayout;
24
import java.awt.GridBagConstraints;
25
import java.awt.event.ActionEvent;
26
import java.awt.event.ActionListener;
23
27
28
import javax.swing.JCheckBox;
24
import javax.swing.JPanel;
29
import javax.swing.JPanel;
25
30
26
import org.apache.jmeter.protocol.http.sampler.SoapSampler;
31
import org.apache.jmeter.protocol.http.sampler.SoapSampler;
Lines 35-41 Link Here
35
 */
40
 */
36
public class SoapSamplerGui extends AbstractSamplerGui {
41
public class SoapSamplerGui extends AbstractSamplerGui {
37
	private JLabeledTextField urlField;
42
	private JLabeledTextField urlField;
38
43
	private JLabeledTextField soapAction;
44
  private JCheckBox sendSoapAction;
39
	private JLabeledTextArea soapXml;
45
	private JLabeledTextArea soapXml;
40
46
41
	public SoapSamplerGui() {
47
	public SoapSamplerGui() {
Lines 68-73 Link Here
68
			SoapSampler sampler = (SoapSampler) s;
74
			SoapSampler sampler = (SoapSampler) s;
69
			sampler.setURLData(urlField.getText());
75
			sampler.setURLData(urlField.getText());
70
			sampler.setXmlData(soapXml.getText());
76
			sampler.setXmlData(soapXml.getText());
77
			sampler.setSOAPAction(soapAction.getText());
78
			sampler.setSendSOAPAction(sendSoapAction.isSelected());
71
		}
79
		}
72
	}
80
	}
73
81
Lines 79-89 Link Here
79
87
80
		urlField = new JLabeledTextField(JMeterUtils.getResString("url"), 10);
88
		urlField = new JLabeledTextField(JMeterUtils.getResString("url"), 10);
81
		soapXml = new JLabeledTextArea(JMeterUtils.getResString("soap_data_title"), null);
89
		soapXml = new JLabeledTextArea(JMeterUtils.getResString("soap_data_title"), null);
90
		soapAction = new JLabeledTextField("", 10);
91
		sendSoapAction = new JCheckBox("Send SOAPAction: ", true);
82
92
83
		JPanel mainPanel = new JPanel(new BorderLayout());
93
		JPanel mainPanel = new JPanel(new BorderLayout());
84
		mainPanel.add(urlField, BorderLayout.NORTH);
94
    JPanel stuff = new JPanel();
95
    stuff.setLayout(new GridBagLayout());
96
    GridBagConstraints c = new GridBagConstraints();
97
    c.fill = GridBagConstraints.HORIZONTAL;
98
    c.gridwidth = 2;
99
    c.gridx = 0;
100
    c.gridy = 0;
101
    c.weightx = 1;
102
    stuff.add(urlField, c);
103
    c.fill = GridBagConstraints.NONE;
104
    c.gridwidth = 1;
105
    c.gridy = 1;
106
    c.weightx = 0;
107
		stuff.add(sendSoapAction, c);
108
    c.gridx = 1;
109
    c.fill = GridBagConstraints.HORIZONTAL;
110
    c.weightx = 1;
111
		stuff.add(soapAction, c);
112
		mainPanel.add(stuff, BorderLayout.NORTH);
85
		mainPanel.add(soapXml, BorderLayout.CENTER);
113
		mainPanel.add(soapXml, BorderLayout.CENTER);
86
114
115
    sendSoapAction.addActionListener(new ActionListener() {
116
      public void actionPerformed(ActionEvent e) {
117
        soapAction.setEnabled(sendSoapAction.isSelected());
118
      }
119
    });
120
87
		add(mainPanel, BorderLayout.CENTER);
121
		add(mainPanel, BorderLayout.CENTER);
88
	}
122
	}
89
123
Lines 91-96 Link Here
91
		super.configure(el);
125
		super.configure(el);
92
		SoapSampler sampler = (SoapSampler) el;
126
		SoapSampler sampler = (SoapSampler) el;
93
		urlField.setText(sampler.getURLData());
127
		urlField.setText(sampler.getURLData());
128
		sendSoapAction.setSelected(sampler.getSendSOAPAction());
129
		soapAction.setText(sampler.getSOAPAction());
94
		soapXml.setText(sampler.getXmlData());
130
		soapXml.setText(sampler.getXmlData());
95
	}
131
	}
96
132

Return to bug 38901