on 01-14-2015 1:11 AM
The scenario is file to webservice. The file contains a record that I need to submit to the webservice. The issue I am having is rather than providing any error as a response message (or an error segment in the response) it returns a soap:fault for any issue, structural or data; or the response structure as defined in the WSDL on success.
I tried to use the Fault on the Synchronous service interface:
Created a XSD based on the soap:fault structure, linked the External Message to the Fault in the Service Interface.
Example of a fault:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>soap:UQ_TAG_NET_ID_DEL</faultcode>
<faultstring>The specified Tag ID is already in use. Please specify a unique value.</faultstring>
<detail>
<FaultInfo>
UQ_TAG_NET_ID_DEL
<FaultParams>DataIntegrityViolationException</FaultParams>
</FaultInfo>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
When a fault is encountered, only the following shows in message monitoring:
<FaultInfo>
UQ_TAG_NET_ID_DEL
<FaultParams>DataIntegrityViolationException</FaultParams>
</FaultInfo>
I would like to be able to route the response message to a file so that it can be reviewed by support team, rather than cause error in Runtime Workbench. Going forward it is likely that I will add routing based on the <faultcode>. Certain faults can be handled, possibly by calling another webservice to obtain more data then include in transform.
Thank you for your assistance.
HI Tadd,
From my point of view Raghu suggestion is the best way to do it. However, you have more options like to generate the file in the response, in the mapping level, writing a file, you would need to it in an UDF or java mapping, like this example File Lookup in UDF - Process Integration - SCN Wiki
(notice this example is to read not to write).
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tadd,
You may want to use the RequestResponseBean and ResponseOneWayBean in your sender file channel to capture the response from the web service and save that as a file on a file server.
Regards
Charan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Raghu, thanks for taking some time to provide feedback. I am still unsure if the Async-Sync bridge without BPM is the right solution for me. I made a high-level process flow of my scenario. I am OK with using BPM (we do have many running well) and feel if I can handle the soap:fault in a BPM decision flow then I could achieve my entire process. What approach do you think makes sense?
Tadd,
Sync-Async bridge fits this requirement.
Target web-service (SOAP over HTTP), is synchronous. When a message is sent to target web-service, it will send back a success message or fault message. Use SOAPUI, to test target web-service.
Lets try this, SOAP <-> PI <-> SOAP. There will be request mapping and response mapping. Please configure this scenario and test it with SOAPUI. Sender agreement will have the WSDL details. Send a Tag ID which is already in use. You can will see response (fault message) in SOAPUI.
File can't be used for sync. So use Async-Sync bridge. Now configure a new scenario, File -> PI -> SOAP -> PI -> File. In response, use response mapping developed above.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.