<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" 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:georss="http://www.georss.org/georss" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Mick's Breeze Blogs - Biztalk/Sharepoint/... - BizTalk|SharePoint</title>
    <link>http://blogs.breeze.net/mickb/</link>
    <description>Things hard and not so hard....</description>
    <language>en-us</language>
    <copyright>Breeze</copyright>
    <lastBuildDate>Tue, 12 Oct 2010 03:08:00 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>mickb@breezetraining.com.au</managingEditor>
    <webMaster>mickb@breezetraining.com.au</webMaster>
    <item>
      <trackback:ping>http://blogs.breeze.net/mickb/Trackback.aspx?guid=ea43f413-7177-4ddf-8acd-fd3c410d5078</trackback:ping>
      <pingback:server>http://blogs.breeze.net/mickb/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.breeze.net/mickb/PermaLink,guid,ea43f413-7177-4ddf-8acd-fd3c410d5078.aspx</pingback:target>
      <dc:creator>Mick Badran</dc:creator>
      <wfw:comment>http://blogs.breeze.net/mickb/CommentView,guid,ea43f413-7177-4ddf-8acd-fd3c410d5078.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.breeze.net/mickb/SyndicationService.asmx/GetEntryCommentsRss?guid=ea43f413-7177-4ddf-8acd-fd3c410d5078</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Today I decided to crack open the BTS 2010 SharePoint WS Adapter to see if it takes
advantage of the great new interfaces exposed by SharePoint 2010, specifically <strong>Microsoft.SharePoint.Client.dll
and Microsoft.SharePoint.Client.Runtime.dll</strong>.
</p>
        <p>
At a glance, the benefits of this new Client APIs are:
</p>
        <ol>
          <li>
Runs on a non SharePoint installed box.</li>
          <li>
Lightweight and flexible – only get back what you ask for. As opposed to the classic
SP Server API that populates the SPWeb collection (for e.g.) only if you just want
the <strong>title</strong> field and not 10MBs worth of other data.</li>
          <li>
Batch approach – load up several commands and batch them over the wire when needed.</li>
          <li>
Supports both read/write from the client back to SP Server.</li>
          <li>
Uses XML and JSON over the wire – small and fast.</li>
          <li>
We can’t do *everything* we can on the Server Side – e.g. Service Application management,
i.e. kicking off a search index crawl.</li>
        </ol>
        <p>
A little piccy of what’s going on:
</p>
        <p>
          <a href="http://blogs.breezetraining.com.au/mickb/content/2010/BizTalk2010MusingofthenewSharePoint2010W_C651/image.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.breezetraining.com.au/mickb/content/2010/BizTalk2010MusingofthenewSharePoint2010W_C651/image_thumb.png" width="486" height="363" />
          </a>
        </p>
        <p>
Some classic piece of code to achieve document library reading:
</p>
        <strong>
        </strong>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:60e8dfb3-1382-4e2f-9b78-9a4d1ef447b2" class="wlWriterEditableSmartContent">
          <pre style=" width: 836px; height: 410px;background-color:White;overflow: auto;">
            <div>
              <!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->
              <span style="color: #008080;"> 1</span>
              <span style="color: #0000FF;">static</span>
              <span style="color: #000000;">
              </span>
              <span style="color: #0000FF;">void</span>
              <span style="color: #000000;"> Main(</span>
              <span style="color: #0000FF;">string</span>
              <span style="color: #000000;">[]
args) </span>
              <span style="color: #008080;"> 2</span>
              <span style="color: #000000;"> { </span>
              <span style="color: #008080;"> 3</span>
              <span style="color: #000000;"> ClientContext
ctx </span>
              <span style="color: #000000;">=</span>
              <span style="color: #000000;">
              </span>
              <span style="color: #0000FF;">new</span>
              <span style="color: #000000;"> ClientContext(</span>
              <span style="color: #800000;">"</span>
              <span style="color: #800000;">http://intranet</span>
              <span style="color: #800000;">"</span>
              <span style="color: #000000;">); </span>
              <span style="color: #008080;"> 4</span>
              <span style="color: #000000;"> Web
web </span>
              <span style="color: #000000;">=</span>
              <span style="color: #000000;"> ctx.Web; </span>
              <span style="color: #008080;"> 5</span>
              <span style="color: #000000;"> List
docs </span>
              <span style="color: #000000;">=</span>
              <span style="color: #000000;"> web.Lists.GetByTitle(</span>
              <span style="color: #800000;">"</span>
              <span style="color: #800000;">Shared
Documents</span>
              <span style="color: #800000;">"</span>
              <span style="color: #000000;">); </span>
              <span style="color: #008080;"> 6</span>
              <span style="color: #000000;"> ListItemCollection
items </span>
              <span style="color: #000000;">=</span>
              <span style="color: #000000;"> docs.GetItems(CamlQuery.CreateAllItemsQuery()); </span>
              <span style="color: #008080;"> 7</span>
              <span style="color: #000000;"> ctx.Load</span>
              <span style="color: #000000;">&lt;</span>
              <span style="color: #000000;">Web</span>
              <span style="color: #000000;">&gt;</span>
              <span style="color: #000000;">(web); </span>
              <span style="color: #008080;"> 8</span>
              <span style="color: #000000;"> ctx.Load(docs); </span>
              <span style="color: #008080;"> 9</span>
              <span style="color: #000000;"> ctx.Load(items); </span>
              <span style="color: #008080;">10</span>
              <span style="color: #000000;"> ctx.ExecuteQuery(); </span>
              <span style="color: #008080;">11</span>
              <span style="color: #000000;"> Console.WriteLine(</span>
              <span style="color: #800000;">"</span>
              <span style="color: #800000;">The
list has {0} items.</span>
              <span style="color: #800000;">"</span>
              <span style="color: #000000;">,
docs.ItemCount); </span>
              <span style="color: #008080;">12</span>
              <span style="color: #000000;">
              </span>
              <span style="color: #0000FF;">foreach</span>
              <span style="color: #000000;"> (ListItem
item </span>
              <span style="color: #0000FF;">in</span>
              <span style="color: #000000;"> items) </span>
              <span style="color: #008080;">13</span>
              <span style="color: #000000;"> { </span>
              <span style="color: #008080;">14</span>
              <span style="color: #000000;"> Console.WriteLine(</span>
              <span style="color: #800000;">"</span>
              <span style="color: #800000;">Item:{0}</span>
              <span style="color: #800000;">"</span>
              <span style="color: #000000;">,
item[</span>
              <span style="color: #800000;">"</span>
              <span style="color: #800000;">Title</span>
              <span style="color: #800000;">"</span>
              <span style="color: #000000;">]); </span>
              <span style="color: #008080;">15</span>
              <span style="color: #000000;"> } </span>
              <span style="color: #008080;">16</span>
              <span style="color: #000000;">
              </span>
              <span style="color: #008000;">//</span>
              <span style="color: #008000;">delete
an item. </span>
              <span style="color: #008080;">17</span>
              <span style="color: #008000;">
              </span>
              <span style="color: #008000;">//</span>
              <span style="color: #008000;">items[1].Update(); </span>
              <span style="color: #008080;">18</span>
              <span style="color: #008000;">
              </span>
              <span style="color: #008000;">//</span>
              <span style="color: #008000;">items[1].DeleteObject(); </span>
              <span style="color: #008080;">19</span>
              <span style="color: #008000;">
              </span>
              <span style="color: #008000;">//</span>
              <span style="color: #008000;">ctx.Load(items); </span>
              <span style="color: #008080;">20</span>
              <span style="color: #008000;">
              </span>
              <span style="color: #008000;">//</span>
              <span style="color: #008000;">ctx.ExecuteQuery();</span>
              <span style="color: #008000;">
              </span>
              <span style="color: #008080;">21</span>
              <span style="color: #008000;">
              </span>
              <span style="color: #000000;"> Console.ReadLine(); </span>
              <span style="color: #008080;">22</span>
              <span style="color: #000000;"> }</span>
            </div>
          </pre>
          <!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com -->
        </div>
        <p>
          <strong>Note: </strong>Line 10 is where all the magic happens – if you imagine, we
