This is the web service call I am using:
<wsdl:operation name="upload">
<soap:operation soapAction="http://uri.org/IDA_Command/upload" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
And this is how I'm making the web service call from JavaScript:
var uploadInputs = "/Import/uploadInputs ";
$.get(uploadInputs + "/", function (data) {
$.each(data, function (value, key) {
$.ajax({
url: 'http://uri.org/IDA_Command/upload',
contentType: 'application/json; charset=utf-8',
dataType: "json",
processData: false,
type: "POST",
success: function (response) {
if (response === true) {
alert("Inputs uploading...");
}
},
failure: function (response) {
alert("There was an error in uploading the inputs..");
}
});
});
});
I am passing 'value and key' as parameters for the 'upload' method, but no success or failure alert messages are returned. I am not receiving any errors either. How can I confirm that the service method has been called? Am I missing something in the code?
Could someone please advise on how to properly call the upload method with two parameters in the service using an Ajax call? Thank you in advance.