<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Alonso Robles &#187; caml</title>
	<atom:link href="http://alonsorobles.com/tag/caml/feed/" rel="self" type="application/rss+xml" />
	<link>http://alonsorobles.com</link>
	<description>technology, academia, and other tidbits from the trenches of a boggled mind</description>
	<lastBuildDate>Wed, 18 Apr 2012 02:48:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Two SharePoint 2010 Webinars for Developers</title>
		<link>http://alonsorobles.com/2011/01/26/two-sharepoint-2010-webinars-for-developers/</link>
		<comments>http://alonsorobles.com/2011/01/26/two-sharepoint-2010-webinars-for-developers/#comments</comments>
		<pubDate>Wed, 26 Jan 2011 07:00:30 +0000</pubDate>
		<dc:creator>Alonso Robles</dc:creator>
				<category><![CDATA[.NET Development]]></category>
		<category><![CDATA[Microsoft Office]]></category>
		<category><![CDATA[Sharepoint Server]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Windows Sharepoint Services]]></category>
		<category><![CDATA[caml]]></category>
		<category><![CDATA[client object model]]></category>
		<category><![CDATA[data access]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[linq 2 sharepoint]]></category>
		<category><![CDATA[odata]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[sharepoint 2010]]></category>
		<category><![CDATA[SharePoint Server 2010]]></category>

		<guid isPermaLink="false">http://alonsorobles.com/?p=241</guid>
		<description><![CDATA[Andrew Connell, a SharePoint MVP, hosted two introduction to SharePoint 2010 webinars for developers over the last couple of days in conjuction with DevExpress. These were a really good concise introduction to SharePoint development. I would recommend that anyone who is &#8230; <a href="http://alonsorobles.com/2011/01/26/two-sharepoint-2010-webinars-for-developers/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.andrewconnell.com/blog">Andrew Connell</a>, a SharePoint MVP, hosted two introduction to SharePoint 2010 webinars for developers over the last couple of days in conjuction with <a href="http://www.devexpress.com/">DevExpress</a>. These were a really good concise introduction to SharePoint development. I would recommend that anyone who is interested in getting started with SharePoint development take a couple of hours to check these out.</p>
<h3>Intoduction to SharePoint 2010 for Developers</h3>
<p><object width="560" height="340"><param name="movie" value="http://www.youtube-nocookie.com/v/wOdvARkMzGo?fs=1&amp;hl=en_US&amp;rel=0&amp;hd=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube-nocookie.com/v/wOdvARkMzGo?fs=1&amp;hl=en_US&amp;rel=0&amp;hd=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
<p>This webinar is also available on the <a href="http://tv.devexpress.com/#IntroToSharePointWebinar">DevExpress Channel</a>.</p>
<h3>SharePoint 2010 Data Access</h3>
<p><object width="560" height="340"><param name="movie" value="http://www.youtube-nocookie.com/v/GwZQEu64Rlk?fs=1&amp;hl=en_US&amp;rel=0&amp;hd=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube-nocookie.com/v/GwZQEu64Rlk?fs=1&amp;hl=en_US&amp;rel=0&amp;hd=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
<p>This webinar is also available on the <a href="http://tv.devexpress.com/#SharePoint2010DataAccessWebinar">DevExpress Channel</a>.</p>
<p>Andrew was also kind enough to publish <a href="http://www.andrewconnell.com/blog/archive/2011/01/26/wrap-up-from-my-devexpress-webinar-today.aspx">a wrap-up blog post</a> with links to additional references.</p>
]]></content:encoded>
			<wfw:commentRss>http://alonsorobles.com/2011/01/26/two-sharepoint-2010-webinars-for-developers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a SharePoint Solution for an InfoPath Form Template Deployment</title>
		<link>http://alonsorobles.com/2008/06/04/creating-a-sharepoint-solution-for-an-infopath-form-template-deployment/</link>
		<comments>http://alonsorobles.com/2008/06/04/creating-a-sharepoint-solution-for-an-infopath-form-template-deployment/#comments</comments>
		<pubDate>Thu, 05 Jun 2008 06:18:55 +0000</pubDate>
		<dc:creator>Alonso Robles</dc:creator>
				<category><![CDATA[InfoPath]]></category>
		<category><![CDATA[Sharepoint Server]]></category>
		<category><![CDATA[caml]]></category>
		<category><![CDATA[infopath forms services]]></category>
		<category><![CDATA[ipfs]]></category>
		<category><![CDATA[moss 2007]]></category>

		<guid isPermaLink="false">http://blogs.importchaos.com/alonsorobles/?p=50</guid>
		<description><![CDATA[Summary: Learn to create a WSS solution package (WSP file) to deploy an InfoPath Form template (XSN file). Applies to: Microsoft Office SharePoint Server 2007, Microsoft Office InfoPath 2007, Microsoft Office Forms Server 2007 Introduction InfoPath browser-enabled form template deployments &#8230; <a href="http://alonsorobles.com/2008/06/04/creating-a-sharepoint-solution-for-an-infopath-form-template-deployment/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>Summary:</strong> Learn to create a WSS solution package (WSP file) to deploy an InfoPath Form template (XSN file).</p>
<p><strong>Applies to: </strong>Microsoft Office SharePoint Server 2007, Microsoft Office InfoPath 2007, Microsoft Office Forms Server 2007</p>
<h3>Introduction</h3>
<p>InfoPath browser-enabled form template deployments are easy enough to do via the InfoPath client when the template does not require administrator approval. However even when administrator approval is not required, but the SharePoint governance plan requires script-able deployments of all InfoPath forms due to quality assurance and user acceptance testing requirements we need a mechanism to package our forms in <a href="http://blogs.importchaos.com/alonsorobles/2008/05/16/creating-solution-packages-for-wss-30-and-moss-2007-deployments/">a WSS solution package</a>.</p>
<p>In this situation we are left with a few options, the easiest option is to deploy the form template using Central Administration in our development environment and then use Mark <a href="http://www.crsw.com/mark/Lists/Posts/Post.aspx?ID=37">Wagner&#8217;s SharePoint Solution Exporter tool</a> to extract the WSP file. This option is a bit limited however. The solutions generated by InfoPath Form Services after a form is uploaded using Central Administration contain a single form template and have some really unpleasant naming conventions (GUID are not pretty to look at).</p>
<p>Another option, and the topic of this tutorial, is to create a solution package from scratch. This option requires more work but provides more flexibility. We can include more than one form template (XSN file) per solution. We can comply with form, feature, and solution naming schemes. The following steps are required to create a solution package using this option:</p>
<ol>
<li>Create and publish an InfoPath browser-enabled from template(s)</li>
<li>Create a solution manifest</li>
<li>Create a feature manifest</li>
<li>Create an element manifest</li>
<li>Create a data description file</li>
<li>Create and deploy the solution package (and activate the feature)</li>
</ol>
<p>The following sub sections will discuss how to perform the steps above.</p>
<h3>Create and Publish the InfoPath Browser-Enabled From Template</h3>
<p>There are plenty of resources already available on how to create browser-enabled form templates and what the different types of browser-enabled form templates InfoPath Forms Services can use. So for the sake of simplicity, I will use only one form for this tutorial. The only thing that we need here is to make sure we have a published browser-enabled form template.</p>
<p>Follow the steps below to create a sample InfoPath Form Template:</p>
<ol>
<li>Open <strong><em>Microsoft Office InfoPath 2007</em></strong></li>
<li>Using the<strong><em> Getting Started</em></strong> modal dialog, click once on the <strong>Sample - Expense Report</strong> template under the <em>Customize a Sample</em> heading (center of the modal dialog window) and click the <strong>Design this form</strong> link under the <em>Form tasks</em> heading (right side of the modal dialog window)</li>
<li>Using the application menu, select <strong>File</strong> &gt; <strong>Publish&#8230;</strong></li>
<li>If the an information window appears telling you &#8220;the form template must be saved it can be published,&#8221; click the <strong>OK </strong>button and save the form template somewhere (name it something appropriate like <em>Expense Report<strong> </strong></em>for example)</li>
<li>Select the <strong>To a network location </strong>radio button and click the <strong>Next </strong>button in the <strong><em>Publishing Wizard</em></strong></li>
<li>Provide the <strong>Form template path and file name </strong>(I made a directory called <em>c:\wspinfopath<strong> </strong></em>and saved the template there, remember the location that ou chose as we will use this location later in the tutorial) in the <strong><em>Publishing Wizard</em></strong></li>
<li>Provide the <strong>Form template name</strong> (I used <em>Expense Report</em>) and click the <strong>Next</strong> button in the <strong><em>Publishing Wizard</em></strong></li>
<li>Clear the text box (make it empty) and click the <strong>Next</strong> button in the <strong><em>Publishing Wizard</em></strong></li>
<li>If prompted about the access path, click the <strong>OK</strong> button in the alert prompt</li>
<li>Verify the form name, publish path (remember this value), make sure the access path is empty, and the security level is not <em>Restricted<strong> </strong></em>(InfoPath Forms Services does not support the <em>Restricted</em> security level)</li>
<li>Click the <strong>Publish </strong>button in the <strong><em>Publishing Wizard</em></strong></li>
<li>Click the <strong>Close</strong> button in the <strong><em>Publishing Wizard</em></strong></li>
<li>Close <strong><em>Microsoft Office InfoPath 2007</em></strong></li>
</ol>
<p>Visit the <a href="http://msdn.microsoft.com/en-us/office/aa905434.aspx">InfoPath Developer Portal</a> for additional InfoPath development resources. You can also <a href="http://blogs.importchaos.com/alonsorobles/wp-content/uploads/2008/06/expensereport.xsn">download my sample published InfoPath Form Template here</a>.</p>
<h3>Create the Solution Manifest</h3>
<p>In order for Windows SharePoint Services 3.0 to know what to do with a solution package (WSP file) we need to add the required meta data in the form of a solution manifest. This file must be named <em>manifest.xml</em> in order for WSS to find it in the package. You can use any XML or text editor to create the file. I used Visual Studio, but it really doesn&#8217;t matter.</p>
<p>Follow the steps below to create a solution manifest:</p>
<ol>
<li>Open your favorite XML or Text editor and create a file named <em>manifest.xml</em></li>
<li>Save the file to the publish path location of the InfoPath form template (I hope you remembered your path, mine was <em>c:\wspinfopath</em>) and name it<strong> </strong><em>manifest.xml</em></li>
<li>Copy and paste the XML code sample below, save the file, and exit your XML or Text editor</li>
</ol>
<pre>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
&lt;Solution xmlns="http://schemas.microsoft.com/sharepoint/"
          SolutionId="39E1D478-A2BD-4B39-9842-49CA69369BFE"
          DeploymentServerType="WebFrontEnd"&gt;
  &lt;FeatureManifests&gt;
    &lt;FeatureManifest Location="myInfoPathFormTemplate\feature.xml"/&gt;
  &lt;/FeatureManifests&gt;
&lt;/Solution&gt;</pre>
<p>When creating your own solution manifest, make sure you generate a new solution id. You can also <a href="http://blogs.importchaos.com/alonsorobles/wp-content/uploads/2008/06/manifest.xml">download my sample solution manifest here</a>.</p>
<h3>Create the Feature Manifest</h3>
<p>The steps for creating the feature manifest are identical to the steps we used to the the solution manifest with two exceptions. The exceptions are name the file something different (I use <em>feature.xml</em> for this tutorial) and the content that you save in it. So fire up your editor of choice and put the following XML code in the file.</p>
<pre>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
&lt;Feature xmlns="http://schemas.microsoft.com/sharepoint/"
         Id="41CEE181-9440-4536-A1DA-73F41D2155B7"
         Title="My InfoPath Form Template Feature"
         Description="This feature contains the 1 InfoPath form template, but can contain more than one."
         Version="12.0.0.0"
         Scope="Site"
         DefaultResourceFile="ipfscore"
         ReceiverClass="Microsoft.Office.InfoPath.Server.Administration.XsnFeatureReceiver"
         ReceiverAssembly="Microsoft.Office.InfoPath.Server, Version=12.0.0.0,
                           Culture=neutral, PublicKeyToken=71e9bce111e9429c" &gt;
  &lt;ActivationDependencies&gt;
    &lt;ActivationDependency FeatureId="C88C4FF1-DBF5-4649-AD9F-C6C426EBCBF5"/&gt;
  &lt;/ActivationDependencies&gt;
  &lt;ElementManifests&gt;
    &lt;ElementManifest Location="element.xml"/&gt;
    &lt;ElementFile Location="ExpenseReport.xsn"/&gt;
  &lt;/ElementManifests&gt;
  &lt;Properties&gt;
    &lt;Property Key="FeatureName"
              Value="My InfoPath Form Template Feature"/&gt;
  &lt;/Properties&gt;
&lt;/Feature&gt;</pre>
<p>When creating your own feature manifest, make sure you:</p>
<ul>
<li>Generate a unique id for the <em>Id</em> attribute of the <em>Feature</em> root element</li>
<li>Give your feature a meaningful title in the <em>Title</em> attribute of the <em>Feature</em> root element</li>
<li>Give your feature a meaningful description in the <em>Description </em>attribute of the <em>Feature</em> root element</li>
</ul>
<p>There are a ton of things going on in the feature manifest. I am not going to go into the details of what each node means and what other possible attributes you can use. That topic deserves a post (or many posts) of its own. Instead, let me just point out some key points:</p>
<ul>
<li>The <em>ActivationDependencies</em> node makes sure that InfoPath Forms Services (IPFS) is available and active before our feature is activated. IPFS is an enterprise feature and will require either an Enterprise or Internet CAL.</li>
<li>I am not sure why we need the <strong>FeatureName</strong> in the key-value property pairs in the <em>Property</em>node. I am assuming that XsnFeatureReceiver class uses it, but I have not really played with those properties.</li>
<li>The <em>ReceiverClass</em> and <em>ReceiverAssembly</em>attributes are important so that IPFS takes the appropriate actions during the various feature events (such as the install, un-install, activate and deactivate events).</li>
<li>If you have more than one XSN file that you want to deploy with this feature, then just add additional <em>ElementFile</em> nodes.</li>
<li>The scope of the feature must be a site collection (yes the <em>Site</em> value is correct and intentional in the <em>Scope</em> attribute of the <em>Feature</em>root element). Remember that when an InfoPath form is uploaded via Central Administration, it must then be activated to a site collection. I am not sure what would happen if a different scope is used as I have not tried it. You are welcome to give it a shot.</li>
</ul>
<p>Like the solution manifest, you can also <a href="http://blogs.importchaos.com/alonsorobles/wp-content/uploads/2008/06/feature.xml">download my sample feature manifest here</a>.</p>
<h3>Create the Element Manifest</h3>
<p>We are more than halfway done&#8230; I think. Just kidding we are almost there. The next file we need to create is the element manifest. Basically it is just like the feature manifest, but again the file name and the content of the file are a bit different. Fire up your editor&#8230; again. This file will be called <em>element.xml</em>.</p>
<pre>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
&lt;Elements xmlns="http://schemas.microsoft.com/sharepoint/"&gt;
  &lt;Module Name="XSN" Url="FormServerTemplates" RootWebOnly="TRUE"&gt;
    &lt;File Url="ExpenseReport.xsn"
          Name="ExpenseReport.xsn"
          Type="GhostableInLibrary"/&gt;
  &lt;/Module&gt;
&lt;/Elements&gt;</pre>
<p>You can do some interesting things with element manifests and we could spend a ton of time exploring this manifest. But we won&#8217;t because that is yet another topic that is deserving of its own post (or more). Just know that this file and its XML code are responsible for telling the WSS run-time to provision the form template to the <em>Form Template Library</em> in the root website of the site collection.</p>
<p>By the way, if you added more than one XSN file to the feature manifest because you have more than one form template to deploy with your solution, then you will want to add additional <em>File</em> elements for those files. There should be a one to one correlation between the form templates listed in the feature manifest and the element manifest.</p>
<p>I know you are expecting by now&#8230; so <a href="http://blogs.importchaos.com/alonsorobles/wp-content/uploads/2008/06/element.xml">download my sample element manifest here</a> if you like.</p>
<h3>Create the Data Description File</h3>
<p>When all is said and done, the solution package (WSP file) is just a cabinet file and is created using the <a title="Microsoft Cabinet Software Development Kit" href="http://support.microsoft.com/kb/310618"><span style="color: #005599;">MAKECAB</span></a> utility. But in order for the utility to know how to create the file we have to pass it a data description file (DDF file) as an argument. The DDF file is just a plain text file with its own syntax that is pretty easy to follow. So for the last time (I promise) fire up your favorite text editor and put the following contents in it. (This file will be called <em>wsp.ddf.</em>)</p>
<pre>; wsp.ddf (Alonso Robles)</pre>
<pre>.OPTION EXPLICIT     ; Generate errors
.Set CabinetNameTemplate=myInfoPathFormSolution.wsp    
.Set DiskDirectoryTemplate=CDROM ; All cabinets go in a single directory
.Set CompressionType=MSZIP ;** All files are compressed in cabinet files
.Set UniqueFiles="ON"
.Set Cabinet=on
.Set DiskDirectory1=Package</pre>
<pre>; Add Solution Manifest
manifest.xml   manifest.xml</pre>
<pre>; Add Feature Manifests
feature.xml    myInfoPathFormTemplate\feature.xml</pre>
<pre>; Add Element Manifests
element.xml    myInfoPathFormTemplate\element.xml</pre>
<pre>; Add Element Files
ExpenseReport.xsn  myInfoPathFormTemplate\ExpenseReport.xsn</pre>
<p>You may feel overwhelmed with the contents of the DDF file. It&#8217;s okay that&#8217;s normal. You may also be wondering why I used a feature folder hierarchy in the file when we created a folder for a feature at all throughout the tutorial. And you are probably guessing that I am not going to go into the details of the DDF file in this post. And you would be right if you think I am going to tell you that the DDF file is another topic deserving its own post. What you may not know, is that I have covered the DDF file in some detail in a previous post: <a href="http://blogs.importchaos.com/alonsorobles/2008/05/16/creating-solution-packages-for-wss-30-and-moss-2007-deployments/">Creating Solution Packages for WSS 3.0 and MOSS 2007 Deployments</a>.</p>
<p>Oh yeah, almost forgot&#8230; you can <a href="http://blogs.importchaos.com/alonsorobles/wp-content/uploads/2008/06/wsp.ddf">download my sample data description file here</a>.</p>
<h3>Create and Deploy the Solution Package (and Activate the Feature)</h3>
<p>This next part is accomplished using the command line. I am going to assume that you have the MAKECAB utility installed and that you have both MAKECAB and the STSADM utility accessible via the your environment variables. If you don&#8217;t you may need to update your environment variables to make the utilities accessible (or use absolute paths) when using them. Fire up a command line window and let&#8217;s get started. Below you will find the commands that I used to build and deploy the solution package (with a few modifications to generalize the commands) followed by a brief explanation:</p>
<pre>cd c:\wspinfopath
makecab -F wsp.ddf
stsadm -o addsolution -filename myInfoPathFormSolution.wsp
stsadm -o execadmsvcjobs
stsadm -o deploysolution -name myInfoPathFormSolution.wsp -immediate
stsadm -o execadmsvcjobs
stsadm -o activatefeature -name myInfoPathFormTemplate -url http://mymoss</pre>
<p>Quickly reviewing the commands above, we can see that we changed our working directory to the location of the publish path of the InfoPath form template (and the solution files). Then we generate the WSP file with the MAKECAP utility. Finally, using the STSADM utility we added the solution, deployed it, and activated the feature (for more information STSADM operations see my post on the <a href="http://blogs.importchaos.com/alonsorobles/2007/07/05/189-stsadm-operations/">189 STSADM Operations</a>). </p>
<h3>Conclusion</h3>
<p>This post covered how to create a WSS solution package to deploy InfoPath browser-enabled form templates. While this method may not be required for all Microsoft Office SharePoint Server 2007 or Microsoft Office Forms Server 2007 implementation, it does offer some flexibility in order to allow us to comply with solution, feature, and form template naming conventions. In addition, it provides the ability to create script-able deployments that can be uniformly applied to multiple environments.</p>
<h3>Additional Resources</h3>
<ul>
<li><a href="http://blogs.importchaos.com/alonsorobles/2007/07/05/189-stsadm-operations/">189 STSADM Operations</a></li>
<li><a href="http://blogs.importchaos.com/alonsorobles/2008/05/16/creating-solution-packages-for-wss-30-and-moss-2007-deployments/">Creating Solution Packages for WSS 3.0 and MOSS 2007 Deployments</a></li>
<li><a href="http://www.crsw.com/mark/Lists/Posts/Post.aspx?ID=37">How To: Create a SharePoint Solution for an InfoPath Form</a></li>
<li><a href="http://msdn.microsoft.com/en-us/office/aa905434.aspx">InfoPath Developer Portal</a></li>
<li><a href="http://msdn.microsoft.com/en-us/office/aa905503.aspx">SharePoint Server 2007 Developer Portal</a></li>
<li><a href="http://msdn.microsoft.com/en-us/office/aa905503.aspx">Windows SharePoint Services Developer Center</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://alonsorobles.com/2008/06/04/creating-a-sharepoint-solution-for-an-infopath-form-template-deployment/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>