load up the client OM classes and the props etc. are all ‘blank’ until we do an <strong>ExecuteQuery() </strong>which
then populates what we ask for. 
</p>
        <p>
The above sample is pretty simple showing how to connect to a document library on
a ‘remote’ server (security allowing – I didn’t add a ctx.Credentials=… line in the
above, but all possible).
</p>
        <p>
          <strong>So let’s move on a crack open the BTS 2010 SharePoint WS Adapter…</strong>
        </p>
        <p>
Just before we go there I’d like to point out that the <strong>Microsoft.SharePoint.dll</strong> (aka
Server API) has the ability to connect to remote servers, although the code needs
to be executed on a machine that has a local SharePoint install.
</p>
        <p>
e.g.
</p>
        <p>
SPSite site = new SPSite(“http://remoteserver.acme.com”);
</p>
        <p>
SPWeb web = site.OpenWeb();
</p>
        <p>
…
</p>
        <p>
What I am trying to avoid with the BTS SharePoint adapter is the need to have the
‘BTS Web Service’ component installed on remote Farms. Just complicates the issue
far too much with the SharePoint admins. 
</p>
        <p>
          <strong>The BTS 2010 Story</strong>
        </p>
        <p>
I setup and installed the BTS SharePoint WS Adapter through the <strong>Configuration.exe </strong>tool
successfully.
</p>
        <p>
Essentially this tools runs a ‘web site check’ to make sure SharePoint is successfully
setup and installed.
</p>
        <p>
          <a href="http://blogs.breezetraining.com.au/mickb/content/2010/BizTalk2010MusingofthenewSharePoint2010W_C651/image_3.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.breezetraining.com.au/mickb/content/2010/BizTalk2010MusingofthenewSharePoint2010W_C651/image_thumb_3.png" width="655" height="536" />
          </a>
        </p>
        <p>
To make this happen, the configuration tool runs either:
</p>
        <ol>
          <li>
Microsoft.BizTalk.KwTpm.StsOmInterop3.exe – for WSSv3</li>
          <li>
Microsoft.BizTalk.KwTpm.StsOmInterop4.exe – for WSSv4</li>
        </ol>
        <p>
to determine the site as follows:
</p>
        <p>
          <a href="http://blogs.breezetraining.com.au/mickb/content/2010/BizTalk2010MusingofthenewSharePoint2010W_C651/image_4.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.breezetraining.com.au/mickb/content/2010/BizTalk2010MusingofthenewSharePoint2010W_C651/image_thumb_4.png" width="666" height="157" />
          </a>
        </p>
        <p>
          <strong>Note:</strong> The URL and note the URL in the BTS Configuration above. Here
I’ve already configured the adapter and I’m just showing the commands that the configurator
runs behind the scenes.
</p>
        <p>
Once configuration is complete you will see a new <strong>virtual directory added</strong> 
to your selected site e.g. <a href="http://intranet">http://intranet</a>.
</p>
        <p>
As shown in <strong>IIS Manager.</strong></p>
        <p>
          <a href="http://blogs.breezetraining.com.au/mickb/content/2010/BizTalk2010MusingofthenewSharePoint2010W_C651/image_5.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.breezetraining.com.au/mickb/content/2010/BizTalk2010MusingofthenewSharePoint2010W_C651/image_thumb_5.png" width="284" height="500" />
          </a>
        </p>
        <p>
Depending on the SharePoint version this virtual directory will map to:
</p>
        <ol>
          <li>
C:\Program Files (x86)\Microsoft BizTalk Server 2010\Business Activity Services\BTSharePointV4AdapterWS<br />
or</li>
          <li>
C:\Program Files (x86)\Microsoft BizTalk Server 2010\Business Activity Services\BTSharePointV3AdapterWS
(previous bts2009 adapter)</li>
        </ol>
        <p>
          <strong>A Basic BTS/SharePoint picture</strong>
        </p>
        <p>
Essentially the BTS SharePoint Adapter consists of 2 parts:
</p>
        <ol>
          <li>
A BTS Adapter that talks to the BTS SharePoint WS. This is a ‘classic’ adapter and
does <strong>not talk the newer WCF framework </strong>(which does have advantages
and disadvantages)</li>
          <li>
A BTS SharePoint WS – this does all the work against the SharePoint library and talks
local SharePoint APIs.</li>
        </ol>
        <p>
          <a href="http://blogs.breezetraining.com.au/mickb/content/2010/BizTalk2010MusingofthenewSharePoint2010W_C651/image_6.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.breezetraining.com.au/mickb/content/2010/BizTalk2010MusingofthenewSharePoint2010W_C651/image_thumb_6.png" width="435" height="266" />
          </a>
        </p>
        <p>
 
</p>
        <p>
Let’s look closer at the <strong>BTSharePointV4AdapterWS folder</strong></p>
        <p>
          <a href="http://blogs.breezetraining.com.au/mickb/content/2010/BizTalk2010MusingofthenewSharePoint2010W_C651/image_7.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.breezetraining.com.au/mickb/content/2010/BizTalk2010MusingofthenewSharePoint2010W_C651/image_thumb_7.png" width="758" height="254" />
          </a>
        </p>
        <p>
- this folder, or addition needs to be available locally to whichever SharePoint site
you are calling through the OOTB BTS SharePoint adapter, even though the SharePoint
APIs support remote Servers.
</p>
        <p>
- the <strong>bin</strong> folder has the Microsoft.BizTalk.KwTpm.WssV4Adapter.WebService.dll
which is 78kb. 
</p>
        <p>
I wanted to find out whether this DLL used the new SharePoint Client APIs when meant
having a peek at the ‘references’ of this DLL in IL.
</p>
        <p>
          <strong>Dissassembling Microsoft.BizTalk.KwTpm.WssV4Adapter.WebService.dll </strong>
        </p>
        <p>
Using .NET Reflector I was able to get this picture…
</p>
        <p>
          <a href="http://blogs.breezetraining.com.au/mickb/content/2010/BizTalk2010MusingofthenewSharePoint2010W_C651/image_8.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.breezetraining.com.au/mickb/content/2010/BizTalk2010MusingofthenewSharePoint2010W_C651/image_thumb_8.png" width="344" height="226" />
          </a>
        </p>
        <p>
          <strong>NOTE: </strong>on this list there is Microsoft.SharePoint, but <strong>not</strong> Microsoft.SharePoint.Client.dll<br />
(this is not looking good…could be late bound, but… I doubt it)
</p>
        <p>
Digging into the actual <strong>WssAdapter class</strong> we get the following of
note:
</p>
        <p>
          <a href="http://blogs.breezetraining.com.au/mickb/content/2010/BizTalk2010MusingofthenewSharePoint2010W_C651/image_9.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.breezetraining.com.au/mickb/content/2010/BizTalk2010MusingofthenewSharePoint2010W_C651/image_thumb_9.png" width="1004" height="443" />
          </a>
        </p>
        <p>
The <strong>GetDocuments(string, string, string, Int32, DocExtOfficeIntegration)…</strong> is
a key method.
</p>
        <p>
The APIs show that the 1st parameter is a <strong>siteUrl</strong> (and following
the implementation code through) which has the potential to point to another SharePoint
server to make the connection (in the RequestInfo class if you’re going to dig yourself
:))<br /><strong>Note: the PREVIOUS version, BTS2009 has the same Interface/Method signature
and it requires the BTS SharePoint Adapter WS to be deployed on the remote SharePoint
Server, </strong>even though the signature looks as though it will support the remote
server.
</p>
        <p>
