on 07-10-2007 12:45 PM
Hi Experts,
If I don't get the result for the requested value for the synch webservice -> JDBC scenario(without BPM), I have to return "No records found" as a response.
Below, I have mentioned the Source and Target message Type structure.
Source Message Type:
1. JDBC_response
1.1. STATEMENT_response
1.1.1. row
1.1.1.1. EmpId
1.1.1.2. EmpName
1.1.1.3. Address
Target Message Type
1. SOAP_Response
1.1.RESPONSE
1.1.1.row
1.1.1.1. EmpId
1.1.1.2. EmpName
1.1.1.3. Address
1.1.2 Error Description
1. What function we have to use in the userdefined function to find the rowcount or to do the resultset check?
2. If the rowcount is zero, then I have to return the Error Description as a response. Where to mention the Error Description field. It should be under <b>row</b> or ?
Regards
Sara
Message was edited by:
Sara D
Sara,
Could you tell us the occurrences of Row-segment.
Best regards,
raj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sara,
Please try the below and let us know the feedback.
Mapping for Row
http://www.flickr.com/photo_zoom.gne?id=776959840&size=o
Mapping for Error-Description
http://www.flickr.com/photo_zoom.gne?id=776959924&size=o
Results
http://www.flickr.com/photo_zoom.gne?id=776959934&size=o
Map the EmpID,EmpName,Address direct mapping from source.
The logic is , if there is no response rows then it will give the Error Description alone. Similarly if there is resposnse row it won't give the Errordescription. Kindly have a look and let me know whether it matches ur reqmt.
Best regards,
raj.
<i>1. What function we have to use in the userdefined function to find the rowcount or to do the resultset check?</i>
U may modify ur JDBC to send row count fom the JDBC in one of its field. So it could be retreived from the payload.
Function inside UDF? graphical mapping functions could be used outside UDF as explained by Mudit.
<i>2. If the rowcount is zero, then I have to return the Error Description as a response. Where to mention the Error Description field. It should be under row or ?</i>
It could placed at 1.1.2 correctly.
Regards,
Prateek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can do like this
row(response message) -
count - ifthenwithoutelse(constant(0))- constant(No records found) --- target
mudit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.