July 7th, 2010 |
Published in
BizTalk Tips
Again, this has been blogged previously by others. I am adding the entry here for my reference:
/*[local-name()=’Fault’]/*[local-name()=’Detail’ or local-name()=’detail’]/*|/*[not(local-name()=’Fault’)]
July 1st, 2010 |
Published in
BizTalk Tips
This has been blogged several times earlier. I am recording this for my reference.
Steps to setup basic ESB 2.0 Exception Handling in an orchestration
- Create Multipart message type “Fault” with “Body” of type Microsoft.Practices.ESB.ExceptionHandling.Schemas.Faults.FaultMessage
- Create new message msgFault with above type
- Create Exception Handler sysEx of type System.SystemException
- Construct message with following expressions:
//Create Fault Exception Message
msgFault = Microsoft.Practices.ESB.ExceptionHandling.ExceptionMgmt.CreateFaultMessage();
//Set Fault Properties
msgFault.Body.FailureCategory = “Category of failure“;
msgFault.Body.FaultCode = “ERROR“;
msgFault.Body.FaultDescription = sysEx.Message;
msgFault.Body.FaultSeverity = Microsoft.Practices.ESB.ExceptionHandling.FaultSeverity.Error;
//Add Message to the Fault Message
Microsoft.Practices.ESB.ExceptionHandling.ExceptionMgmt.AddMessage(msgFault, MessageCreatedOutsideScope);
References to be added:
Microsoft.Practices.ESB.ExceptionHandling
Microsoft.Practices.ESB.ExceptionHandling.Schemas.Faults