This example only shows mapping for message and id. The message is of string data type and id is Guid data type.
But what if I have some other custom fields in my custom Fault object in which I have a CategoryID of type string to which I need to map the id of type Guid ?
When I try to do the mapping and propogate it, I get the value as null. Is there some way I could convert the Guid to string type while doing the mapping in EL?
hsamdani
0 Points
1 Post
EL Exception Handling block and WCF custom Service Fault Exception
Nov 23, 2010 04:39 PM|LINK
I am currently working on a project to integrate WCF custom fault along with enterprise library exception block.
I was following Guy Burstein's blog for doing this :
http://blogs.microsoft.co.il/blogs/bursteg/archive/2007/04/07/Shielding-WCF-Services-with-Exception-Handling-Application-Block-_2D00_-Part-1.aspx
This example only shows mapping for message and id. The message is of string data type and id is Guid data type.
But what if I have some other custom fields in my custom Fault object in which I have a CategoryID of type string to which I need to map the id of type Guid ?
When I try to do the mapping and propogate it, I get the value as null. Is there some way I could convert the Guid to string type while doing the mapping in EL?
[DataContract]
<div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: consolas" mce_style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: consolas">public class ServiceFault
{
private string categoryCode;
private string message;
[DataMember]public string CategoryCode
{
get { return categoryCode; }
set { categoryCode = value; }
}
[DataMember]
public string MessageText
{
get { return message; }
set { message = value; }
}
}
</div>