So in conclusion the BTS SharePoint Adapter WebService has:
</p>
        <ol>
          <li>
NOT got any newer SharePoint Client API code within in.</li>
          <li>
The ability to contact a remote server through the WebService APIs.</li>
          <li>
But depends on whether the BTS Adapter will pass the ‘remote’ URL to the ‘local’ WS,
or will the Adapter try to contact the remote SharePoint Server directly looking for
a WS there???</li>
        </ol>
        <p>
I’m thinking it’s the latter…
</p>
        <p>
A little more to unravel the SharePoint mystery…
</p>
        <img width="0" height="0" src="http://blogs.breeze.net/mickb/aggbug.ashx?id=ea43f413-7177-4ddf-8acd-fd3c410d5078" />
      </body>
      <title>BizTalk 2010: Musing of the ‘new’ SharePoint 2010 WS Adapter</title>
      <guid isPermaLink="false">http://blogs.breeze.net/mickb/PermaLink,guid,ea43f413-7177-4ddf-8acd-fd3c410d5078.aspx</guid>
      <link>http://blogs.breeze.net/mickb/2010/10/12/BizTalk2010MusingOfTheNewSharePoint2010WSAdapter.aspx</link>
      <pubDate>Tue, 12 Oct 2010 03:08:00 GMT</pubDate>
      <description>&lt;p&gt;
