<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Awai, delivery guy</title>
        <link>http://geekswithblogs.net/socasanta/Default.aspx</link>
        <description>1 hour for cheese, 1 hour for supreme.  What the heck?</description>
        <language>en-US</language>
        <copyright>Michael Awai</copyright>
        <managingEditor>Nospamsocasanta@nc.rr.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <image>
            <title>Awai, delivery guy</title>
            <url>http://geekswithblogs.net/images/RSS2Image.gif</url>
            <link>http://geekswithblogs.net/socasanta/Default.aspx</link>
            <width>77</width>
            <height>60</height>
        </image>
        <item>
            <title>Uploading files to WSS 3.0 document libraries using HTTP PUT and Lists.asmx</title>
            <category>SharePoint 2007</category>
            <category>Web Services</category>
            <link>http://geekswithblogs.net/socasanta/archive/2007/07/09/113809.aspx</link>
            <description>&lt;p&gt;
Uploading a file to a Windows SharePoint Services 3.0 document library from external applications can be done in 2 steps using a combination of HTTP PUT and the Lists Web service. 
	
&lt;/p&gt;
&lt;p&gt;
Firstly, for the HTTP PUT side of things, check out:
&lt;a href="http://blogs.msdn.com/rohitpuri/archive/2007/04/10/upload-download-file-to-from-wss-document-library-using-dav.aspx"&gt;
http://blogs.msdn.com/rohitpuri/archive/2007/04/10/upload-download-file-to-from-wss-document-library-using-dav.aspx&lt;/a&gt; 
.  In the code to follow, I use a variation of Rohit's helper class that 
takes a byte[].&lt;/p&gt;
&lt;p&gt;
Secondly, use the Lists Web service UpdateListItems() method to do the update.  
But how do we get the ID from the HTTP PUT?  Turns out you don't need it.  
Providing the FileRef field is enough.  For example, if you uploaded the 
file to &lt;a href="http://mycompany/hr/Documents/bonus.xls"&gt;http://mycompany/hr/Documents/bonus.xls&lt;/a&gt;, 
that's exactly what you'd put in FileRef, as shown below.&lt;/p&gt;
&lt;pre&gt;        public static string UploadFile(string url, string listName, byte[] document, 
                               List&amp;lt;KeyValuePair&amp;lt;string, object&amp;gt;&amp;gt; fileProperties)
        {
            string s = DAVHelper.UploadFile(url, document);
            if(s != "success")
                throw new Exception("File upload to: " + url + " failed.");

            // Update the attributes
            string updateRes = UpdateFileAttributes(url, listName, fileProperties);
            return updateRes;
	}

&lt;/pre&gt;
&lt;pre&gt;        public static string UpdateFileAttributes(string fileUrl, string listName, 
                                List&amp;lt;KeyValuePair&amp;lt;string, object&amp;gt;&amp;gt; fileProperties)
        {
            WssLists.ListsSoapClient listService 
                = new WssLists.ListsSoapClient("ListsSoap");
            listService.ClientCredentials.Windows.AllowedImpersonationLevel 
                = System.Security.Principal.TokenImpersonationLevel.Delegation;

            // Note that when building the Method fields, the field named ID
            // is required, although in this case we can and will leave it empty.
	    // (Concatenated empty string is just for visuals ;)
            StringBuilder sb = new StringBuilder();
            sb.Append("&amp;lt;Method ID='1' Cmd='Update'&amp;gt;");
            sb.Append("  &amp;lt;Field Name='ID'/&amp;gt;" + "" + "&amp;lt;/Field&amp;gt;");
            sb.Append("  &amp;lt;Field Name='FileRef'&amp;gt;" + fileUrl + "&amp;lt;/Field&amp;gt;");

	    // This is what the loop is basically doing:
            // sb.Append("  &amp;lt;Field Name='CustomColumn1'&amp;gt;" + "Some value" + "&amp;lt;/Field&amp;gt;");
            for (int i = 0; i &amp;lt; fileProperties.Count; i++)
            {
                sb.Append("  &amp;lt;Field Name='" + fileProperties[i].Key + "'&amp;gt;" + 
                           Convert.ToString(fileProperties[i].Value) + "&amp;lt;/Field&amp;gt;");
            }

            sb.Append("&amp;lt;/Method&amp;gt;");

            XmlDocument xmlDoc = new System.Xml.XmlDocument();
            System.Xml.XmlElement elBatch = xmlDoc.CreateElement("Batch");

            elBatch.SetAttribute("OnError", "Continue");
            elBatch.SetAttribute("PreCalc", "TRUE"); 
            elBatch.SetAttribute("ListVersion", "0"); 

            elBatch.InnerXml = sb.ToString();

	    // Do the update
            XmlNode ndReturn = listService.UpdateListItems(listName, elBatch);

            return ndReturn.OuterXml;
        }&lt;/pre&gt;
