My problem is I have a REST service that only takes input as a request body.
That means no query parameters and no form parameters. So I cannot use the input mapping that is provided by the wizard.
I have tested with the same REST service with zero input and the output comes out just fine as per the mappings.
I have now created a Generic Service and added it to the App, then I did the output mappings based on a sample response.
So with my intentions hopefully clear, my question is about the custom implementation.
I have been unable to find any documentation on this topic, other than "settings" is the same as passed in to jQuery.ajax
My assumption is that all I have to do is configure the "settings" so when I click a button that has "Invoke Service" as an action, it will call "execute", which triggers my my custom settings to run just before it.
I set the url and dataType like this:
settings.url = '[url=http://..../rest/myservice']http://..../rest/myservice'[/url];
settings.dataType = 'json';
I can see in the Browser that the Console.log the implementation is invoked, but it never executes the service.
I tried calling
myService.execute( settings);
but that caused something that looked like a stackoverflow (as if execute got caught in a recursive loop).
I also tried overriding the success method, but no noticeable result
settings.success(
function ( data) {
updateComponents( data);
alert( 'custom data: '+data);
}
);