Archive for July, 2010

Soap Fault Xpath in Port Settings

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’)]

Simple BizTalk ESB 2.0 Exception Handling

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

  1. Create Multipart message type “Fault” with “Body” of type Microsoft.Practices.ESB.ExceptionHandling.Schemas.Faults.FaultMessage
  2. Create new message msgFault with above type
  3. Create Exception Handler sysEx of type System.SystemException
  4. 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