&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=113809"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=113809" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/socasanta/aggbug/113809.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Michael Awai</dc:creator>
            <guid>http://geekswithblogs.net/socasanta/archive/2007/07/09/113809.aspx</guid>
            <pubDate>Tue, 10 Jul 2007 00:09:34 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/socasanta/comments/113809.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/socasanta/archive/2007/07/09/113809.aspx#feedback</comments>
            <slash:comments>4</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/socasanta/comments/commentRss/113809.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/socasanta/services/trackbacks/113809.aspx</trackback:ping>
        </item>
        <item>
            <title>Calling WSS 3.0 Web Services from WCF clients</title>
            <category>SharePoint 2007</category>
            <category>Web Services</category>
            <link>http://geekswithblogs.net/socasanta/archive/2007/07/06/113725.aspx</link>
            <description>&lt;p&gt;Having just gone through this, I thought I'd share the basic procedure when calling WSS 3.0 Web services such as lists.asmx and views.asmx from a WCF client.  As you may know, the exceptions returned by the WSS Web services are terse.  Hopefully, this post will help someone trying to avoid those in their own project.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 1 - Add a Service Reference to the WCF service you want to call (Duh)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Note that I included the "?wsdl".  If you don't VS will be redirected to /_vti_bin/Lists.asmx.  That doesn't matter from a service client code generation standpoint, just that the WCF endpoint addresses in App.config will need to be changed as they'll be pointing to the wrong URL, and none of the lists and other objects in your site will be found by the Web services.    &lt;/p&gt;
&lt;p&gt;&lt;img height="216" alt="" width="530" src="/images/geekswithblogs_net/socasanta/AddReference(1).JPG" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 2 - Modify the App.Config file to change the security binding configuration used by the client&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In the basicHttpBinding section, replace:&lt;/p&gt;
&lt;p class="style1"&gt;&amp;lt;security mode="None"&amp;gt; &lt;br /&gt;
    &amp;lt;transport clientCredentialType="None" &lt;br /&gt;
               proxyCredentialType="None" realm="" /&amp;gt; &lt;br /&gt;
    &amp;lt;message clientCredentialType="UserName" algorithmSuite="Default" /&amp;gt; &lt;br /&gt;
&amp;lt;/security&amp;gt; &lt;/p&gt;
&lt;p&gt;With:&lt;/p&gt;
&lt;p class="style1"&gt;&amp;lt;security mode="TransportCredentialOnly"&amp;gt; &lt;br /&gt;
    &amp;lt;transport clientCredentialType="Ntlm" /&amp;gt; &lt;br /&gt;
&amp;lt;/security&amp;gt; &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 3 - Allow the Web service to impersonate the user&lt;/strong&gt;&lt;/p&gt;
&lt;p class="style2"&gt;WssList.ListsSoapClient listService = new WssList.ListsSoapClient("ListsSoap"); &lt;br /&gt;
listService.ClientCredentials.Windows.AllowedImpersonationLevel &lt;br /&gt;
    = System.Security.Principal.TokenImpersonationLevel.Delegation; &lt;br /&gt;
