In case you've been living under a rock for the past few weeks, the paradigms have shifted once again. We no longer are in the era of simply dynamically doing things agilely on the fly. Now is the time for dynamically doing things agilely on the fly with service oriented architectures. Consider, as an example, this old and complicated method of sending an email message programmatically ...

MailMessage email = new MailMessage();
email.From = "[email protected]";
email.To = "[email protected]";
email.Subject = "Email Notification";
email.Body = "...";
SmtpMail.Send(email);

I was thinking exactly the same thing: what the heck is going on there!?! Thankfully, this same arduous task is easily accomplished with a dash of XML and the ever helpful Initech.EnterpriseFramework.WebServices.EmailWebService ...

/// <summary>
/// Sends an email message contained within an XML parameter.
/// </summary>
///
/// <param name="emailXmlString">
/// A string containing the XML of the email message. See remarks 
/// for the format of the XML.
/// </param>
///
/// <remarks>
/// The emailXmlString should be formatted as follows:
///    <EmailMessage>
///      <From>
///      <Address Name="John Doe" Email="[email protected]" />
///    </From>
///    <To>
///      <Address Name="John Doe" Email="[email protected]" />
///    </To>
///    <CC>
///      <Address Name="John Doe" Email="[email protected]" />
///    </CC>
///    <BCC>
///      <Address Name="John Doe" Email="[email protected]" />
///    </BCC>
///     <Subject>Test Email To John Doe</Subject>
///     <Body>This contains the body of the Email to John Doe</Body>
///   </EmailMessage>
/// </remarks>
[WebMethod()]
public void SendEmailMessage(string emailXmlString)
{
  // ED: The code though, not really bad ...

... and for the Office Space (the movie) deprived, company name changed to protect the architects.

[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!