<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Jeff Nuckolls {Application Platform and Development Tools} : Biztalk</title><link>http://blogs.msdn.com/jeff/archive/tags/Biztalk/default.aspx</link><description>Tags: Biztalk</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Biztalk POP3 Adapter and WSS Adapter Example</title><link>http://blogs.msdn.com/jeff/archive/2008/04/05/biztalk-pop3-adapter-and-wss-adapter-example.aspx</link><pubDate>Sat, 05 Apr 2008 22:59:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8361354</guid><dc:creator>jeffnuck</dc:creator><slash:comments>9</slash:comments><comments>http://blogs.msdn.com/jeff/comments/8361354.aspx</comments><wfw:commentRss>http://blogs.msdn.com/jeff/commentrss.aspx?PostID=8361354</wfw:commentRss><description>&lt;P&gt;After some extensive research I could not find a good example of how I could receive an Email via the POP3 Adapter for Biztalk Server 2006 R2 that completely parsed out the header content (To, From, Subject, CC, etc...) and the Body &lt;EM&gt;(I don't parse the attachments in this example, &lt;A class="" href="http://www.biztalkgurus.com/files/folders/biztalk_2006_samples/entry15562.aspx" target=_blank mce_href="http://www.biztalkgurus.com/files/folders/biztalk_2006_samples/entry15562.aspx"&gt;but &lt;/A&gt;&lt;/EM&gt;&lt;EM&gt;&lt;A class="" href="http://www.biztalkgurus.com/files/folders/biztalk_2006_samples/entry15562.aspx" target=_blank mce_href="http://www.biztalkgurus.com/files/folders/biztalk_2006_samples/entry15562.aspx"&gt;here is a sample that does a great job of parsing multiple attachments&lt;/A&gt;&lt;/EM&gt;&lt;EM&gt;, thanks to Stephen W. Thomas for posting it.)&lt;/EM&gt;.&lt;/P&gt;
&lt;P&gt;* For this article I make a general assumption that you already have a working knowledge about the Biztalk for creating and deploying a basic Biztalk application.&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Scenario:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;College Admissions process requires that a prospective student submit an Essay as part of their application for admittance to the University.&amp;nbsp; Here the student will be submitting their essays in the body of an email.&amp;nbsp; Instead having someone in the Admissions office monitor a huge inbox, we can automate the process of by parsing out the email and submitting it to a Sharepoint List.&amp;nbsp; For this first example that is as far as we'll take it, but the idea is that once anything is submitted to a Sharepoint List... Sharepoint workflows can be started, staff from the Admission Office can easily search/edit/export these essays, they can be automatically be correlated with other application artifacts (ie. Transcripts, Application Info, Financial records, etc...) based on the application ID or student email to ultimately create a single "student profile" once everything has been received for a particular student.&amp;nbsp; &lt;EM&gt;(I'll demonstrate the rest of these other pieces in a separate example.)&lt;/EM&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Setup a custom List in Sharepoint (WSS or MOSS):&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;(Details about setting up and configuring Sharepoint and Biztalk are beyond the scope of this example.)&lt;/EM&gt; 
&lt;P&gt;Here I have created a custom List called "Essays for Student Admission Applications" with the following Columns:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Changed the Default "Title" Column name to &lt;STRONG&gt;Submitted By&lt;/STRONG&gt; 
&lt;LI&gt;&lt;STRONG&gt;Essay Response&lt;/STRONG&gt; (Multiple lines of text) 
&lt;LI&gt;&lt;STRONG&gt;Application ID&lt;/STRONG&gt; (Single line of text) 
&lt;LI&gt;&lt;STRONG&gt;Date Submitted&lt;/STRONG&gt; (Single line of text)&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;* I left the defaults for &lt;STRONG&gt;Created By&lt;/STRONG&gt; and &lt;STRONG&gt;Modified By&lt;/STRONG&gt; as is. 
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/clip_image002_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/clip_image002_2.jpg"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=214 alt=clip_image002 src="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/clip_image002_thumb.jpg" width=244 border=0 mce_src="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/clip_image002_thumb.jpg"&gt;&lt;/A&gt; 
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Create a new POP3 Mailboxes and setup the Outlook client:&lt;/U&gt;&lt;/STRONG&gt; 
&lt;P&gt;* Here we are assuming that you have already installed/configured POP3 and SMTP Services or your will be leveraging an existing POP3 mail server (ie MS Exchange Server).&amp;nbsp; &lt;EM&gt;(The installation/configuration of POP3/SMTP Services is beyond the scope of this example.)&lt;/EM&gt; 
&lt;UL&gt;
&lt;LI&gt;In this example I installed POP3/SMTP on my local machine and configured it to use my local domain (called &lt;STRONG&gt;&lt;EM&gt;nuckolls.edu&lt;/EM&gt;&lt;/STRONG&gt;)&lt;/LI&gt;
&lt;LI&gt;Add a new Mailbox &lt;STRONG&gt;to be used by Biztalk&lt;/STRONG&gt;&amp;nbsp;&lt;EM&gt;(you must know the password of the account associated with this mailbox)&lt;/EM&gt;&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;Added a mailbox associate with a user account (called &lt;EM&gt;&lt;STRONG&gt;ProcessApplication@nuckolls.edu&lt;/STRONG&gt;&lt;/EM&gt;)&lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;Add a new Mailbox &lt;STRONG&gt;to simulate the Student&lt;/STRONG&gt;&amp;nbsp;&lt;EM&gt;(you must know the password of the account associated with this mailbox)&lt;/EM&gt;&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;Added a mailbox associate with a user account (ie. &lt;EM&gt;&lt;STRONG&gt;jeff@nuckolls.edu&lt;/STRONG&gt;&lt;/EM&gt;)&lt;/LI&gt;
&lt;LI&gt;Create a new Account Profile in Outlook or Outlook Express to send and receive email as this Student. (Steps for this were omitted, assuming this was a reasonably simple step... just make sure it works, by send/receiving email or checking the &lt;EM&gt;C:\InetPub\mailroot\Mailbox\nuckolls.edu\YourMailbox.mbx&lt;/EM&gt;)&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Create a new blank Biztalk Application project:&lt;/U&gt;&lt;/STRONG&gt; 
&lt;UL&gt;
&lt;LI&gt;Name the Project TestPOP3 
&lt;LI&gt;Right-click on the TestPOP3 project in Solution Explorer and select Properties 
&lt;LI&gt;In the Project Properties window ensure you have done the following: 
&lt;UL&gt;
&lt;LI&gt;&lt;EM&gt;Common Properties/Assembly&lt;/EM&gt;: 
&lt;UL&gt;
&lt;LI&gt;Assembly Key File = (assign your *.snk key file... &lt;EM&gt;if you haven't already created it, create one using the VStudio command prompt and &lt;STRONG&gt;sn.exe -k C:\MyKey.snk&lt;/STRONG&gt;&lt;/EM&gt;)&lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;&lt;EM&gt;Configuration Properties/Build&lt;/EM&gt;: 
&lt;UL&gt;
&lt;LI&gt;Application Name = TestPOP3 
&lt;LI&gt;Restart Host Instances = True&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;&lt;/U&gt;&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Create the initial Biztalk application artifacts (Schemas):&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;In this example we will need two schemas, one for the inbound email message (we will call EmailSchema.xsd) and one for the outbound Sharepoint message (we will call AdmissionApp.xsd). 
&lt;UL&gt;
&lt;LI&gt;Create a new Schema called &lt;STRONG&gt;EmailSchema.xsd&lt;/STRONG&gt; 
&lt;OL&gt;
&lt;LI&gt;Rename the Root node to &lt;STRONG&gt;EmailText&lt;/STRONG&gt; 
&lt;LI&gt;Create one Child Field Element named &lt;STRONG&gt;Text&lt;/STRONG&gt; with a Data Type = xs:string 
&lt;LI&gt;Promote the Text element as a "Distinguished Field" property.&lt;BR&gt;&lt;BR&gt;EmailSchema.xsd should appear as follows:&lt;BR&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/clip_image006_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/clip_image006_2.jpg"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=127 alt=clip_image006 src="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/clip_image006_thumb.jpg" width=162 border=0 mce_src="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/clip_image006_thumb.jpg"&gt;&lt;/A&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;LI&gt;Create another Schema called &lt;STRONG&gt;AdmissionApp.xsd&lt;/STRONG&gt; 
&lt;OL&gt;
&lt;LI&gt;Rename the Root node to &lt;STRONG&gt;Application&lt;/STRONG&gt; 
&lt;LI&gt;Create the following Child Field Elements all with a Data Type = xs:string and promote all of them as "Distinguished Field" properties:&lt;BR&gt;&lt;BR&gt;AdmissionApp.xsd should appear as follows:&lt;BR&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_2.png" mce_href="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_2.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=200 alt=image src="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_thumb.png" width=186 border=0 mce_src="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_thumb.png"&gt;&lt;/A&gt;&amp;nbsp;&lt;BR&gt;&lt;BR&gt;* Ensure all of the Child Field Elements in both schemas are set to "Distinguished Fields" as follows:&lt;BR&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_4.png" mce_href="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_4.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=150 alt=image src="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_thumb_1.png" width=244 border=0 mce_src="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_thumb_1.png"&gt;&lt;/A&gt; &lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Add a&amp;nbsp;(Flat file disassembler)&amp;nbsp;Pipeline component:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;This will be used to help parse out the header and body elements of the text-based email we will receive from the POP3 Adapter.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Add a new Receive Pipeline component to your Biztalk project called &lt;STRONG&gt;GetEmailText.btp&lt;/STRONG&gt; 
&lt;LI&gt;Add a Flat file disassembler to the Disassemble shape on the pipeline designer. 
&lt;LI&gt;Assign the Document Schema property of the Flat file disassembler = &lt;STRONG&gt;TestPOP3.EmailSchema&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_6.png" mce_href="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_6.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=227 alt=image src="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_thumb_2.png" width=244 border=0 mce_src="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_thumb_2.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Create a Biztalk Orchestration:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;This orchestration represents the automated Business Process of receiving an Essay as part of a larger Admissions Application process.&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Add an Orchestration:&lt;/U&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Right-click on TestPOP3 project in Solution Explorer and Add a new Biztalk Orchestration&lt;/LI&gt;
&lt;LI&gt;Name it &lt;STRONG&gt;EmailProcess.odx&lt;BR&gt;&lt;BR&gt;&lt;/STRONG&gt;* Your Solution Explorer window should now appear as follows:&lt;BR&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_8.png" mce_href="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_8.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=244 alt=image src="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_thumb_3.png" width=199 border=0 mce_src="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_thumb_3.png"&gt;&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;* Before we start adding/configuring shapes to the Orchestration Designer... let's first open the Orchestration View window and define some Messages and Variables that we will later use within our Orchestration:&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;/U&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Orchestration Messages and Variables:&lt;/U&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Select View--&amp;gt;Other Windows--&amp;gt;Orchestration View (otherwise it should already accessible on the tab next to the Solution Explorer window) 
&lt;LI&gt;Right-click Messages and create the following Messages: 
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;In&lt;/STRONG&gt; 
&lt;UL&gt;
&lt;LI&gt;Message Type = TestPOP3.EmailSchema&lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Out&lt;/STRONG&gt; 
&lt;UL&gt;
&lt;LI&gt;Message Type = TestPOP3.AdmissionApp&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;Right-click Variables and create the following Variables: &lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;strEmailAddress&lt;/STRONG&gt; 
&lt;UL&gt;
&lt;LI&gt;Type = System.String&lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;&lt;STRONG&gt;strStudentID&lt;/STRONG&gt; 
&lt;UL&gt;
&lt;LI&gt;Type = System.String&lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;&lt;STRONG&gt;XMLDOM&lt;/STRONG&gt; &lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;Type = System.Xml.XmlDocument&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;* The Orchestration View should appear as follows:&lt;BR&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_12.png" mce_href="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_12.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=244 alt=image src="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_thumb_5.png" width=186 border=0 mce_src="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_thumb_5.png"&gt;&lt;/A&gt; &lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;U&gt;Orchestration Workflow/Process Designer&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;Back to the Orchestration Designer we can now start adding some shapes and configuring some properties that will ultimately define our workflow process.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Add a &lt;STRONG&gt;Receive&lt;/STRONG&gt; shape 
&lt;UL&gt;
&lt;LI&gt;Active = True 
&lt;LI&gt;Message = In&lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;Add a &lt;STRONG&gt;Construct Message&lt;/STRONG&gt; shape 
&lt;UL&gt;
&lt;LI&gt;Message Constructed = Out&lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;Drag a &lt;STRONG&gt;Message Assignment&lt;/STRONG&gt; shape into the Construct Message shape we just added above &lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;Expression = (add the following to the Expression Editor)&lt;BR&gt;
&lt;TABLE class="" cellSpacing=0 cellPadding=5 width=606 border=1&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=604&gt;
&lt;P&gt;XMLDOM = new System.Xml.XmlDocument();&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;//NOTE: The following xml can be easily generated by right-clicking on the EmailSchema.xsd file and selecting Generate Instance&lt;BR&gt;//IMPORTANT: The following line of XML should all be on a single line, its on several lines here just for reading purposes only!!!&lt;BR&gt;XMLDOM.LoadXml(@"&amp;lt;ns0:Application xmlns:ns0=""http://TestPOP3.AdmissionApp""&amp;gt;&amp;lt;StudentID&amp;gt;StudentID_0&amp;lt;/StudentID&amp;gt;&lt;BR&gt;&amp;lt;AppDate&amp;gt;AppDate_0&amp;lt;/AppDate&amp;gt;&amp;lt;SubmittedBy&amp;gt;SubmittedBy_0&amp;lt;/SubmittedBy&amp;gt;&lt;BR&gt;&amp;lt;EssayResponse&amp;gt;EssayResponse_0&amp;lt;/EssayResponse&amp;gt;&lt;BR&gt;&amp;lt;/ns0:Application&amp;gt;");&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;Out = XMLDOM;&lt;BR&gt;Out.AppDate = In(POP3.Date);&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;//Here we chop of the first 11 characters of the "Subject" (which is "Application")and return the rest as the StudentID&lt;BR&gt;strStudentID = In(POP3.Subject);&lt;BR&gt;Out.StudentID = strStudentID.Substring(11);&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;//Here we do some string manipulations to remove "&amp;lt;" and "&amp;gt;" from the email adddress...&lt;BR&gt;strEmailAddress = In(POP3.ReplyTo);&lt;BR&gt;strEmailAddress = strEmailAddress.Remove(0,1);&lt;BR&gt;strEmailAddress = strEmailAddress.Remove((System.Int32)strEmailAddress.Length -1);&lt;/P&gt;
&lt;P&gt;Out.SubmittedBy = strEmailAddress;&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;Out.EssayResponse = In.Text;&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;Out(FILE.ReceivedFileName) = "StudentID" + In(POP3.Subject) + ".xml";&lt;BR&gt;XMLDOM = null;&lt;BR&gt;XMLDOM = Out;&lt;/P&gt;
&lt;P&gt;//The following if for debugging purponses only...&lt;BR&gt;System.Diagnostics.EventLog.WriteEntry("TestPOP3 Debug Complete Msg", System.String.Format("Out Message = {0}", XMLDOM.InnerXml));&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;Add a &lt;STRONG&gt;Send&lt;/STRONG&gt; shape&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;Message = Out&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;
&lt;P&gt;&lt;U&gt;&lt;/U&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Create Logical Send and Receive Ports:&lt;/U&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Drag a Port shape from the Toolbox to the "Port Surface" on the &lt;STRONG&gt;left side&lt;/STRONG&gt; of the Orchestration Designer&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;Wizard will start, click Next&lt;/LI&gt;
&lt;LI&gt;Name = &lt;STRONG&gt;Port_In&lt;/STRONG&gt;, click Next&lt;/LI&gt;
&lt;LI&gt;Port Type = &lt;STRONG&gt;PortType_In&lt;/STRONG&gt;, click Next&lt;/LI&gt;
&lt;LI&gt;Port Binding screen:&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;Port direction of communication = &lt;STRONG&gt;I'll always be receiving messages on this port&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Port Binding = &lt;STRONG&gt;Specify Later&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;Click Next, Finish&lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;Drag another Port shape from the Toolbox to the "Port Surface" on the &lt;STRONG&gt;right side&lt;/STRONG&gt; of the Orchestration Designer&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;Wizard will start, click Next&lt;/LI&gt;
&lt;LI&gt;Name = &lt;STRONG&gt;Port_Out&lt;/STRONG&gt;, click Next&lt;/LI&gt;
&lt;LI&gt;Port Type = &lt;STRONG&gt;PortType_Out&lt;/STRONG&gt;, click Next&lt;/LI&gt;
&lt;LI&gt;Port Binding screen:&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;Port direction of communication = &lt;STRONG&gt;I'll always be sending messages on this port&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Port Binding = &lt;STRONG&gt;Specify Later&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;Click Next, Finish&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Assign Logical Port Operations with Send and Receive shapes:&lt;/U&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;From the Port_In port we just created, Drag the green "Port Connector Line" to the Receive shape&lt;/LI&gt;
&lt;LI&gt;From the Port_Out port we just created, Drag the green "Port Connector Line" to the Send shape&lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;* Your Orchestration should now look as follows:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_10.png" mce_href="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_10.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=204 alt=image src="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_thumb_4.png" width=244 border=0 mce_src="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_thumb_4.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Build and Deploy your Biztalk Application:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;At this point we are ready to build, deploy, and test our application...&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Right-click on TestPOP3 and select Build (resolve any errors)&lt;/LI&gt;
&lt;LI&gt;Right-click on TestPOP3 and select Deploy (resolve any errors)&lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Create Physical Biztalk Port and Define Orchestration Bindings:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Once you have successfully been able to Build and Deploy your Biztalk application, you will find it available in the Biztalk Server Administration console under Applications.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Open up the Biztalk Server Administration console&lt;/LI&gt;
&lt;LI&gt;Drill down into Applications --&amp;gt;&amp;nbsp; TestPOP3&lt;/LI&gt;
&lt;LI&gt;Create a new Receive Port called &lt;STRONG&gt;ReceivePOP3&lt;/STRONG&gt; (accept default settings)&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;Create a new Receive Location called &lt;STRONG&gt;ReceivePop3Loc&lt;/STRONG&gt;&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;Type = &lt;STRONG&gt;POP3&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Receive pipeline = &lt;STRONG&gt;GetEmailText&lt;/STRONG&gt;&lt;BR&gt;* Receive Location properties should appears as follows:&lt;BR&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_14.png" mce_href="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_14.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=195 alt=image src="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_thumb_6.png" width=244 border=0 mce_src="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_thumb_6.png"&gt;&lt;/A&gt; &lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;Configure the POP3 Adapter:&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;Mail Server = &lt;EM&gt;(The name of your mail server or local machine name if you install POP3/SMTP locally)&lt;/EM&gt;&lt;/LI&gt;
&lt;LI&gt;Authentication Scheme = &lt;STRONG&gt;Basic&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Password = &lt;EM&gt;(The password of the ProcessApplication@nuckolls.edu account or account your using to be monitored by Biztalk)I&lt;/EM&gt;&lt;/LI&gt;
&lt;LI&gt;Polling Interval = &lt;STRONG&gt;5&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Polling Interval Unit = &lt;STRONG&gt;Seconds&lt;/STRONG&gt;&lt;BR&gt;* POP3 Adapter properties should appear as follows:&lt;BR&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_16.png" mce_href="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_16.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=244 alt=image src="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_thumb_7.png" width=220 border=0 mce_src="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_thumb_7.png"&gt;&lt;/A&gt; &lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;
&lt;LI&gt;Create a new Send Port called &lt;STRONG&gt;SendEssayToWSS&lt;/STRONG&gt;&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;Type = &lt;STRONG&gt;Windows Sharepoint Services&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Send pipeline = &lt;STRONG&gt;XMLTransmit&lt;BR&gt;&lt;/STRONG&gt;* Send Port should appear as follows:&lt;BR&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_18.png" mce_href="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_18.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=196 alt=image src="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_thumb_8.png" width=244 border=0 mce_src="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_thumb_8.png"&gt;&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;Configure the WSS Adapter:&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;Adapter Web Service Port = 8088 &lt;EM&gt;(This is the port that your WSS/MOSS site listens on)&lt;/EM&gt;&lt;/LI&gt;
&lt;LI&gt;Destination Folder URL = Lists/Essays%20for%20Student%20Admission%20Applications&lt;/LI&gt;
&lt;LI&gt;Namespaces Aliases = ns0="http://TestPOP3.AdmissionApp"&lt;/LI&gt;
&lt;LI&gt;SharePoint Site URL = http://btsmoss:8088/&lt;/LI&gt;
&lt;LI&gt;Column 01 = Submitted By&lt;/LI&gt;
&lt;LI&gt;Column 01 = %XPATH=//ns0:Application/SubmittedBy%&lt;/LI&gt;
&lt;LI&gt;Column 02 = Essay Response&lt;/LI&gt;
&lt;LI&gt;Column 02 = %XPATH=//ns0:Application/EssayResponse%&lt;/LI&gt;
&lt;LI&gt;Column 03 = Application ID&lt;/LI&gt;
&lt;LI&gt;Column 03 = %XPATH=//ns0:Application/StudentID%&lt;/LI&gt;
&lt;LI&gt;Column 04 = Date Submitted&lt;/LI&gt;
&lt;LI&gt;Column 04 = %XPATH=//ns0:Application/AppDate%&lt;BR&gt;* The WSS Adapter properties should appear as follows:&lt;BR&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_20.png" mce_href="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_20.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=244 alt=image src="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_thumb_9.png" width=216 border=0 mce_src="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_thumb_9.png"&gt;&lt;/A&gt; &lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;
&lt;LI&gt;Configure the Orchestration Bindings&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;In the Orchestrations folder under TestPOP3 in the Biztalk Server Administration console...&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;Double-click &lt;STRONG&gt;TestPOP3.EmailProcess&lt;/STRONG&gt; and select Bindings in the properties window&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;Host = &lt;STRONG&gt;BiztalkServerApplication&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Port_In/Receive Ports = &lt;STRONG&gt;ReceivePOP3&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Port_Out/Send Ports = &lt;STRONG&gt;SendEssayToWSS&lt;BR&gt;&lt;/STRONG&gt;* The Orchestration Binding properties should appear as follows:&lt;BR&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_22.png" mce_href="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_22.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=196 alt=image src="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_thumb_10.png" width=244 border=0 mce_src="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_thumb_10.png"&gt;&lt;/A&gt; &lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Run and Test your Application:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Finally we are ready to test our application...&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Right-click on TestPOP3 in the Biztalk Server Administration console and select Start&lt;/LI&gt;
&lt;LI&gt;Click Start&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;U&gt;Open your email client (Outlook or Outlook Express):&lt;/U&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Create an email&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;To = &lt;STRONG&gt;ProcessApplication@nuckolls.edu&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Subject = &lt;STRONG&gt;Application9959&lt;/STRONG&gt; (You can use any # following "Application"... ie: Application1234567890, recall our Orchestation parses out the first 11 characters of the Subject line, to return only the Application ID that follows... &lt;EM&gt;or StudentID as it is referred to in the schema&lt;/EM&gt;)&lt;/LI&gt;
&lt;LI&gt;Body = &lt;EM&gt;(Type in some essay response text here to be submitted as part of the admissions process.)&lt;/EM&gt;&lt;BR&gt;* Your email should appear as follows:&lt;BR&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_24.png" mce_href="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_24.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=201 alt=image src="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_thumb_11.png" width=244 border=0 mce_src="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_thumb_11.png"&gt;&lt;/A&gt; &lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;Click Send&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;U&gt;Confirm the message was sent to Sharepoint:&lt;/U&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Open up your Sharepoint site to the custom List we created earlier (ie. http://btsmoss:8088/Lists/Essays%20for%20Student%20Admission%20Applications)&lt;BR&gt;* You should see the message appear in the "Essays for Student Admission Applications" List as follows:&lt;BR&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_26.png" mce_href="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_26.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=184 alt=image src="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_thumb_12.png" width=244 border=0 mce_src="http://blogs.msdn.com/blogfiles/jeff/WindowsLiveWriter/BiztalkPOP3AdapterandWSSAdapterExample_BB47/image_thumb_12.png"&gt;&lt;/A&gt; &lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hopefully this was helpful and will save some time!&amp;nbsp; :-)&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8361354" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/jeff/archive/tags/Biztalk/default.aspx">Biztalk</category></item><item><title>Biztalk Adapter for SQL - Issues/Resolutions</title><link>http://blogs.msdn.com/jeff/archive/2008/03/31/biztalk-adapter-for-sql-issues-resolutions.aspx</link><pubDate>Tue, 01 Apr 2008 03:05:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8348080</guid><dc:creator>jeffnuck</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/jeff/comments/8348080.aspx</comments><wfw:commentRss>http://blogs.msdn.com/jeff/commentrss.aspx?PostID=8348080</wfw:commentRss><description>&lt;P&gt;Two things that you might encounter while you are attempting to create your schema for your SQL Adapter using the "SQL Transport Schema Generation Wizard":&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;One thing that seems to be a common problem, is the &lt;STRONG&gt;SQL Transport Schema Generation Wizard&amp;nbsp;diappears or closes unexpectedly&lt;/STRONG&gt; right after you have entered your Stored Procedure script or manually added your SQL script and click 'Next'.&amp;nbsp; &lt;A class="" href="http://support.microsoft.com/kb/917847" target=_blank mce_href="http://support.microsoft.com/kb/917847"&gt;This KB article&lt;/A&gt; speaks to this known issue and how to resolve it, but it might also be because you have been developing/running other local applications that are holding a connection and/or reading/writing to this table otherwise locking it out.&amp;nbsp; In this case you could try closing any other open apps (including VStudio) that may be attached to this database.&amp;nbsp; You might also restart the SQL Service for good measure.&lt;/LI&gt;
&lt;LI&gt;The other issue you may encounter when using the&amp;nbsp;&lt;STRONG&gt;SQL Transport Schema Generation Wizard &lt;/STRONG&gt;(perhaps after you've resolved the first issue) is an error message &lt;STRONG&gt;"Failed to execute SQL Statement. Please ensure that the supplied syntax is correct.".&amp;nbsp; &lt;/STRONG&gt;Again this error is referenced in the &lt;A class="" href="http://support.microsoft.com/kb/917847" target=_blank mce_href="http://support.microsoft.com/kb/917847"&gt;KB article&lt;/A&gt; mentioned above, but there are a couple additional&amp;nbsp;ways to resolve this...&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;Be sure that if your database only accepts Windows authentication only, that you didn't select the 'Use a specific user name and password' on the Data Link Properties pane, instead select 'Use Windows NT Integrated security'.&lt;/LI&gt;
&lt;LI&gt;Check the SQL itself and reference this article "&lt;A class="" href="http://technet.microsoft.com/en-us/library/ms935658.aspx" target=_blank mce_href="http://technet.microsoft.com/en-us/library/ms935658.aspx"&gt;Working with the Biztalk Adapter for SQL&lt;/A&gt;" for some tips.&amp;nbsp; I resolved this issue be appends ELEMENTS at the end of my stored procedure as in the following example:&lt;/LI&gt;&lt;/UL&gt;&lt;/OL&gt;
&lt;P&gt;CREATE PROCEDURE SP_GetNewStudentInfo&lt;BR&gt;AS&lt;BR&gt;DECLARE @Process_Date DateTime&lt;BR&gt;SET @Process_Date=GetDate()&lt;BR&gt;Update StudentInfo Set ProcessedDate=@Process_Date Where ProcessedDate is NULL&lt;BR&gt;SELECT StudentID, Lastname, Firstname, Term, GPA, DateofAdmission FROM StudentInfo WHERE &lt;A href="mailto:ProcessedDate=@Process_Date"&gt;ProcessedDate=@Process_Date&lt;/A&gt; FOR XML AUTO, ELEMENTS&lt;BR&gt;GO&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;NOTE&lt;/STRONG&gt;:&amp;nbsp; If you add&amp;nbsp;"ELEMENTS" to the Stored Proc as&amp;nbsp;I did here, it will&amp;nbsp;create the schema representing&amp;nbsp;each column as a "Record" node... if you remove "ELEMENTS" it will create the schema representing each column as an "Attribute" node (which may be best if you plan on promoting any of those columns for routing purposes or to inspect&amp;nbsp;their values within an Orchestration).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8348080" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/jeff/archive/tags/Biztalk/default.aspx">Biztalk</category></item><item><title>Issue when attempting to deploy a Biztalk 2006 assembly from Visual Studio 2005</title><link>http://blogs.msdn.com/jeff/archive/2006/09/18/issue-when-attempting-to-deploy-a-biztalk-2006-assembly-from-visual-studio-2005.aspx</link><pubDate>Tue, 19 Sep 2006 05:21:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:761454</guid><dc:creator>jeffnuck</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/jeff/comments/761454.aspx</comments><wfw:commentRss>http://blogs.msdn.com/jeff/commentrss.aspx?PostID=761454</wfw:commentRss><description>&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;While attempting to deploy a very simple BizTalk Server 2006 (Beta 3 bits)&amp;nbsp;application from my (Windows XP SP2) development machine running VSTS 2005 to my (Windows 2003 SP1)&amp;nbsp;BizTalk 2006/SQL 2005 server, I received several MSDTC errors such as:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;MSDTC may not be configured correctly --or-- Access Denied --or--&amp;nbsp;Failed to add resource (Luid="System.BizTalk:BizTalkAssembly", Type="MyBizTalkProject, version=1.0.0.0,....). Cannot open database BizTalkMgmtDb on server MyBizTalkServer. etc... &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;&lt;STRONG&gt;To resolve this issue...&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;&lt;STRONG&gt;&lt;U&gt;First&lt;/U&gt;&lt;/STRONG&gt; I made sure I could ping both&amp;nbsp;server--&amp;gt;dev machine and dev machine--&amp;gt;server with their NetBios names to that was working.&amp;nbsp; (If that doesn't work you may have to your ICMP setting are set to allow ping requests and also "Enable NetBios over TCP/IP" via your&amp;nbsp;Network adapter's TCP/IP Properties/Advance (button)/WIN (tab).&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;&lt;STRONG&gt;&lt;U&gt;Second&lt;/U&gt;&lt;/STRONG&gt; I ensured that&amp;nbsp;both the (biztalk and sql) server and (vsts) developer machine had all the appropriate MSDTC settings as follows: &lt;/FONT&gt;&lt;/P&gt;&lt;FONT face=Tahoma size=2&gt;
&lt;P xmlns=""&gt;&lt;B&gt;To enable DTC access for Windows Server 2003 with SP1 or Windows XP with SP2, do the following:&lt;/B&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;DIV xmlns=""&gt;From the &lt;B&gt;Start&lt;/B&gt; menu, click &lt;B&gt;Control Panel&lt;/B&gt;, double-click &lt;B&gt;Administrative Tools&lt;/B&gt;, and then double-click &lt;B&gt;Component Services&lt;/B&gt;. &lt;/DIV&gt;
&lt;LI&gt;Expand &lt;B&gt;Component Services&lt;/B&gt;, and then expand &lt;B&gt;Computers&lt;/B&gt;. 
&lt;LI&gt;Right-click the computer you need to set, and then select &lt;B&gt;Properties&lt;/B&gt;. 
&lt;LI&gt;In the &lt;B&gt;Properties&lt;/B&gt; window, select the &lt;B&gt;MSDTC&lt;/B&gt; tab. 
&lt;LI&gt;In the &lt;B&gt;Transaction Configuration&lt;/B&gt; area, click &lt;B&gt;Security Configuration&lt;/B&gt;. 
&lt;LI&gt;In the &lt;B&gt;Security Settings&lt;/B&gt; area, select the &lt;B&gt;Network DTC Access&lt;/B&gt; check box. 
&lt;LI&gt;In the &lt;B&gt;Transaction Manager Communication&lt;/B&gt; area, select the &lt;B&gt;Allow Inbound&lt;/B&gt; and the &lt;B&gt;Allow Outbound&lt;/B&gt; check boxes. 
&lt;LI&gt;Click &lt;B&gt;OK&lt;/B&gt; to close each open dialog box. 
&lt;LI&gt;Restart your computer to enable the remote DTC option.&lt;/LI&gt;&lt;/OL&gt;
&lt;P xmlns=""&gt;&lt;B&gt;To enable DTC access for Windows Server 2003 without SP1, do the following:&lt;/B&gt;&lt;/P&gt;
&lt;OL xmlns=""&gt;
&lt;LI&gt;From the &lt;B&gt;Start&lt;/B&gt; menu, double-click &lt;B&gt;Control Panel&lt;/B&gt;, double-click &lt;B&gt;Administrative Tools&lt;/B&gt;, and then double-click &lt;B&gt;Component Services&lt;/B&gt;. 
&lt;LI&gt;Expand &lt;B&gt;Component Services&lt;/B&gt;, and then expand &lt;B&gt;Computers&lt;/B&gt;. 
&lt;LI&gt;Right-click the computer you need to set, and then select &lt;B&gt;Properties&lt;/B&gt;. 
&lt;LI&gt;In the &lt;B&gt;Properties&lt;/B&gt; window, select the &lt;B&gt;MSDTC&lt;/B&gt; tab. 
&lt;LI&gt;In the &lt;B&gt;Transaction Configuration&lt;/B&gt; area, click &lt;B&gt;Security Configuration&lt;/B&gt;. 
&lt;LI&gt;In the &lt;B&gt;Security Settings&lt;/B&gt; area, select the &lt;B&gt;Network DTC Access&lt;/B&gt; check box. 
&lt;LI&gt;In the &lt;B&gt;Security Settings&lt;/B&gt; area, select the &lt;B&gt;Network Transactions&lt;/B&gt; and &lt;B&gt;Network Clients&lt;/B&gt; check box. 
&lt;LI&gt;Ensure &lt;B&gt;Allow Remote Clients&lt;/B&gt; is selected, and ensure &lt;B&gt;No Authentication Required&lt;/B&gt; is selected. 
&lt;LI&gt;Click &lt;B&gt;OK&lt;/B&gt; to close each open dialog box. 
&lt;LI&gt;Restart your computer to enable the remote DTC option.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;When I completed this task, my MSDTC errors were still not resolved and could not deploy the BizTalk assembly, so I attempted to test my DTC connections from both the server and developer machine using DTCPing.exe which did little but reconfirm that I was have Access Denied and DTC binding issues.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Finally&lt;/U&gt;&lt;/STRONG&gt; After playing around with disabling my firewall and antivirus (which&amp;nbsp;worked, but temporarily left my computer vulnerable), I completed the following steps to get everything working:&lt;/P&gt;
&lt;P&gt;Configure Windows Firewall to include the MSDTC program and to include port 135 as an exception. To do this, follow these steps: &lt;/P&gt;
&lt;P&gt;Configure Windows Firewall to include the MSDTC program and to include port 135 as an exception. To do this, follow these steps: 
&lt;TABLE class="list al" class="list al"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class=number class="number"&gt;&lt;FONT size=2&gt;a. &lt;/FONT&gt;&lt;/TD&gt;
&lt;TD class=text class="text"&gt;&lt;FONT size=2&gt;Click &lt;STRONG class=uiterm&gt;Start&lt;/STRONG&gt;, and then click &lt;STRONG class=uiterm&gt;Run&lt;/STRONG&gt;. &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=number class="number"&gt;&lt;FONT size=2&gt;b. &lt;/FONT&gt;&lt;/TD&gt;
&lt;TD class=text class="text"&gt;&lt;FONT size=2&gt;In the &lt;B&gt;Run&lt;/B&gt; dialog box, type &lt;SPAN class=userInput&gt;Firewall.cpl&lt;/SPAN&gt;, and then click OK. &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=number class="number"&gt;&lt;FONT size=2&gt;c. &lt;/FONT&gt;&lt;/TD&gt;
&lt;TD class=text class="text"&gt;&lt;FONT size=2&gt;In &lt;STRONG class=uiterm&gt;Control Panel&lt;/STRONG&gt;, double-click &lt;STRONG class=uiterm&gt;Windows Firewall&lt;/STRONG&gt;. &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=number class="number"&gt;&lt;FONT size=2&gt;d. &lt;/FONT&gt;&lt;/TD&gt;
&lt;TD class=text class="text"&gt;&lt;FONT size=2&gt;In the &lt;STRONG class=uiterm&gt;Windows Firewall&lt;/STRONG&gt; dialog box, click &lt;STRONG class=uiterm&gt;Add Program&lt;/STRONG&gt; on the &lt;STRONG class=uiterm&gt;Exceptions&lt;/STRONG&gt; tab. &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=number class="number"&gt;&lt;FONT size=2&gt;e. &lt;/FONT&gt;&lt;/TD&gt;
&lt;TD class=text class="text"&gt;&lt;FONT size=2&gt;In the &lt;STRONG class=uiterm&gt;Add a Program&lt;/STRONG&gt; dialog box, click &lt;STRONG class=uiterm&gt;Browse&lt;/STRONG&gt;, and then locate the Msdtc.exe file. By default, the file is stored in the &lt;B&gt;&lt;VAR&gt;Installation drive&lt;/VAR&gt;:\Windows\System32&lt;/B&gt; folder. &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=number class="number"&gt;&lt;FONT size=2&gt;f. &lt;/FONT&gt;&lt;/TD&gt;
&lt;TD class=text class="text"&gt;&lt;FONT size=2&gt;In the &lt;STRONG class=uiterm&gt;Add a Program&lt;/STRONG&gt; dialog box, click &lt;STRONG class=uiterm&gt;OK&lt;/STRONG&gt;. &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=number class="number"&gt;&lt;FONT size=2&gt;g. &lt;/FONT&gt;&lt;/TD&gt;
&lt;TD class=text class="text"&gt;&lt;FONT size=2&gt;In the &lt;STRONG class=uiterm&gt;Windows Firewall&lt;/STRONG&gt; dialog box, click to select the &lt;STRONG class=uiterm&gt;msdtc&lt;/STRONG&gt; option in the &lt;STRONG class=uiterm&gt;Programs and Services&lt;/STRONG&gt; list. &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=number class="number"&gt;&lt;FONT size=2&gt;h. &lt;/FONT&gt;&lt;/TD&gt;
&lt;TD class=text class="text"&gt;&lt;FONT size=2&gt;Click &lt;STRONG class=uiterm&gt;Add Port&lt;/STRONG&gt; on the &lt;STRONG class=uiterm&gt;Exceptions&lt;/STRONG&gt; tab. &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=number class="number"&gt;&lt;FONT size=2&gt;i. &lt;/FONT&gt;&lt;/TD&gt;
&lt;TD class=text class="text"&gt;&lt;FONT size=2&gt;In the &lt;STRONG class=uiterm&gt;Add a Port&lt;/STRONG&gt; dialog box, type &lt;SPAN class=userInput&gt;135&lt;/SPAN&gt; in the &lt;STRONG class=uiterm&gt;Port number&lt;/STRONG&gt; text box, and then click to select the &lt;STRONG class=uiterm&gt;TCP&lt;/STRONG&gt; option. &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=number class="number"&gt;&lt;FONT size=2&gt;j. &lt;/FONT&gt;&lt;/TD&gt;
&lt;TD class=text class="text"&gt;&lt;FONT size=2&gt;In the &lt;STRONG class=uiterm&gt;Add a Port&lt;/STRONG&gt; dialog box, type a name for the exception in the &lt;STRONG class=uiterm&gt;Name&lt;/STRONG&gt; text box, and then click &lt;STRONG class=uiterm&gt;OK&lt;/STRONG&gt;. &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=number class="number"&gt;&lt;FONT size=2&gt;k. &lt;/FONT&gt;&lt;/TD&gt;
&lt;TD class=text class="text"&gt;&lt;FONT size=2&gt;In the &lt;STRONG class=uiterm&gt;Windows Firewall&lt;/STRONG&gt; dialog box, select the name that you used for the exception in step j in the &lt;STRONG class=uiterm&gt;Programs and Services&lt;/STRONG&gt; list, and then click &lt;STRONG class=uiterm&gt;OK&lt;/STRONG&gt;.&lt;/FONT&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT face=Tahoma color=#008000 size=2&gt;&lt;STRONG&gt;This worked and I was able to successfully deploy my BizTalk application!!!&lt;/STRONG&gt;&lt;/FONT&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=761454" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/jeff/archive/tags/Biztalk/default.aspx">Biztalk</category></item></channel></rss>