&lt;br /&gt;
XmlElement elem = listService.GetListCollection(); &lt;/p&gt;
&lt;p class="style2"&gt; &lt;/p&gt;
&lt;p class="style2"&gt;End transmission... &lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=113725"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=113725" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/socasanta/aggbug/113725.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Michael Awai</dc:creator>
            <guid>http://geekswithblogs.net/socasanta/archive/2007/07/06/113725.aspx</guid>
            <pubDate>Fri, 06 Jul 2007 14:47:39 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/socasanta/comments/113725.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/socasanta/archive/2007/07/06/113725.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/socasanta/comments/commentRss/113725.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/socasanta/services/trackbacks/113725.aspx</trackback:ping>
        </item>
        <item>
            <title>Generate a Sample Instance for any Public, XML Serializable .NET Class Using BizTalk's Instance Generation API</title>
            <category>BizTalk Server</category>
            <link>http://geekswithblogs.net/socasanta/archive/2005/11/07/59353.aspx</link>
            <description>&lt;P&gt;The following code is for quick and dirty command line program that generates an XML instance from an XML-serializable .NET class.&amp;nbsp; It uses BizTalk 2004's instance generation capabilities, so if you happen to find that useful, this code allows you to use it with .NET classes.&amp;nbsp; For example, let's say you have a complex configuration class ServiceConfiguration in assembly c:\whatever\TheSystem.Configuration.dll, and you compile the code below to btsi.exe, the following command will generate a sample instance:&lt;/P&gt;
