BizTalk Utilities CV ,   Jobs ,   Code library  
 
Home Page
WCF, WS, SOAP
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
BizTalk and WCF: Part II, Security Patterns
BizTalk and WCF: Part I, Operation Patterns
Accessing UDDI using Apache Scout APIs
Storing state in an XML property bag
UDDIExplorer
XslTransport for PocketSOAP
Kafka - XSLT SOAP Toolkit
VB Web services Proxy Generator
Using msxml3 with Web Storage System
Getting started with SOAP
Calling an Web service from a Managed C++ project
How to access asyncronously from C# an web service
What is XML-RPC?
Web Service and DHTML
Use XMLDOM and XMLHTTP Documents to Upload Small Files
Temperature Conversion XML WebService
<< 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 :361

 

Runtime Object Serialization

The second prerequisite for this chapter is an understanding of the .NET Framework’s runtime serialization functionality found in the namespaces System and System.Runtime.Serialization. With runtime serialization we can transform objects into a different format that is better suited for storage or transmission. The previous chapter explained serializable classes in great detail. Please take some time to read it before you continue this one if you are not already familiar with at least the SerializableAttribute.

Serializing Objects to SOAP messages

In the previous chapter we learned how to develop serializable classes with the .NET Framework. In this chapter we will see what they are good for. The focus will be on serializing objects with the SoapFormatter. You probably already guessed from the name what the SoapFormatter does: It transforms an object’s state into a representation based on the SOAP standard. Of course, it also works the other way: It re-creates an object from a SOAP message. That in itself is interesting functionality, but it is already available through ASP.NET WebServices, what do we need the SoapFormatter for? Well, for one WebServices internally rely on the XmlSerializer to do the object-to-SOAP transformations. This serializer has quite a few weak spots when it comes to serializing the majority of objects out there. The SoapFormatter on the other hand works well with all serializable objects.

Second, WebServices are tied to the Web. We do not have a good solution available when we want to move objects over a different transport. The SOAP protocol was designed to send messages over all sorts of different protocols and transports. SOAP over HTTP is probably the most prevalent today because it allows nicely for tunneling through corporate firewalls, but it also has some weaknesses. For example, communication over HTTP is based on a synchronous request-response model and it is very much hit-or-miss. We are out of luck when the WebService’s server is not running and we have to code complicated logic to retry sending a message if the first attempt fails because the recipient of the message does not respond. If we need an asynchronous communication model or if we are looking for a more reliable delivery mechanism .NET Web Services do not provide an adequate solution right out of the box. Microsoft is currently working on an initiative called Global XML Architecture (GXA) to address these issues, but that project just entered the “Technology Preview” phase. It may take a while until the results of this initiative are integrated into the .NET Framework. There are, however, alternatives available today to provide asynchronous, reliable, SOAP-based solutions if we can get away from using HTTP as the message transport. Message queues, for example, are a transport mechanism which addresses both of these issues. SOAP is actually very much suited to message queues since it is inherently message based and does not require an immediate response.

Sending SOAP Messages over Message Queues

To get an idea how SOAP over message queues would work, we will build pieces of a system to send and receive objects over message queues throughout this chapter. We will show how we can send objects in a user management system. The activity we focus on in the example is inserting new users into the system. We imagine a client application queues a message representing the insert operation each time it needs to insert a new user into the system. Through the use of message queues it is completely transparent whether the queued request is executed on the same computer or on a different computer half-way across the world. The message queuing infrastructure takes care of the routing for us. Another application takes the message off the queue and acts on the information stored in the message. The example in this chapter this example will focus on one-way message exchange.


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