Browse Source

set the SOAPAction before sending the query

master
Nicolas Massé 8 years ago
parent
commit
cd39725976
  1. 13
      soapui.js

13
soapui.js

@ -95,11 +95,10 @@
var soapActionNode = $(root_node).find("soap-action").get(0); var soapActionNode = $(root_node).find("soap-action").get(0);
soapActionNode = soapActionNode != null ? $(soapActionNode) : null; soapActionNode = soapActionNode != null ? $(soapActionNode) : null;
var soapAction = soapActionNode != null ? soapActionNode.text() : null; var soapAction = soapActionNode != null ? soapActionNode.text() : null;
var newSoapActionNode = $("<input>", { value: soapAction, type: "text"});
if (soapAction != null && soapAction != "") { if (soapAction != null && soapAction != "") {
soapActionNode.before("<span>SOAP Action</span>"); soapActionNode.before("<span>SOAP Action</span>");
soapActionNode.replaceWith(function (i, e) { soapActionNode.replaceWith(newSoapActionNode);
return $("<input>", { value: soapAction, type: "text"});
});
} else { } else {
soapActionNode.find("soap-action") soapActionNode.find("soap-action")
.remove(); .remove();
@ -156,6 +155,11 @@
// Show the request and response pane // Show the request and response pane
response_div.removeClass("hidden"); response_div.removeClass("hidden");
// Set the SOAPAction
if (soapAction != null && soapAction != "") {
soap_options.SOAPAction = newSoapActionNode.val();
}
// Get the SOAP Body from the HTML form // Get the SOAP Body from the HTML form
soap_options.data = newSoapBodyNode.val(); soap_options.data = newSoapBodyNode.val();
@ -171,6 +175,9 @@
} }
} }
} }
if (soapAction != null && soapAction != "") {
request += "SOAPAction: " + newSoapActionNode.val() + "\n";
}
request += "\n"; request += "\n";
// Dump the SOAP Request // Dump the SOAP Request

Loading…
Cancel
Save