on 2018 Sep 17 6:54 PM
Hi All
Need help regarding calling local integration flow .when the response payload is empty
we have scenario where we need to handle the empty response during the get operation of the request reply odata service .
if record not found it should go branch A.and trigger the process call
If record found it should go to the branch B, .
sample flow
For example :
if we query the odata end point using get operation for a filed email id , if the email is exits in the odata system it responds with payload or else a empty payload is returned.
EX:
$select=URI&$filter=URI eq test@gmail.com query.png
sample payload:
if record is found: record.png
If record not found response is empty-record.png
So experts need you help , can some guide me through the steps to achieve the requirement
Thanks
Ravi
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
Use below XPATH in the router to check empty response -
//CustomerCollection/exist(Customer) = 'False'
Thanks,
Apu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi apu.das2
I have tried the option you have suggested but still i see an error in cpi , need you help regrading the error .
please find the attachments for the condition ,payload and error i am getting
The error message i am getting in cpi
org.apache.camel.builder.xml.InvalidXPathExpression: Invalid xpath: /CustomerCollection/exists(Customer) = 'false'. Reason: javax.xml.xpath.XPathExpressionException: net.sf.saxon.trans.XPathException: Cannot compare xs:boolean to xs:string, cause: net.sf.saxon.trans.XPathException: Cannot compare xs:boolean to xs:string
Awaiting for your update.
Thanks
User | Count |
---|---|
52 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.