ASF Bugzilla – Attachment 27516 Details for
Bug 51605
WebService(SOAP) Request - WebMethod field value changes surreptitiously for all the requests when a value is selected in a request
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Synchronize the web methods list with the soap action field
patch2.txt (text/plain), 3.46 KB, created by
benoit.wiart
on 2011-09-16 18:27:29 UTC
(
hide
)
Description:
Synchronize the web methods list with the soap action field
Filename:
MIME Type:
Creator:
benoit.wiart
Created:
2011-09-16 18:27:29 UTC
Size:
3.46 KB
patch
obsolete
>Index: src/protocol/http/org/apache/jmeter/protocol/http/control/gui/WebServiceSamplerGui.java >=================================================================== >--- src/protocol/http/org/apache/jmeter/protocol/http/control/gui/WebServiceSamplerGui.java (revision 1171698) >+++ src/protocol/http/org/apache/jmeter/protocol/http/control/gui/WebServiceSamplerGui.java (working copy) >@@ -68,7 +68,7 @@ > > private final JLabeledTextArea soapXml = new JLabeledTextArea(JMeterUtils.getResString("soap_data_title")); // $NON-NLS-1$ > >- private final JLabeledTextField wsdlField = new JLabeledTextField(JMeterUtils.getResString("wsdl_url")); // $NON-NLS-1$ >+ private final JLabeledTextField wsdlField = new JLabeledTextField(JMeterUtils.getResString("wsdl_url"), 30); // $NON-NLS-1$ > > private final JButton wsdlButton = new JButton(JMeterUtils.getResString("load_wsdl")); // $NON-NLS-1$ > >@@ -264,7 +264,7 @@ > wsdlField.setText(sampler.getWsdlURL()); > final String wsdlText = wsdlField.getText(); > if (wsdlText != null && wsdlText.length() > 0) { >- fillWsdlMethods(wsdlField.getText(), true); >+ fillWsdlMethods(wsdlField.getText(), true, sampler.getSoapAction()); > } > protocol.setText(sampler.getProtocol()); > domain.setText(sampler.getDomain()); >@@ -368,7 +368,7 @@ > } else if (eventSource == wsdlButton){ > final String wsdlText = wsdlField.getText(); > if (wsdlText != null && wsdlText.length() > 0) { >- fillWsdlMethods(wsdlText, false); >+ fillWsdlMethods(wsdlText, false, null); > } else { > JOptionPane.showConfirmDialog(this, > JMeterUtils.getResString("wsdl_url_error"), // $NON-NLS-1$ >@@ -380,11 +380,20 @@ > > /** > * @param wsdlText >+ * @param silent >+ * @param soapAction > */ >- private void fillWsdlMethods(final String wsdlText, boolean silent) { >+ private void fillWsdlMethods(final String wsdlText, boolean silent, String soapAction) { > String[] wsdlData = browseWSDL(wsdlText, silent); > if (wsdlData != null) { > wsdlMethods.setValues(wsdlData); >+ if (HELPER != null && soapAction != null) { >+ String selected = HELPER.getSoapActionName(soapAction); >+ if (selected != null) { >+ wsdlMethods.setText(selected); >+ } >+ } >+ > wsdlMethods.repaint(); > } > } >Index: src/protocol/http/org/apache/jmeter/protocol/http/util/WSDLHelper.java >=================================================================== >--- src/protocol/http/org/apache/jmeter/protocol/http/util/WSDLHelper.java (revision 1171336) >+++ src/protocol/http/org/apache/jmeter/protocol/http/util/WSDLHelper.java (working copy) >@@ -376,6 +376,20 @@ > } > > /** >+ * return the "wsdl method name" from a soap action >+ * @param soapAction the soap action >+ * @return the associated "wsdl method name" or null if not found >+ */ >+ public String getSoapActionName(String soapAction) { >+ for (Map.Entry<String, String> entry : ACTIONS.entrySet()) { >+ if (entry.getValue().equals(soapAction)) { >+ return entry.getKey(); >+ } >+ } >+ return null; >+ } >+ >+ /** > * Simple test for the class uses bidbuy.wsdl from Apache's soap driver > * examples. > * >@@ -403,4 +417,5 @@ > exception.printStackTrace(); > } > } >+ > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 51605
:
27492
| 27516