EL Exception Handling block and WCF custom Service Fault Exceptionhttp://forums.asp.net/t/1626316.aspx/1?EL+Exception+Handling+block+and+WCF+custom+Service+Fault+ExceptionTue, 23 Nov 2010 16:39:51 -050016263164181474http://forums.asp.net/p/1626316/4181474.aspx/1?EL+Exception+Handling+block+and+WCF+custom+Service+Fault+ExceptionEL Exception Handling block and WCF custom Service Fault Exception <p>I am currently working on a project to integrate WCF custom fault&nbsp;along with&nbsp;enterprise library exception block.&nbsp;</p> <p>I was following Guy Burstein's blog for doing this :</p> <p><a href="http://blogs.microsoft.co.il/blogs/bursteg/archive/2007/04/07/Shielding-WCF-Services-with-Exception-Handling-Application-Block-_2D00_-Part-1.aspx">http://blogs.microsoft.co.il/blogs/bursteg/archive/2007/04/07/Shielding-WCF-Services-with-Exception-Handling-Application-Block-_2D00_-Part-1.aspx</a></p> <p>This example only shows mapping for message and id. The message is of string data type and id is Guid data type.</p> <p>But what if I&nbsp;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 ?</p> <p>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?</p> <p>[<span style="color:#2b91af">DataContract</span>]</p> &lt;div style=&quot;FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: consolas&quot; mce_style=&quot;FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: consolas&quot;&gt; <p style="margin:0px"><span style="color:blue">public</span> <span style="color:blue"> class</span> <span style="color:#2b91af">ServiceFault</span></p> <p style="margin:0px">{</p> <p style="margin:0px">&nbsp;&nbsp;&nbsp; <span style="color:blue">private</span> <span style="color:blue"> string</span> categoryCode;</p> <p style="margin:0px">&nbsp;&nbsp;&nbsp; private string message;</p> <p style="margin:0px">&nbsp;&nbsp;</p> &nbsp;&nbsp;&nbsp; [<span style="color:#2b91af">DataMember</span>] <p style="margin:0px">&nbsp;&nbsp;&nbsp; <span style="color:blue">public</span> <span style="color:blue"> string</span>&nbsp;CategoryCode&nbsp;&nbsp;&nbsp; </p> <p style="margin:0px">&nbsp;&nbsp;&nbsp; {</p> <p style="margin:0px">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color:blue">get</span> { <span style="color:blue"> return</span> categoryCode; }</p> <p style="margin:0px">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color:blue">set</span> { categoryCode = <span style="color:blue">value</span>; }</p> <p style="margin:0px">&nbsp;&nbsp;&nbsp; }</p> <p style="margin:0px">&nbsp;</p> <p style="margin:0px">&nbsp;</p> <p style="margin:0px">&nbsp;&nbsp;&nbsp; [<span style="color:#2b91af">DataMember</span>]</p> <p style="margin:0px">&nbsp;&nbsp;&nbsp; <span style="color:blue">public</span> <span style="color:blue"> string</span> MessageText</p> <p style="margin:0px">&nbsp;&nbsp;&nbsp; {</p> <p style="margin:0px">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color:blue">get</span> { <span style="color:blue"> return</span> message; }</p> <p style="margin:0px">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color:blue">set</span> { message = <span style="color:blue"> value</span>; }</p> <p style="margin:0px">&nbsp;&nbsp;&nbsp; }</p> <p style="margin:0px">&nbsp;</p> <p style="margin:0px">&nbsp;&nbsp;}</p> <p style="margin:0px">&nbsp;</p> <p style="margin:0px">&nbsp;</p> <p style="margin:0px">&nbsp;</p> <p style="margin:0px">&nbsp;</p> <p style="margin:0px">&nbsp;</p> &lt;/div&gt; 2010-11-23T16:39:51-05:00