Quantcast
Channel: DreamFactory Forum - Latest topics
Viewing all articles
Browse latest Browse all 1523

Remote Webservice call - post process / missing params in outgoing request

$
0
0

@mimu wrote:

i 've set up a remote web service which needs a couple of parameters.
1 header for basic auth, a couple of params which are always the same, and 2 params which are specific to each request i am sending.
I even did a swagger service definition.
It works like a charm.

The result is xml .

My idea was to process the result inside a post process script to convert it to json.

But inside the scripts area i can not add a custom script to the service.
Is this possibility not implemented or i'am missing something?
(ok after upgrade to 2.1 this is solved)

My second idea to was to create a custom Scripting Service and call the remote web service inside the script.

var myparams = event.request.parameters ;
var_dump(myparams);
var result = platform.api.get("mart/search", myparams );
return result;

The output of the log file:
output of var dump:
object(Object)#2120450790 (2) {
["searchterm"] =>
string(6) "winkel"
["supplier"] =>
string(4) "flex"
}

Outbound HTTP request: GET: https://ws.mart.net/services/catalog/search?buyer=xxxxxx&format=xml&language=de&results=300&portal=xxxx

myparams (searchterm and supplier ) are not added to the outbound Get request.

What i am doing wrong?

Thank you very much in advance for help,

Michael

Ps.
Bitnamistack on centos
Admin Application Version: 2.0.6
DreamFactory Version: 2.0.4

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 1523

Trending Articles