dgrtmufasa
2 Sep 2011, 7:19 AM
Hello all,
I am a newbie in the mobile development area :)
I have a service that was generated by Wavemaker. To post a query to the service (and get data back successfully), one would execute this:
http://kaseypc:8092/Payments/runtimeService.json
with the following inputs (I saw this under the "Post" tab of firebug):
{"params":["KDM","com.kdm.data.Custbillers",null,{"properties":[],"filters":
[],"matchMode":"start","ignoreCase":false},
{"maxResults":500,"firstResult":0}],"method":"read","id":1}
I then tried to make changes so that it would work with the client side (javascript)
$(function(){
$.ajax({
type: "POST",
url: "http://kaseypc:8092/Payments/runtimeService.json",
params: KDM,com.kdm.data.Custbillers,null,{properties:[],filters:[],matchMode:start,ignoreCase:false},{maxResults:500,firstResult:0},
method: read,
id: 1,
dataType: 'jsonp',
success: function( ) { }
});
})
but got an error. My suspicion is that I did not translate the input I saw in Firebug properly so that it could be recognized on the javascript side.
Can someone tell me how I can format this so I can get a result data set from the service?
TIA
I am a newbie in the mobile development area :)
I have a service that was generated by Wavemaker. To post a query to the service (and get data back successfully), one would execute this:
http://kaseypc:8092/Payments/runtimeService.json
with the following inputs (I saw this under the "Post" tab of firebug):
{"params":["KDM","com.kdm.data.Custbillers",null,{"properties":[],"filters":
[],"matchMode":"start","ignoreCase":false},
{"maxResults":500,"firstResult":0}],"method":"read","id":1}
I then tried to make changes so that it would work with the client side (javascript)
$(function(){
$.ajax({
type: "POST",
url: "http://kaseypc:8092/Payments/runtimeService.json",
params: KDM,com.kdm.data.Custbillers,null,{properties:[],filters:[],matchMode:start,ignoreCase:false},{maxResults:500,firstResult:0},
method: read,
id: 1,
dataType: 'jsonp',
success: function( ) { }
});
})
but got an error. My suspicion is that I did not translate the input I saw in Firebug properly so that it could be recognized on the javascript side.
Can someone tell me how I can format this so I can get a result data set from the service?
TIA