on 10-19-2015 2:17 PM
Hi,
I am using Webservices as a sender (SOAP)adapter.when Webservices are failed at mapping then I have route to two receivers one for file( error) and one for proxy(Success).
If there are any errors i.e mandatory fields or data format errors then message needs to be routed to multiple receivers based on webservice triggered by third party system.looking for archive option for webservices . how to archive dat once it fails in message mapping? when SOAP as a sender adapter.
Praveen
Hi Praveen,
You can do a file written at mapping level, however if you don't want to send that message to the receiver, you can use the condition editor on the receiver determination/ICO to send the XML to the webservice or to the file adapter.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Iñaki,
Can you explain where condition required in ICO? How to do it ?
Please explain how to split at mapping level if there are any errors.
Thanks
Praveen
Hello Praveen,
Refer the below link to add conditions in ICO.Blog is about adding in Receiver deterimation the same should you do in ICO receivers tab.
Xpath Condition in Receiver Determination - Process Integration - SCN Wiki.
And Praveen you should have try catch blog and in case of error you should write string buffered writer to write the file.
Hello Praveen,
Requirement is to write the file if mapping fails??as Inaki told you can do i using UDF in the mapping.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raghuraman,
In my scenario Webservices may fail or success then I have to routed to two recivers .
1.If webservices success then go to ABC- receiver.
2.If webservices fails then it's go to XYZ-receiver.
There are no conditions simply if I get an error at that time of mapping then I need to send to one receiver( fail) else send to other receiver (success).
I just looking for an option to achrive data if the webservices falis.
Thanks
Praveen.
Praveen,
In mapping functions you can see Init,Cleanup methods.
Just have a catch block to throw in case of errors.
And incase of errors have a code like below to write the file
Hi Praveen,
It depends about what you want. Also you can't simply copy the code, you should check what do and what you should change. Also, if you want to check mandatory fields, why do you want to expect to a mapping error?, why don't make a first java mapping in order to check the mandatory fields?
Regards.
Hi Iñaki,
I have written an UDF for mandatory fileds but in scenario i need to get that record if value is missing and send back to source as a file.that's why i have to get that missing fields record.My intention is not to copy code, it just for uderstanding.I won't get anything by copying others code. I just understanding the process.
Thanks
Praveen
Hi Praveen,
I misunderstood you then. In my opinion you can do a SOAP to Proxy scenario. In the mapping you can have a first mapping to check the mandatory fields, you have some interesting blog about to work with java and DOM to work with XML. In this first mapping you can check the mandatory fields, create the file if it is necessary and to produce a second XML. This XML would be the original XML or a second XML with information about the error. Later you can send this message to the proxy, even the error one; it's a good idea to have a Z table on the receiver side to store the fail communications, in this way you can control easily the issue without the necessity to go to the file or the PI monitoring, what do you think?
Regards.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
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.