Author: milamber
Date: Sat Sep 17 16:19:12 2011
New Revision: 1172007

URL: http://svn.apache.org/viewvc?rev=1172007&view=rev
Log:
Bug 51605 - WebService(SOAP) Request - WebMethod field value changes 
surreptitiously for all the requests when a value is selected in a request

Modified:
    
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/gui/WebServiceSamplerGui.java
    
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/WSDLHelper.java
    jakarta/jmeter/trunk/xdocs/changes.xml

Modified: 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/gui/WebServiceSamplerGui.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/gui/WebServiceSamplerGui.java?rev=1172007&r1=1172006&r2=1172007&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/gui/WebServiceSamplerGui.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/gui/WebServiceSamplerGui.java
 Sat Sep 17 16:19:12 2011
@@ -264,7 +264,7 @@ public class WebServiceSamplerGui extend
         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 @@ public class WebServiceSamplerGui extend
         } 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,19 @@ public class WebServiceSamplerGui extend
 
     /**
      * @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();
         }
     }

Modified: 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/WSDLHelper.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/WSDLHelper.java?rev=1172007&r1=1172006&r2=1172007&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/WSDLHelper.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/WSDLHelper.java
 Sat Sep 17 16:19:12 2011
@@ -376,6 +376,20 @@ public class WSDLHelper {
     }
 
     /**
+     * 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 @@ public class WSDLHelper {
             exception.printStackTrace();
         }
     }
+
 }

Modified: jakarta/jmeter/trunk/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=1172007&r1=1172006&r2=1172007&view=diff
==============================================================================
--- jakarta/jmeter/trunk/xdocs/changes.xml (original)
+++ jakarta/jmeter/trunk/xdocs/changes.xml Sat Sep 17 16:19:12 2011
@@ -86,6 +86,7 @@ This can be overridden by setting the JM
 <li>Bug 43293 - Java Request fields not cleared when creating new sampler</li>
 <li>Bug 51830 - Webservice Soap Request triggers too many popups when 
Webservice WSDL URL is down</li>
 <li>WebService(SOAP) request - add a connect timeout to get the wsdl used to 
populate Web Methods when server doesn't response</li>
+<li>Bug 51605 - WebService(SOAP) Request - WebMethod field value changes 
surreptitiously for all the requests when a value is selected in a request</li>
 </ul>
 
 <h3>Controllers</h3>



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@jakarta.apache.org
For additional commands, e-mail: notifications-h...@jakarta.apache.org

Reply via email to