hi,
I have a class from where I route messages to session service. I call all services asynchronously and hence i have defined a method in this class where service responses are recieved and handled.
Now in case an error occurs(from web services that are called by Session services), I have defined a method called HandleError(SoapFaultException ex) and also added ACTION EQ (http://schemas.xmlsoap.org/ws/2004/08/addressing/fault) in manifest file.
In the messages that I send to services, i have added reference property for correlation as I am not using CSF's correlation mechanism.
In method HandleError, how can I retrieve this Id. ID exists in soap envelope in Reply property, but I recieve SoapFaultException as input to this method. I dont recieve Message so that i can use some API like Message.Header.Properties.GetProperty(). How do I get "Message" from SoapFaultException class There is no API in SoapFaultException class to read the "Message" and its properties.
Any help would be appreciated.
Tirath

Handling exceptions in CSF 3.0
Will Merydith
Use the message available in the request context . i.e., RequestContext.Message, will contian the message you recieved.
thanks
Reddy
csLearner
Hello Tirath,
I am not sure whether this would work. But give it a try.
Override the ProcessMessage method of CsfService.
You will obviously receive the Message in this method. Check if this Message has the reference properties that you have set.
Give it a try and let me know.
Regards,
Vikram
Jose Francisco Ruiz Gualda
I have answered similar question in another thread.
If you have following routing criteria you will be able to get all the faults to the ErrorHandlerAction
<Route>
<Criteria>MESSAGE EQ 'Fault' AND MESSAGENS EQ 'http://schemas.xmlsoap.org/soap/envelope/' </Criteria>
<Destination>InitiatorService[ErrorHandlerAction]</Destination>
</Route>
Thanks
Bfundy
Hi Vikram,
Thanks for the reply. However I do not want to change anything for normal and successful scenarios. Overriding ProcessMessage method will mean changing something in normal scenarios as well. But I just want to handle Error scenarios so that I can retrieve actual Message from exception. Isnt there any other option available
Thanks
azbwilcox
Hello Tirath,
There is an option.
Instead of accepting SoapFaultException parameter in your method, accept a Message type parameter.
The SoapFaultException object will be present in the Message body. You can retrieve it. Also I suppose you will be able to get your reference properties intact in the Message.
Regards,
Vikram