Today I decided to crack open the BTS 2010 SharePoint WS Adapter to see if it takes
advantage of the great new interfaces exposed by SharePoint 2010, specifically &lt;strong&gt;Microsoft.SharePoint.Client.dll
and Microsoft.SharePoint.Client.Runtime.dll&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;
At a glance, the benefits of this new Client APIs are:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Runs on a non SharePoint installed box.&lt;/li&gt;
&lt;li&gt;
Lightweight and flexible – only get back what you ask for. As opposed to the classic
SP Server API that populates the SPWeb collection (for e.g.) only if you just want
the &lt;strong&gt;title&lt;/strong&gt; field and not 10MBs worth of other data.&lt;/li&gt;
&lt;li&gt;
Batch approach – load up several commands and batch them over the wire when needed.&lt;/li&gt;
&lt;li&gt;
Supports both read/write from the client back to SP Server.&lt;/li&gt;
&lt;li&gt;
Uses XML and JSON over the wire – small and fast.&lt;/li&gt;
&lt;li&gt;
We can’t do *everything* we can on the Server Side – e.g. Service Application management,
i.e. kicking off a search index crawl.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
A little piccy of what’s going on:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blogs.breezetraining.com.au/mickb/content/2010/BizTalk2010MusingofthenewSharePoint2010W_C651/image.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.breezetraining.com.au/mickb/content/2010/BizTalk2010MusingofthenewSharePoint2010W_C651/image_thumb.png" width="486" height="363"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Some classic piece of code to achieve document library reading:
&lt;/p&gt;
&lt;strong&gt;&lt;/strong&gt; 
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:60e8dfb3-1382-4e2f-9b78-9a4d1ef447b2" class="wlWriterEditableSmartContent"&gt;&lt;pre style=" width: 836px; height: 410px;background-color:White;overflow: auto;"&gt;
&lt;div&gt;
&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #008080;"&gt; 1&lt;/span&gt; &lt;span style="color: #0000FF;"&gt;static&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;void&lt;/span&gt;&lt;span style="color: #000000;"&gt; Main(&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;string&lt;/span&gt;&lt;span style="color: #000000;"&gt;[]
args) &lt;/span&gt;&lt;span style="color: #008080;"&gt; 2&lt;/span&gt; &lt;span style="color: #000000;"&gt; { &lt;/span&gt;&lt;span style="color: #008080;"&gt; 3&lt;/span&gt; &lt;span style="color: #000000;"&gt; ClientContext
ctx &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;new&lt;/span&gt;&lt;span style="color: #000000;"&gt; ClientContext(&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000;"&gt;http://intranet&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000;"&gt;); &lt;/span&gt;&lt;span style="color: #008080;"&gt; 4&lt;/span&gt; &lt;span style="color: #000000;"&gt; Web
web &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; ctx.Web; &lt;/span&gt;&lt;span style="color: #008080;"&gt; 5&lt;/span&gt; &lt;span style="color: #000000;"&gt; List
docs &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; web.Lists.GetByTitle(&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000;"&gt;Shared
Documents&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000;"&gt;); &lt;/span&gt;&lt;span style="color: #008080;"&gt; 6&lt;/span&gt; &lt;span style="color: #000000;"&gt; ListItemCollection
items &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; docs.GetItems(CamlQuery.CreateAllItemsQuery()); &lt;/span&gt;&lt;span style="color: #008080;"&gt; 7&lt;/span&gt; &lt;span style="color: #000000;"&gt; ctx.Load&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;Web&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;(web); &lt;/span&gt;&lt;span style="color: #008080;"&gt; 8&lt;/span&gt; &lt;span style="color: #000000;"&gt; ctx.Load(docs); &lt;/span&gt;&lt;span style="color: #008080;"&gt; 9&lt;/span&gt; &lt;span style="color: #000000;"&gt; ctx.Load(items); &lt;/span&gt;&lt;span style="color: #008080;"&gt;10&lt;/span&gt; &lt;span style="color: #000000;"&gt; ctx.ExecuteQuery(); &lt;/span&gt;&lt;span style="color: #008080;"&gt;11&lt;/span&gt; &lt;span style="color: #000000;"&gt; Console.WriteLine(&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000;"&gt;The
list has {0} items.&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000;"&gt;,
docs.ItemCount); &lt;/span&gt;&lt;span style="color: #008080;"&gt;12&lt;/span&gt; &lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;foreach&lt;/span&gt;&lt;span style="color: #000000;"&gt; (ListItem
item &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;in&lt;/span&gt;&lt;span style="color: #000000;"&gt; items) &lt;/span&gt;&lt;span style="color: #008080;"&gt;13&lt;/span&gt; &lt;span style="color: #000000;"&gt; { &lt;/span&gt;&lt;span style="color: #008080;"&gt;14&lt;/span&gt; &lt;span style="color: #000000;"&gt; Console.WriteLine(&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000;"&gt;Item:{0}&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000;"&gt;,
item[&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000;"&gt;Title&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000;"&gt;]); &lt;/span&gt;&lt;span style="color: #008080;"&gt;15&lt;/span&gt; &lt;span style="color: #000000;"&gt; } &lt;/span&gt;&lt;span style="color: #008080;"&gt;16&lt;/span&gt; &lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt;delete
an item. &lt;/span&gt;&lt;span style="color: #008080;"&gt;17&lt;/span&gt; &lt;span style="color: #008000;"&gt; &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt;items[1].Update(); &lt;/span&gt;&lt;span style="color: #008080;"&gt;18&lt;/span&gt; &lt;span style="color: #008000;"&gt; &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt;items[1].DeleteObject(); &lt;/span&gt;&lt;span style="color: #008080;"&gt;19&lt;/span&gt; &lt;span style="color: #008000;"&gt; &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt;ctx.Load(items); &lt;/span&gt;&lt;span style="color: #008080;"&gt;20&lt;/span&gt; &lt;span style="color: #008000;"&gt; &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt;ctx.ExecuteQuery();&lt;/span&gt;&lt;span style="color: #008000;"&gt; &lt;/span&gt;&lt;span style="color: #008080;"&gt;21&lt;/span&gt; &lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; Console.ReadLine(); &lt;/span&gt;&lt;span style="color: #008080;"&gt;22&lt;/span&gt; &lt;span style="color: #000000;"&gt; }&lt;/span&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;strong&gt;Note: &lt;/strong&gt;Line 10 is where all the magic happens – if you imagine, we
load up the client OM classes and the props etc. are all ‘blank’ until we do an &lt;strong&gt;ExecuteQuery() &lt;/strong&gt;which
then populates what we ask for. 
&lt;/p&gt;
&lt;p&gt;
The above sample is pretty simple showing how to connect to a document library on
a ‘remote’ server (security allowing – I didn’t add a ctx.Credentials=… line in the
above, but all possible).
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;So let’s move on a crack open the BTS 2010 SharePoint WS Adapter…&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Just before we go there I’d like to point out that the &lt;strong&gt;Microsoft.SharePoint.dll&lt;/strong&gt; (aka
Server API) has the ability to connect to remote servers, although the code needs
to be executed on a machine that has a local SharePoint install.
&lt;/p&gt;
&lt;p&gt;
e.g.
&lt;/p&gt;
&lt;p&gt;
SPSite site = new SPSite(“http://remoteserver.acme.com”);
&lt;/p&gt;
&lt;p&gt;
SPWeb web = site.OpenWeb();
&lt;/p&gt;
&lt;p&gt;
…
&lt;/p&gt;
&lt;p&gt;
What I am trying to avoid with the BTS SharePoint adapter is the need to have the
‘BTS Web Service’ component installed on remote Farms. Just complicates the issue
far too much with the SharePoint admins. 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;The BTS 2010 Story&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
I setup and installed the BTS SharePoint WS Adapter through the &lt;strong&gt;Configuration.exe &lt;/strong&gt;tool
successfully.
&lt;/p&gt;
&lt;p&gt;
Essentially this tools runs a ‘web site check’ to make sure SharePoint is successfully
setup and installed.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blogs.breezetraining.com.au/mickb/content/2010/BizTalk2010MusingofthenewSharePoint2010W_C651/image_3.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.breezetraining.com.au/mickb/content/2010/BizTalk2010MusingofthenewSharePoint2010W_C651/image_thumb_3.png" width="655" height="536"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
To make this happen, the configuration tool runs either:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Microsoft.BizTalk.KwTpm.StsOmInterop3.exe – for WSSv3&lt;/li&gt;
&lt;li&gt;
Microsoft.BizTalk.KwTpm.StsOmInterop4.exe – for WSSv4&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
to determine the site as follows:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blogs.breezetraining.com.au/mickb/content/2010/BizTalk2010MusingofthenewSharePoint2010W_C651/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.breezetraining.com.au/mickb/content/2010/BizTalk2010MusingofthenewSharePoint2010W_C651/image_thumb_4.png" width="666" height="157"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Note:&lt;/strong&gt; The URL and note the URL in the BTS Configuration above. Here
I’ve already configured the adapter and I’m just showing the commands that the configurator
runs behind the scenes.
&lt;/p&gt;
&lt;p&gt;
Once configuration is complete you will see a new &lt;strong&gt;virtual directory added&lt;/strong&gt;&amp;nbsp;
to your selected site e.g. &lt;a href="http://intranet"&gt;http://intranet&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
As shown in &lt;strong&gt;IIS Manager.&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blogs.breezetraining.com.au/mickb/content/2010/BizTalk2010MusingofthenewSharePoint2010W_C651/image_5.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.breezetraining.com.au/mickb/content/2010/BizTalk2010MusingofthenewSharePoint2010W_C651/image_thumb_5.png" width="284" height="500"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Depending on the SharePoint version this virtual directory will map to:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
C:\Program Files (x86)\Microsoft BizTalk Server 2010\Business Activity Services\BTSharePointV4AdapterWS&lt;br&gt;
or&lt;/li&gt;
&lt;li&gt;
C:\Program Files (x86)\Microsoft BizTalk Server 2010\Business Activity Services\BTSharePointV3AdapterWS
(previous bts2009 adapter)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
&lt;strong&gt;A Basic BTS/SharePoint picture&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Essentially the BTS SharePoint Adapter consists of 2 parts:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
A BTS Adapter that talks to the BTS SharePoint WS. This is a ‘classic’ adapter and
does &lt;strong&gt;not talk the newer WCF framework &lt;/strong&gt;(which does have advantages
and disadvantages)&lt;/li&gt;
&lt;li&gt;
A BTS SharePoint WS – this does all the work against the SharePoint library and talks
local SharePoint APIs.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
&lt;a href="http://blogs.breezetraining.com.au/mickb/content/2010/BizTalk2010MusingofthenewSharePoint2010W_C651/image_6.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.breezetraining.com.au/mickb/content/2010/BizTalk2010MusingofthenewSharePoint2010W_C651/image_thumb_6.png" width="435" height="266"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Let’s look closer at the &lt;strong&gt;BTSharePointV4AdapterWS folder&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blogs.breezetraining.com.au/mickb/content/2010/BizTalk2010MusingofthenewSharePoint2010W_C651/image_7.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.breezetraining.com.au/mickb/content/2010/BizTalk2010MusingofthenewSharePoint2010W_C651/image_thumb_7.png" width="758" height="254"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
- this folder, or addition needs to be available locally to whichever SharePoint site
you are calling through the OOTB BTS SharePoint adapter, even though the SharePoint
APIs support remote Servers.
&lt;/p&gt;
&lt;p&gt;
- the &lt;strong&gt;bin&lt;/strong&gt; folder has the Microsoft.BizTalk.KwTpm.WssV4Adapter.WebService.dll
which is 78kb. 
&lt;/p&gt;
&lt;p&gt;
I wanted to find out whether this DLL used the new SharePoint Client APIs when meant
having a peek at the ‘references’ of this DLL in IL.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Dissassembling Microsoft.BizTalk.KwTpm.WssV4Adapter.WebService.dll &lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Using .NET Reflector I was able to get this picture…
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blogs.breezetraining.com.au/mickb/content/2010/BizTalk2010MusingofthenewSharePoint2010W_C651/image_8.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.breezetraining.com.au/mickb/content/2010/BizTalk2010MusingofthenewSharePoint2010W_C651/image_thumb_8.png" width="344" height="226"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;NOTE: &lt;/strong&gt;on this list there is Microsoft.SharePoint, but &lt;strong&gt;not&lt;/strong&gt; Microsoft.SharePoint.Client.dll&lt;br&gt;
(this is not looking good…could be late bound, but… I doubt it)
&lt;/p&gt;
&lt;p&gt;
Digging into the actual &lt;strong&gt;WssAdapter class&lt;/strong&gt; we get the following of
note:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blogs.breezetraining.com.au/mickb/content/2010/BizTalk2010MusingofthenewSharePoint2010W_C651/image_9.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.breezetraining.com.au/mickb/content/2010/BizTalk2010MusingofthenewSharePoint2010W_C651/image_thumb_9.png" width="1004" height="443"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
The &lt;strong&gt;GetDocuments(string, string, string, Int32, DocExtOfficeIntegration)…&lt;/strong&gt; is
a key method.
&lt;/p&gt;
&lt;p&gt;
The APIs show that the 1st parameter is a &lt;strong&gt;siteUrl&lt;/strong&gt; (and following
the implementation code through) which has the potential to point to another SharePoint
server to make the connection (in the RequestInfo class if you’re going to dig yourself
:))&lt;br&gt;
&lt;strong&gt;Note: the PREVIOUS version, BTS2009 has the same Interface/Method signature
and it requires the BTS SharePoint Adapter WS to be deployed on the remote SharePoint
Server, &lt;/strong&gt;even though the signature looks as though it will support the remote
server.
&lt;/p&gt;
&lt;p&gt;
So in conclusion the BTS SharePoint Adapter WebService has:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
NOT got any newer SharePoint Client API code within in.&lt;/li&gt;
&lt;li&gt;
The ability to contact a remote server through the WebService APIs.&lt;/li&gt;
&lt;li&gt;
But depends on whether the BTS Adapter will pass the ‘remote’ URL to the ‘local’ WS,
or will the Adapter try to contact the remote SharePoint Server directly looking for
a WS there???&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
I’m thinking it’s the latter…
&lt;/p&gt;
&lt;p&gt;
A little more to unravel the SharePoint mystery…
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.breeze.net/mickb/aggbug.ashx?id=ea43f413-7177-4ddf-8acd-fd3c410d5078" /&gt;</description>
      <comments>http://blogs.breeze.net/mickb/CommentView,guid,ea43f413-7177-4ddf-8acd-fd3c410d5078.aspx</comments>
      <category>BizTalk</category>
      <category>BizTalk/2010</category>
      <category>BizTalk/Insights</category>
      <category>BizTalk/SharePoint</category>
      <category>SharePoint</category>
      <category>SharePoint/2010</category>
    </item>
    <item>
      <trackback:ping>http://blogs.breeze.net/mickb/Trackback.aspx?guid=405bd13a-a590-4b0b-ad90-92e461c3870d</trackback:ping>
      <pingback:server>http://blogs.breeze.net/mickb/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.breeze.net/mickb/PermaLink,guid,405bd13a-a590-4b0b-ad90-92e461c3870d.aspx</pingback:target>
      <dc:creator>Mick Badran</dc:creator>
      <wfw:comment>http://blogs.breeze.net/mickb/CommentView,guid,405bd13a-a590-4b0b-ad90-92e461c3870d.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.breeze.net/mickb/SyndicationService.asmx/GetEntryCommentsRss?guid=405bd13a-a590-4b0b-ad90-92e461c3870d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
As far as I know there’s some good news and bad news…
</p>
        <p>
          <strong>Good news:</strong> the existing BizTalk SharePoint Adapter *should* work
with SharePoint 2010 – you will however need to add ‘&lt;rebinding&gt;’ section to
the existing adapters web.config *if* the SharePoint 2010 is installed locally to
the BizTalk Server.
</p>
        <p>
The ‘rebinding’ tells your local .NET app that even though you want V12.0.0.0 of the
SharePoint APIs, V14.0.0.0 assemblies will give it to you.
</p>
        <p>
          <strong>Bad News:</strong> there’s no new BTS Adapter on the Horizon for this – AFAIK.<br /></p>
        <p>
------
</p>
        <p>
With SharePoint 2010 we now have the capability to involve many tighter technologies
such as:
</p>
        <p>
1) <strong>event notification</strong>, rather than polling for the adapter.
</p>
        <p>
