Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have design an ESB module for REST services. My ESB is developed as follows (see attachement):
tPostgresqlConnection -> RestInterface -> tFlowtoIterate -> tPostgresInput -> tXMLMap -> tRestresponse
The REST service works good. But if the SQL query under tPostgresInput have no response the REST service return an 404. It is possibly to return an empty JSONS (for example {items:{}}) ?
Greets
Benjamin
Hello
You can check the number of lines are read from tPostGresInput and generate different response, for example:
tPostgresqlConnection -> RestInterface -> tFlowtoIterate -> tPostgresInput ->
tHashOutput-- runif1--thashinput--tXMLMap 1-> tRestresponse1
--runIf2--tfixedFlowInput--tXMLMap2--trestresponse2
thashoutput: cache the query data into memory.
thashinput: read the data from memory.
set the condition of runif1 as:
((Integer)globalMap.get("tPostgresqlInput_1_NB_LINE"))>0
set teh condition of runif2 as:
((Integer)globalMap.get("tPostgresqlInput_1_NB_LINE"))==0
tfixedFlowInput: you can customize the response string such as : "no data found" and assign it to output Document on tXMLMap2.
Regards
Shong
Hello
You can check the number of lines are read from tPostGresInput and generate different response, for example:
tPostgresqlConnection -> RestInterface -> tFlowtoIterate -> tPostgresInput ->
tHashOutput-- runif1--thashinput--tXMLMap 1-> tRestresponse1
--runIf2--tfixedFlowInput--tXMLMap2--trestresponse2
thashoutput: cache the query data into memory.
thashinput: read the data from memory.
set the condition of runif1 as:
((Integer)globalMap.get("tPostgresqlInput_1_NB_LINE"))>0
set teh condition of runif2 as:
((Integer)globalMap.get("tPostgresqlInput_1_NB_LINE"))==0
tfixedFlowInput: you can customize the response string such as : "no data found" and assign it to output Document on tXMLMap2.
Regards
Shong
thx I will try it.