&lt;P&gt;btsi.exe &amp;#8220;c:\whatever\TheSystem.Configuration.dll&amp;#8221; ServiceConfiguration &amp;#8220;c:\whatever\ServiceConfigurationSample.xml&amp;#8221;&lt;/P&gt;
&lt;P&gt;Here's the code.&amp;nbsp; Just paste it into a console app's default class, add a reference to:&lt;BR&gt;{BizTalkInstallPath}\Developer Tools\Microsoft.BizTalk.TOM.dll &lt;BR&gt;and build.&lt;BR&gt;&lt;BR&gt;It's attrociously commented, but then again, painlessly simple:&lt;BR&gt;&lt;BR&gt;&lt;FONT face="Courier New" color=#000080 size=2&gt;using System;&lt;BR&gt;using System.IO;&lt;BR&gt;using System.Reflection;&lt;BR&gt;using System.Text;&lt;BR&gt;using System.Xml.Serialization;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#000080 size=2&gt;using Microsoft.BizTalk.TOM;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#000080 size=2&gt;namespace btsi&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;/// &lt;SUMMARY&gt;&lt;BR&gt;&amp;nbsp;/// Console application that generates a sample XML instance for a user&lt;BR&gt;&amp;nbsp;/// supplied .NET type.&amp;nbsp; See usage for details.&lt;BR&gt;&amp;nbsp;/// &lt;/SUMMARY&gt;&lt;BR&gt;&amp;nbsp;class Program&lt;BR&gt;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &lt;SUMMARY&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// The main entry point for the application.&lt;BR&gt;&amp;nbsp;&amp;nbsp;/// &lt;/SUMMARY&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;[STAThread]&lt;BR&gt;&amp;nbsp;&amp;nbsp;static void Main(string[] args)&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Check args&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(args.Length &amp;lt; 3)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PrintUsage();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.Environment.Exit(1);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#000080 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Gather args&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;string sourceAssembly = args[0];&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;string typeName = args[1];&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;string outFile = args[2];&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#000080 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Get schema&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;string schema = GetSchemaFromType(sourceAssembly, typeName);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Console.WriteLine(schema);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#000080 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Write instance&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;CreateXmlInstance(schema, outFile);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#000080 size=2&gt;&amp;nbsp;&amp;nbsp;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#000080 size=2&gt;&amp;nbsp;&amp;nbsp;private static void PrintUsage()&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.Console.WriteLine("Usage: {0} sourceAssembly typeName instanceFilename", Path.GetFileName(System.Reflection.Assembly.GetExecutingAssembly().Location));&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#000080 size=2&gt;&amp;nbsp;&amp;nbsp;private static string GetSchemaFromType(string file, string typeName)&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;XmlReflectionImporter importer = new XmlReflectionImporter();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;XmlSchemas schemas = new XmlSchemas();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;XmlSchemaExporter exporter = new XmlSchemaExporter(schemas);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#000080 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Enumerate the types, looking for the requested one&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Assembly assem = Assembly.LoadFrom(file);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Type[] allTypes = assem.GetTypes();&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#000080 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;for(int i = 0; i &amp;lt; allTypes.Length; i++)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Type t = allTypes[i];&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(t.IsPublic &amp;amp;&amp;amp; !t.IsInterface)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (t.FullName == typeName || t.Name == typeName)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;XmlTypeMapping xtm = importer.ImportTypeMapping(t);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;exporter.ExportTypeMapping(xtm);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#000080 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;StringBuilder sb = new StringBuilder();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(schemas.Count &amp;gt; 0)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;StringWriter sw = new StringWriter(sb);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;schemas[0].Write(sw);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sw.Close();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#000080 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return sb.ToString();&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#000080 size=2&gt;&amp;nbsp;&amp;nbsp;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#000080 size=2&gt;&amp;nbsp;&amp;nbsp;private static void CreateXmlInstance(string schema, string outFile)&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;string errorString = "";&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#000080 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Load the schema&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Microsoft.BizTalk.TOM.CEditorSchemaTree edTree = new CEditorSchemaTree();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;edTree.LoadFromString(schema, "", out errorString);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;edTree.DetermineDisplayRootReferenceOfSchema();&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#000080 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;InstanceGenerationOptions igo = new InstanceGenerationOptions();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;igo.CycleExpansionDepth = 0;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;igo.MaxNodeCount = 0;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;igo.UseNativeExtension = false;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;ITOMErrorInfo[] errors = null; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#000080 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Write the instance&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;edTree.CreateXMLInstance(outFile, igo, out errors);&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;}&lt;BR&gt;}&lt;BR&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=59353"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=59353" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/socasanta/aggbug/59353.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Michael Awai</dc:creator>
            <guid>http://geekswithblogs.net/socasanta/archive/2005/11/07/59353.aspx</guid>
            <pubDate>Mon, 07 Nov 2005 16:50:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/socasanta/comments/59353.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/socasanta/archive/2005/11/07/59353.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/socasanta/comments/commentRss/59353.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/socasanta/services/trackbacks/59353.aspx</trackback:ping>
        </item>
        <item>
            <title>Connected Services Framework 2.5 Scenario: You change your service's WSDL, recompile, bounce IIS and your Session still doesn't recognize your soapAction!</title>
            <category>Web Services</category>
            <link>http://geekswithblogs.net/socasanta/archive/2006/02/17/69929.aspx</link>
            <description>&lt;FONT face=Tahoma&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Verdana size=2&gt;In CSF 2.5 the Session.config setting &lt;FONT face="Courier New"&gt;&lt;STRONG&gt;ParticipantConfiguration/ProxyCacheDirectoryPath&lt;/STRONG&gt;&lt;/FONT&gt; is used to specify the directory for the WSDL cache used by CSF when Sessions are created.&amp;nbsp; &lt;/FONT&gt;&lt;FONT face=Verdana size=2&gt;If you're a developer intent on implementing a particular service contract, forgetting about this cache might cost you a couple of hours of frustration.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Verdana size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Verdana size=2&gt;Let's say I build a service at &lt;FONT face="Courier New" color=#0000ff&gt;&lt;STRONG&gt;http://MyMachine/MyVdir/sl.ashx&lt;/STRONG&gt;&lt;/FONT&gt; implementing SOAP action &lt;FONT face="Courier New" color=#0000ff&gt;&lt;STRONG&gt;MyAction&lt;/STRONG&gt;&lt;/FONT&gt;.&amp;nbsp;I then try to create a Session in which the service is a participant, but unfortunately, the Session expects my service to have&amp;nbsp;SOAP action&amp;nbsp;&lt;FONT face="Courier New" color=#0000ff&gt;&lt;STRONG&gt;http://MyCompany/MyAction&lt;/STRONG&gt;&lt;/FONT&gt;.&amp;nbsp; CSF will create&amp;nbsp;a cache file consisting of the URI as the top line, and the first draft WSDL as the remainder of the file.&amp;nbsp; Until the cache expires (and the default is 24 hours), nothing done to fix the action will work; not building, not bouncing IIS, etc. Until you delete the cached WSDL or it expires,&amp;nbsp;CSF will find the file based on the URI, and use the WSDL from it.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;FONT face=Verdana size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Verdana size=2&gt;Relevant Session.config settings:&lt;/FONT&gt;&lt;/P&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size=2&gt;ParticipantConfiguration/ProxyCacheDirectoryPath&lt;/FONT&gt;&lt;/STRONG&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Verdana size=2&gt;&lt;STRONG&gt;&lt;FONT face="Courier New"&gt;ParticipantConfiguration/ProxyCacheFileExpirationTime&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Verdana size=2&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Verdana size=2&gt;Default cache directories in CSF 2.5:&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=code style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face=Verdana&gt;Developer Edition: &lt;/FONT&gt;C:\Program Files\Microsoft CSF\CSFDeveloper\Temp\&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New"&gt;&lt;?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /&gt;&lt;st1:place w:st="on"&gt;&lt;st1:State w:st="on"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Verdana size=2&gt;Standard edition:&lt;/FONT&gt;&amp;nbsp;&lt;/st1:State&gt;&lt;/st1:place&gt;C:\csf\session\participant\cache\*.*&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=69929"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=69929" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/socasanta/aggbug/69929.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Michael Awai</dc:creator>
            <guid>http://geekswithblogs.net/socasanta/archive/2006/02/17/69929.aspx</guid>
            <pubDate>Sat, 18 Feb 2006 01:52:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/socasanta/comments/69929.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/socasanta/archive/2006/02/17/69929.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/socasanta/comments/commentRss/69929.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/socasanta/services/trackbacks/69929.aspx</trackback:ping>
        </item>
        <item>
            <title>BizTalk 2004, BTSNTSvc.exe, Unable to Attach to Process</title>
            <category>BizTalk Server</category>
            <link>http://geekswithblogs.net/socasanta/archive/2006/04/05/74445.aspx</link>
            <description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;If you get “Unable to Attach to Process” inside Visual Studio 2003 when trying to attach to a BTSNTSvc.exe process for CLR type debugging, if .NET Framework 2.0 is installed on the machine, add the following to BTSNTSvc.exe.config:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT size=3&gt;&amp;lt;startup&amp;gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT size=3&gt;&amp;lt;requiredRuntime version="v1.1.4322" /&amp;gt;&lt;BR&gt;&amp;lt;/startup&amp;gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I know I've seen this posted somewhere before, but had a hard time tracking it down again.&amp;nbsp; ...means one more posting is needed IMO.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT face=Verdana&gt;Later!&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=74445"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=74445" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/socasanta/aggbug/74445.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Michael Awai</dc:creator>
            <guid>http://geekswithblogs.net/socasanta/archive/2006/04/05/74445.aspx</guid>
            <pubDate>Thu, 06 Apr 2006 00:40:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/socasanta/comments/74445.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/socasanta/archive/2006/04/05/74445.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/socasanta/comments/commentRss/74445.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/socasanta/services/trackbacks/74445.aspx</trackback:ping>
        </item>
    </channel>
</rss>