2) <strong>LINQ and ADO.NET Entities</strong> to query the Data.
</p>
        <p>
3) <strong>SharePoint Client WCF Service</strong> – Client.svc . This is a lightweight
and fast interface, where we can batch up requests, send them over the wire and get
back just what we ask for. 
</p>
        <p>
4) <strong>Lists.ASMX web service</strong> (+ the others) for backward compatibility.
</p>
        <p>
When I get some time…:D, I’m keen to develop a .NET LOB WCF Adapter.
</p>
        <img width="0" height="0" src="http://blogs.breeze.net/mickb/aggbug.ashx?id=405bd13a-a590-4b0b-ad90-92e461c3870d" />
      </body>
      <title>BizTalk Adapter for SharePoint 2010</title>
      <guid isPermaLink="false">http://blogs.breeze.net/mickb/PermaLink,guid,405bd13a-a590-4b0b-ad90-92e461c3870d.aspx</guid>
      <link>http://blogs.breeze.net/mickb/2009/11/02/BizTalkAdapterForSharePoint2010.aspx</link>
      <pubDate>Mon, 02 Nov 2009 13:05:01 GMT</pubDate>
      <description>&lt;p&gt;
As far as I know there’s some good news and bad news…
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Good news:&lt;/strong&gt; the existing BizTalk SharePoint Adapter *should* work
with SharePoint 2010 – you will however need to add ‘&amp;lt;rebinding&amp;gt;’ section to
the existing adapters web.config *if* the SharePoint 2010 is installed locally to
the BizTalk Server.
&lt;/p&gt;
&lt;p&gt;
The ‘rebinding’ tells your local .NET app that even though you want V12.0.0.0 of the
SharePoint APIs, V14.0.0.0 assemblies will give it to you.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Bad News:&lt;/strong&gt; there’s no new BTS Adapter on the Horizon for this – AFAIK.&lt;br&gt;
&lt;/p&gt;
&lt;p&gt;
------
&lt;/p&gt;
&lt;p&gt;
With SharePoint 2010 we now have the capability to involve many tighter technologies
such as:
&lt;/p&gt;
&lt;p&gt;
1) &lt;strong&gt;event notification&lt;/strong&gt;, rather than polling for the adapter.
&lt;/p&gt;
&lt;p&gt;
2) &lt;strong&gt;LINQ and ADO.NET Entities&lt;/strong&gt; to query the Data.
&lt;/p&gt;
&lt;p&gt;
3) &lt;strong&gt;SharePoint Client WCF Service&lt;/strong&gt; – Client.svc . This is a lightweight
and fast interface, where we can batch up requests, send them over the wire and get
back just what we ask for. 
&lt;/p&gt;
&lt;p&gt;
4) &lt;strong&gt;Lists.ASMX web service&lt;/strong&gt; (+ the others) for backward compatibility.
&lt;/p&gt;
&lt;p&gt;
When I get some time…:D, I’m keen to develop a .NET LOB WCF Adapter.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.breeze.net/mickb/aggbug.ashx?id=405bd13a-a590-4b0b-ad90-92e461c3870d" /&gt;</description>
      <comments>http://blogs.breeze.net/mickb/CommentView,guid,405bd13a-a590-4b0b-ad90-92e461c3870d.aspx</comments>
      <category>BizTalk/2009</category>
      <category>BizTalk/BizTalk Adapter Pack</category>
      <category>BizTalk/Insights</category>
      <category>BizTalk/SharePoint</category>
      <category>SharePoint/2010</category>
    </item>
    <item>
      <trackback:ping>http://blogs.breeze.net/mickb/Trackback.aspx?guid=a4c8c100-959a-43d1-90ee-454334414a77</trackback:ping>
      <pingback:server>http://blogs.breeze.net/mickb/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.breeze.net/mickb/PermaLink,guid,a4c8c100-959a-43d1-90ee-454334414a77.aspx</pingback:target>
      <dc:creator>Mick Badran</dc:creator>
      <wfw:comment>http://blogs.breeze.net/mickb/CommentView,guid,a4c8c100-959a-43d1-90ee-454334414a77.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.breeze.net/mickb/SyndicationService.asmx/GetEntryCommentsRss?guid=a4c8c100-959a-43d1-90ee-454334414a77</wfw:commentRss>
      <title>BizTalk 2009 – Configuring the SharePoint Adapter *Manually*</title>
      <guid isPermaLink="false">http://blogs.breeze.net/mickb/PermaLink,guid,a4c8c100-959a-43d1-90ee-454334414a77.aspx</guid>
      <link>http://blogs.breeze.net/mickb/2009/11/02/BizTalk2009ConfiguringTheSharePointAdapterManually.aspx</link>
      <pubDate>Mon, 02 Nov 2009 10:02:11 GMT</pubDate>
      <description>&lt;p&gt;
