BizTalk Utilities CV ,   Jobs ,   Code library  
 
Home Page
WCF, WS, SOAP
SoapFault Class
Sending RPC Responses
ISoapMessage Message Headers
Using the .NET SoapFormatter
Receiving an RPC message
Marshalling RPC With a Proxy
ISoapMessage (RPC) Interface
RPC using the NET SoapFormatter
SoapFormatter vs XmlSerializer
A Serialized SOAP Message
Retrieving Message Headers
SOAP Headers
Deserializing an Object Graph
Serializing an Object Graph
The SoapFormatter
Runtime Object Serialization
Importance of a UDDI based Service Registry
BizTalk and WCF: Part V, Publishing Operations Patterns
BizTalk and WCF: Part IV, Attachment Patterns
BizTalk and WCF: Part III, Transaction Patterns
<< Uncategorized
XALAN >>

By :Mark Wilson
I am the creator of TopXML. I am available for international and local (Australia) contracts. I am a Solution Architect/Business Analyst. I have worked in IT in several countries (NZ, Australia, South Africa, UK) building and training teams for government and very large non-governmental organizations. I am ex-Microsoft Consulting Services. I wrote the first book on Microsoft XML published in 2000 called XML Programming with VB and ASP. Most recently I have been building tools for the SEO industry. Ask me for a 37 point SEO health-checkup for your website.
First posted :03/24/2008
Times viewed :256

 

ServerFault Class

If platform interoperability is not so much an issue and we know we only communicate with other SoapFormatters we can leverage the fact that the SOAP standard explicitly allows non-primitive content within the <detail> element. Ideally we would want the <detail> element to contain the same information an Exception provides, because it is much easier to track down problems with all this data. It would be even better if the detail element was structured like an Exception object to simplify automatic parsing. The easiest solution to produce structured <detail>s would be to serialize an Exception directly into a fault message and this approach works well as long as we only serialize Exceptions defined by the .NET Framework. These exceptions are present on every .NET installation and the receiver can deserialize the Exception object without any problems.

However, applications typically define their own exception classes for specific error scenarios that are not available to the outside world. Serializing these exceptions into a fault message can cause severe problems for receivers that do not have these custom Exception classes available. Now if serializing some exceptions is not an option, how can we populate the <details> with structured data? We serialize a ServerFault object available from the System.Runtime.Serialization.Formatters namespace instead of a custom exception. The ServerFault class defines three properties for the data that identifies an exception (table). A ServerFault serializes the data in a structured fashion within the <detail> of a fault message and every SoapFormatter can deserialize a ServerFault without requiring the any custom assemblies. To make producing fault messages with structured <detail> elements even easier, the SoapFault class provides a constructor overload with a parameter of type ServerFault.

Table The properties of the ServerFault class allow storing and retrieving exception data in a structured format within a Fault’s <detail> element.

Property

Type

Access

Description

ExceptionMessage

string

read/write

The message of the exception caused by the SOAP message.

ExceptionType

string

read/write

The type of the exception caused by the SOAP message.

StackTrace

string

read/write

The stack trace to the location of the exception.


Rate this article on a scale of 1 to 10

Your vote :  


 

Recent Jobs

Software Developers Needed in Charl
Sr. Software Engineer - Analytics
Immediate Mainframe openings for Ch
Immediate TANDEM-TAL openings for C
Immediate ASP.NET/C# Openings for C

View all Jobs (Add yours)
View all CV (Add yours)



conference calling
swimming pool builder
spfxmasks
water softener
Teleconference
Host Department NOLIMIT Web Hosting
MSN
sunglasses


    Email TopXML  

Front Page Daily Stuff TopXML Forum XML blogs XML Newsgroups BizTalk Biztalk Utilities Biztalk Utilities Tutorial B2B SAP XML Microsoft .NET Dotnet System XML Soapformatter SQLXML XMLserializer XQuery PHP PHP SimpleXML PHP XML Dom PHP XML RPC PHP XSLT Java Java Java XML Xalan Microsoft ASP ASP Schemas XML SQL Server XML XMLDom XSL XSL Tutorial XSLT Stylesheets General Javascript CSS XHTML WAP