I am working in a JSONRPC webservice and I am trying to send the request to the server end to get the response. Basically I am trying to send the following details in the request
methodname//example 899
Language code
Transaction code
User ID
Password
number
Amount
Now there is the host which I need to submit the request.If I telnet the host and the port its getting connected successfully.But when I try to submit the request through the browser I am getting some net::ERR_CONNECTION_CLOSED.I am not sure why its happening.
I am not sure about the request that I am submitting but here is the request that I am submitting.And I am submitting request using the Javascript
<Script>
JSONTest = function() {
$.ajax({
url : "https://domain.com:port/",
type : 'GET',
data : {
"jsonrpc" : "2.0",
"method" : "904",
"id" : "1",
"params": [ "en", "69", "2123129930", "4371232483", "50", "" ]
},
dataType : "json",
success : function(result) {
//alert("result"+result[0]);
switch (result) {
case true:
processResponse(result);
break;
default:
resultDiv.html(result);
}
},
/* error: function (xhr, ajaxOptions, thrownError) {
alert(xhr.status);
alert(thrownError);
} */
});
};
</script>
<button type="button" onClick="JSONTest()">JSON</button>
Based on the above script I am tryiing to find the answers for the following questions.
- Is the request that I am submitting above is valid or not ?
- How can I provide the URL value if the above declaration is wrong?
- Is the type that I have provided above is fine ?
- Please validate all the parameters and let me know whether all of the parameters positions as valid or not.
- What is the hierarchy of the parameters that I have provided above ?
Really appreciate your help on this.