Well – after spending *far* too long trying to get a little Red X to disappear from
my BTS Configuration tool, so I can have a green light to configure the SharePoint
adapter, I thought “There’s got to be an easier way”&lt;br&gt;
&lt;br&gt;
&lt;a href="http://blogs.breezetraining.com.au/mickb/content/binary/WindowsLiveWriter/BizTalk2009ConfiguringtheSharePointAdapt_1270B/image_2.png" target="_blank"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.breezetraining.com.au/mickb/content/binary/WindowsLiveWriter/BizTalk2009ConfiguringtheSharePointAdapt_1270B/image_thumb.png" width="590" height="484"&gt;&lt;/a&gt; 
&lt;br&gt;
Exhibit A – your honour. The SharePoint Adapter Configured.
&lt;/p&gt;
&lt;p&gt;
So – what I did was roll my sleeves up and do this by hand.&lt;br&gt;
&lt;br&gt;
This particular install – BTS09 x86, I installed WSS V3.0 with Sp2 and created a local
sharepoint web application, site collection and had a whole bunch of SharePoint happiness
coming back to me on &lt;a href="http://biztalk"&gt;http://biztalk&lt;/a&gt; (my server name). 
&lt;/p&gt;
&lt;p&gt;
All good I thought – except the configuration tool didn’t like what it found. I looked
at logs, ran network sniffers and even manually ran the tool&amp;nbsp; &lt;strong&gt;Microsoft.BizTalk.KwTpm.StsOmInterop3.exe &lt;/strong&gt;&lt;a href="http://biztalk"&gt;&lt;strong&gt;http://biztalk&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;with
success:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blogs.breezetraining.com.au/mickb/content/binary/WindowsLiveWriter/BizTalk2009ConfiguringtheSharePointAdapt_1270B/image_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.breezetraining.com.au/mickb/content/binary/WindowsLiveWriter/BizTalk2009ConfiguringtheSharePointAdapt_1270B/image_thumb_1.png" width="672" height="335"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
But still no joy in the configurator. 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Here’s how to do it manually:&lt;/strong&gt;
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Setup your local or domain SharePoint Groups&lt;br&gt;
&lt;/strong&gt;Typically this is the ‘SharePoint Enabled Hosts’ Group – if it already exists
on the domain, then great, if not create it. For this I created my group on the local
machine.&lt;br&gt;
I also added as members, my &lt;strong&gt;biztalk service account and my Sharepoint Service
Account&lt;/strong&gt;.&lt;br&gt;
&lt;li&gt;
&lt;strong&gt;Configure IIS – BTS SharePoint WS Web Application&lt;/strong&gt; 
&lt;ol&gt;
&lt;li&gt;
Within the BizTalk Installed folders – e.g. c:\program files\Microsoft BizTalk 2009\Business
Activity Services, you’ll find the set of WebServices to choose from. Select the right
one for your SharePoint deployment. 
&lt;li&gt;
&lt;a href="http://blogs.breezetraining.com.au/mickb/content/binary/WindowsLiveWriter/BizTalk2009ConfiguringtheSharePointAdapt_1270B/image_6.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.breezetraining.com.au/mickb/content/binary/WindowsLiveWriter/BizTalk2009ConfiguringtheSharePointAdapt_1270B/image_thumb_2.png" width="644" height="484"&gt;&lt;/a&gt; 
&lt;li&gt;
As you can see I selected BTSharePointV3AdapterWS (for WSS V2 SP3, select BTSharePointAdapterWS). 
&lt;li&gt;
This is the folder you will point IIS to later. 
&lt;li&gt;
Open this folder and you’ll see a web application with a &lt;strong&gt;web.config.tmpl&lt;/strong&gt; 
&lt;li&gt;
Copy the &lt;strong&gt;web.config.tmpl and rename the *copy* to web.config&lt;/strong&gt; 
&lt;li&gt;
Open up your Web.Config in Notepad and configure as follows: 
&lt;ol&gt;
&lt;p&gt;
&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;br&gt;
&amp;lt;configuration&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;system.web&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;httpModules&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!--add name="UrlAuthorization"
type="System.Web.Security.UrlAuthorizationModule" /--&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/httpModules&amp;gt; 
&lt;p&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!-- Change debug="true" if you want to debug this web service
--&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;compilation defaultLanguage="c#" debug="false" /&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;customErrors mode="Off" /&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!-- Windows Authentication is required for this web service.
--&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;authentication mode="Windows" /&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!-- Impersonation is required for this web service. --&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;identity impersonate="true" /&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;authorization&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;allow roles="SharePoint Enabled Hosts"
verbs="GET,HEAD,POST"/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;deny users="*"/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/authorization&amp;gt; 
&lt;p&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!-- Uncomment this block if you want to do some tracing of
this web service --&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!-- &amp;lt;trace enabled="true" requestLimit="10" pageOutput="false"
traceMode="SortByTime" localOnly="true" /&amp;gt;&amp;nbsp; --&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;globalization requestEncoding="utf-8" responseEncoding="utf-8"
/&amp;gt; 
&lt;p&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!-- The size of a document being posted to SharePoint depends
on this setting --&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;httpRuntime maxRequestLength="100000" /&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;trust level="Full" originUrl="" /&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;/system.web&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;runtime&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dependentAssembly&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;assemblyIdentity name="Microsoft.SharePoint"
publicKeyToken="71e9bce111e9429c"/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;bindingRedirect oldVersion="11.0.0.0"
newVersion="12.0.0.0"/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/dependentAssembly&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/assemblyBinding&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;/runtime&amp;gt;&lt;br&gt;
&amp;lt;/configuration&amp;gt; 
&lt;br&gt;
&lt;li&gt;
(you can always go back and tighten security up on this when you’ve got it working). 
&lt;li&gt;
Note the ‘SharePoint Enabled Hosts’ – local group here. 
&lt;li&gt;
I’ve also removed the ‘Documentation’ tags so I could get some WSDL to make sure it
works within the browser. 
&lt;li&gt;
&lt;strong&gt;Save your web.config within Notepad.&lt;/strong&gt; 
&lt;li&gt;
&lt;strong&gt;NOTE: make note of the Folder Path to get here as we’ll need it in IIS next.&lt;/strong&gt;
&lt;br&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;
&lt;strong&gt;Configuring IIS&lt;/strong&gt; 
&lt;ol&gt;
&lt;li&gt;
Bring up IIS Admin MMC snapin. 
&lt;li&gt;
Select your SharePoint enabled Web Site, I selected ‘Default Web Site’. Right click
when ‘Default Web Site’ is Selected and select ‘&lt;strong&gt;Add Application’&lt;/strong&gt;
&lt;br&gt;
&lt;a href="http://blogs.breezetraining.com.au/mickb/content/binary/WindowsLiveWriter/BizTalk2009ConfiguringtheSharePointAdapt_1270B/image_8.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.breezetraining.com.au/mickb/content/binary/WindowsLiveWriter/BizTalk2009ConfiguringtheSharePointAdapt_1270B/image_thumb_3.png" width="597" height="484"&gt;&lt;/a&gt; 
&lt;br&gt;
note: IIS 7.0 Manager shown. 
&lt;li&gt;
Configure this as follows:&lt;br&gt;
&lt;a href="http://blogs.breezetraining.com.au/mickb/content/binary/WindowsLiveWriter/BizTalk2009ConfiguringtheSharePointAdapt_1270B/image_10.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.breezetraining.com.au/mickb/content/binary/WindowsLiveWriter/BizTalk2009ConfiguringtheSharePointAdapt_1270B/image_thumb_4.png" width="644" height="448"&gt;&lt;/a&gt; 
&lt;br&gt;
(Note – the App Pool User should be able to post into BizTalk and SharePoint)&lt;br&gt;
&lt;strong&gt;Physical Path: &amp;lt;path you had previously to either V2 or V3 of your BTSharePointV3Adapter…&amp;gt;&lt;/strong&gt;
&lt;br&gt;
&lt;li&gt;
Click &lt;strong&gt;OK.&lt;/strong&gt; 
&lt;li&gt;
&lt;strong&gt;To Test your WS: &lt;/strong&gt;browse to: &lt;a href="http://&amp;lt;your"&gt;http://&amp;lt;your&lt;/a&gt; server&amp;gt;/BTSharePointAdapterWS/BTSharePointAdapterWS.asmx 
&lt;li&gt;
You *should* get this:&lt;br&gt;
&lt;a href="http://blogs.breezetraining.com.au/mickb/content/binary/WindowsLiveWriter/BizTalk2009ConfiguringtheSharePointAdapt_1270B/image_12.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.breezetraining.com.au/mickb/content/binary/WindowsLiveWriter/BizTalk2009ConfiguringtheSharePointAdapt_1270B/image_thumb_5.png" width="644" height="484"&gt;&lt;/a&gt; 
&lt;br&gt;
You can invoke the &lt;strong&gt;IsAlive function &lt;/strong&gt;and get TRUE back.&lt;br&gt;
&lt;li&gt;
If not, then fix your IIS related errors, at this point you’ve got a WS that uses
the SharePoint APIs (locally). Some things to check: 
&lt;ol&gt;
&lt;li&gt;
Local file security – make sure the Web App Pool acct can access those directories. 
&lt;li&gt;
Windows Auth is turned on, on your Web App. 
&lt;li&gt;
Check IIS log files for clues.&lt;br&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;
You’re done on the IIS side of things, let’s configure BTS Side.&lt;br&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;
&lt;strong&gt;Configuring BizTalk Side&lt;br&gt;
&lt;/strong&gt;Fortunately the WSS Adapter is installed as part of the BizTalk Runtime configuration
– it’s just not configured. So as far as registering the adapter with BizTalk it’s
already been partly done.&lt;br&gt;
&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;
Install the “I’ve been Configured Registry Keys” – I took these from a previously
successful 2009 install.&lt;br&gt;
&lt;/li&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:e43b5554-ac6f-4333-bf25-7f81e0836ae0" class="wlWriterEditableSmartContent"&gt;
&lt;p&gt;
&lt;a href="http://blogs.breezetraining.com.au/mickb/content/binary/WindowsLiveWriter/BizTalk2009ConfiguringtheSharePointAdapt_1270B/BTS09_x86_WSSAdapterCfg_Node.zip" target="_blank"&gt;BTS
WSS Reg Keys&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;li&gt;
Once the registry keys have been applied you’ll need to go and configure the …&lt;strong&gt;\TPM
key&lt;/strong&gt; to reflect your setup as follows:&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;
In Particular – configure your &lt;strong&gt;SharePoint SiteID to the one you saw in IIS.&lt;/strong&gt; 
&lt;li&gt;
&lt;a href="http://blogs.breezetraining.com.au/mickb/content/binary/WindowsLiveWriter/BizTalk2009ConfiguringtheSharePointAdapt_1270B/image_14.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.breezetraining.com.au/mickb/content/binary/WindowsLiveWriter/BizTalk2009ConfiguringtheSharePointAdapt_1270B/image_thumb_6.png" width="644" height="196"&gt;&lt;/a&gt; 
&lt;/li&gt;
&lt;/ol&gt;
&gt;
&lt;li&gt;
&lt;strong&gt;How is this Different for a x64 bit Install&lt;/strong&gt;
&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;
The IIS piece is the same. 
&lt;li&gt;
The BTS Piece – the Perf counters are the same, 
&lt;br&gt;
but the ..\TPM piece is under &lt;strong&gt;HKLM\SOFTWARE\WOW6432Node\Microsoft\BizTalk
Server\3.0\ConfigFramework&lt;/strong&gt; 
&lt;li&gt;
So you’ll need to ammend 1 of the above 2 REG files.&lt;/li&gt;
&lt;/ol&gt;
&gt;
&lt;p&gt;
You’re done!
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Why oh why is this so hard from within the Configurator&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;NOTE: There *USED* to be a Registry key that told the BTS WSS Adapter where
to go looking for the BTSharePoint WS – a URL (..STSServiceUrl). This eliminated the
need for a local machine install of SharePoint/WSS. Alas…this is *NOT* the case with
WSS Adapter post BTS06.&lt;/strong&gt;
&lt;/p&gt;
&lt;strong&gt;&lt;/strong&gt; 
&lt;p&gt;
&lt;br&gt;
&lt;/p&gt;&lt;?XML:NAMESPACE PREFIX = [default] urn:schemas-microsoft-com:asm.v1 NS = "urn:schemas-microsoft-com:asm.v1" /&gt;
&lt;assemblybinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;
&lt;dependentassembly&gt;
&lt;assemblyidentity name="Microsoft.SharePoint" publickeytoken="71e9bce111e9429c"&gt;
&lt;/assemblyidentity&gt;
&lt;bindingredirect oldversion="11.0.0.0" newversion="12.0.0.0"&gt;
&lt;/bindingredirect&gt;
&lt;/dependentassembly&gt;
&lt;/assemblybinding&gt;
&lt;img width="0" height="0" src="http://blogs.breeze.net/mickb/aggbug.ashx?id=a4c8c100-959a-43d1-90ee-454334414a77" /&gt;</description>
      <comments>http://blogs.breeze.net/mickb/CommentView,guid,a4c8c100-959a-43d1-90ee-454334414a77.aspx</comments>
      <category>BizTalk</category>
      <category>BizTalk/2009</category>
      <category>BizTalk/SharePoint</category>
      <category>MOSS</category>
      <category>SharePoint/2010</category>
    </item>
  </channel>
</rss>