From cd39725976ec7b5dc57c3c979e02fc7c549fe8af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Mass=C3=A9?= Date: Fri, 15 Sep 2017 16:49:04 +0200 Subject: [PATCH] set the SOAPAction before sending the query --- soapui.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/soapui.js b/soapui.js index c551367..4e4ee31 100644 --- a/soapui.js +++ b/soapui.js @@ -95,11 +95,10 @@ var soapActionNode = $(root_node).find("soap-action").get(0); soapActionNode = soapActionNode != null ? $(soapActionNode) : null; var soapAction = soapActionNode != null ? soapActionNode.text() : null; + var newSoapActionNode = $("", { value: soapAction, type: "text"}); if (soapAction != null && soapAction != "") { soapActionNode.before("SOAP Action"); - soapActionNode.replaceWith(function (i, e) { - return $("", { value: soapAction, type: "text"}); - }); + soapActionNode.replaceWith(newSoapActionNode); } else { soapActionNode.find("soap-action") .remove(); @@ -156,6 +155,11 @@ // Show the request and response pane response_div.removeClass("hidden"); + // Set the SOAPAction + if (soapAction != null && soapAction != "") { + soap_options.SOAPAction = newSoapActionNode.val(); + } + // Get the SOAP Body from the HTML form soap_options.data = newSoapBodyNode.val(); @@ -171,6 +175,9 @@ } } } + if (soapAction != null && soapAction != "") { + request += "SOAPAction: " + newSoapActionNode.val() + "\n"; + } request += "\n"; // Dump the SOAP Request