3.4. Messaging with SOAP

SOAP messaging is actually very easy to implement. All you need to do is format your request as an XML document and insert it within the <soapenv:Body> of a document/literal message. How you create your request as XML depends on the nature of the request and where the data is coming from. If your application uses .NET objects internally to represent the request data, you can easily create the XML by using .NET Serialization as explained in Chapter 2. Alternatively, if the request data is coming from SQL Server, you can get the data out as XML using SQL Server's FOR XML clause or one of the many other XML features of SQL Server.

As an example of messaging, I built a simple Web service (explained later in this chapter) ...

Get Real World XML Web Services: For VB and VB .NET Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.