<?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|BizTalk Adapter Pack|SAP</title>
    <link>http://blogs.breeze.net/mickb/</link>
    <description>Things hard and not so hard....</description>
    <language>en-us</language>
    <copyright>Breeze</copyright>
    <lastBuildDate>Sat, 17 Dec 2011 11: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=a0ae34e6-cb75-42c0-9970-05baad02d8f2</trackback:ping>
      <pingback:server>http://blogs.breeze.net/mickb/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.breeze.net/mickb/PermaLink,guid,a0ae34e6-cb75-42c0-9970-05baad02d8f2.aspx</pingback:target>
      <dc:creator>Mick Badran</dc:creator>
      <wfw:comment>http://blogs.breeze.net/mickb/CommentView,guid,a0ae34e6-cb75-42c0-9970-05baad02d8f2.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.breeze.net/mickb/SyndicationService.asmx/GetEntryCommentsRss?guid=a0ae34e6-cb75-42c0-9970-05baad02d8f2</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Well folks – the appfabric labs have come out with a real gem recently.
</p>
        <p>
In CTP we have:
</p>
        <ul>
          <li>
EDI + EAI processing</li>
          <li>
AS2 http/s endpoints</li>
          <li>
‘Bridges’</li>
          <li>
Transforms</li>
        </ul>
        <p>
and of course the latest version of
</p>
        <ul>
          <li>
ServcieBus, Queues and Topics.</li>
        </ul>
        <p>
To get the real benefit from this ‘sneak peek’ there’s a bit of setup required. To
those familiar with BizTalk there’s a few EDI screens declaring parties/partners and
agreements you’ll have seen before.
</p>
        <p>
          <strong>To get cracking:</strong>
        </p>
        <ol>
          <li>
Update your local bits with the latest and greatest - <a href="http://msdn.microsoft.com/en-us/library/windowsazure/hh689760.aspx" target="_blank">Installing
the Windows Azure Service Bus EAI and EDI Labs - December 2011</a><br />
Part of this install is to install the <strong>Service Bus Connect</strong> component,
which installs the <strong>BizTalk 2010 LOB Adapter pack</strong>.<br /><a href="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_2.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_thumb.png" width="644" height="284" /></a><br /><br />
So this is really quite interesting. As the WCF LOB Adapter SDK provides a framework
for developers to build out ‘adapters’ to connect systems/endpoints through a sync/async
messaging pattern.<br /><br />
The BizTalk Adapter Pack 2010 is the BizTalk Team set of adapters built on top of
the WCF Adapter Framework. The BizTalk Adapter pack includes:<br />
- SQL Server Adapter. Hi performance sql work, notifications, async reads, writes
etc.<br />
- SAP Adapter – uses the SAP Client APIs (under the hood) to talk directly to SAP.
Very powerful<br />
- SIEBEL Adapter<br />
- Oracle DB Adapter<br />
- Oracle ES Adapter<br /><br />
These adapters are exposed as ‘WCF Bindings’ with BizTalk or a small amount of code,
allows you to expose these adapters as callable WCF Services.<br /><br /><strong>What does this mean in our case here? </strong><br />
If you think about your on-premise Oracle system, we now have a local means of accessing
Oracle and we can then push the message processing (e.g. a new order arrived) into
our ‘cloud’ bridge where we have the immediate benefit of HA + Scale. Do some work
there, and spit the result out any which way you want. Maybe back down to on-premise,
or in a Queue or to Azure Storage.<br /><br /></li>
          <li>
Sign up to <strong>AppFabricLabs – </strong><a href="http://portal.appfabriclabs.com">http://portal.appfabriclabs.com</a> and
provision your ‘servicebus’ service.<br />
This provides your EDI/EAI relay endpoints and also provides a way for you to listen/send
requests to/from the cloud.<br /></li>
          <li>
Here I have used <strong>mickservices </strong>as my ServiceBus namespace.<br /><a href="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_4.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_thumb_1.png" width="644" height="273" /></a><br />
(I created a Queue and a couple of Topics for later use – not really needed here)<br /><strong>Note: grab your HIDDEN KEY details from here – </strong>owner + &lt;key#&gt;<br /></li>
          <li>
From within the Portal <strong>Create a Queue called samples/gettingstarted/queueorders</strong><br /><br /><a href="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_24.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_thumb_11.png" width="834" height="164" /></a><br /></li>
          <li>
            <strong>Register at the EDI Portal</strong> – <a href="http://edi.appfabriclabs.com">http://edi.appfabriclabs.com</a><br />
Even though this says ‘EDI’ think of it as your sandpit. It’s where all your ‘widgets’
live that are to run in Azure Integration Services.<br /><br />
The registration form had me stumped for a little bit. Here’s the details that work.<br /><br /><a href="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_6.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_thumb_2.png" width="704" height="460" /></a><br /><br />
Notice my servicebus namespace – just the first word. I previously had the whole thing,
then variations of it.<br />
Issuer Name: owner<br />
Issuer secret: &lt;the hidden key from above&gt;<br /><br />
Click <strong>save/register</strong> and you should be good here.<br /></li>
          <li>
Once this is done – click on <strong>Settings –&gt; AS2 </strong>and <strong>Enable
AS2 message processing</strong> (which is EDI/HTTP – you might be lucky enough to
get the msgs as XML, but most times no). This will create some endpoints for you <strong>b2bgateway…</strong> style
endpoints.<br /><br /><a href="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_8.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_thumb_3.png" width="1057" height="521" /></a><br /></li>
          <li>
At this stage, have a look under <strong>Resources </strong>and you’ll notice that
it’s empty. <strong>But…</strong>they have <strong>Schemas, Transforms and Certificates.</strong> We’ll
come back to that later.<br /></li>
          <li>
Let’s head to Visual Studio 2010 with the updates installed and open up the Sample
Order Processing project.<br /><br />
I installed my samples under <strong>c:\samples</strong><br /><a href="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_10.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_thumb_4.png" width="244" height="167" /></a><br /><br />
If all opens well you should see:<br /><a href="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_12.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_thumb_5.png" width="301" height="142" /></a><br /><br /><strong>Note: there’s a couple of new items here: </strong>(expand out artifacts)<br /><strong>*.bcs – </strong>Bridge. There’s a <a href="http://msdn.microsoft.com/en-us/library/windowsazure/hh689768.aspx" target="_blank">MSDN
Article describing these</a> – I was like ‘what???’. Basically these are a ‘processing
pipe’ of which various operations can be performed on a message in stages. These stages
are ‘atomic’ and they also have ‘conditions’ as to whether they *need* to be applied
to the said message. So a bridge could take a message, convert it to XML and broadcast
the message out to a Topic.<br /><br />
Opening up the designer – it gets pretty cool I must say!!! 
<br /><br /><a href="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_14.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_thumb_6.png" width="1362" height="595" /></a><br /><strong>Note the ‘operations’ on the LHS</strong>. I must have a play with these guys <img class="wlEmoticon wlEmoticon-smile" style="border-top-style: none; border-bottom-style: none; border-right-style: none; border-left-style: none" alt="Smile" src="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/wlEmoticon-smile_2.png" /> <br />
Another thought – how extensible is this? I’d bet we could write our own widgets to
throw on the design surface as well.<br /><br />
By double clicking on the <strong>BridgeOrders </strong>component, you can see the
designer surface come up with the ‘stage processing’.<br /><br /><a href="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_16.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_thumb_7.png" width="344" height="560" /></a><br /><br />
Here you can see the ‘bridge’ (I wonder if that term will last till the release) will
accept only 2 types of message schemas – PO1 + PO2. Maps them out to a more generic <strong>PO
format</strong>.<br />
The map – XMLTransform from my initial testing only applies one map, the first one
that matches the source schema (this is the same as BizTalk).<br /><br />
Close the bridge view down and leave the <strong>BridgeConfiguration</strong> open.<br /></li>
          <li>
            <strong>Click anywhere on the white surface of the BridgeConfiguration</strong> and
set your <strong>Service Namespace </strong>property from the Properties window (this
guy was hard to find!!)<br />
Put <strong>&lt;your service namespace&gt;</strong> you created originally.<br /><a href="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_18.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_thumb_8.png" width="362" height="126" /></a><br /></li>
          <li>
Save and click <strong>Deploy </strong>and a Deployment window comes up – put your
details in from above.<br /><a href="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_20.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_thumb_9.png" width="442" height="244" /></a><br /><br />
After deployment completes, keep an eye on the Output window as this has all the URLs
you’ll need for the next step. In particular the <strong>BridgeOrders</strong>.<br /><br />
Feel free to go back to your Azure Portal –&gt; Resources and see your deployed bits
in there, Schemas, Transforms etc.<br /><br /></li>
          <li>
            <strong>Running what you’ve built</strong> – sending a message to the ‘bridge’ (here
I’ve borrowed info from the ‘Readme.html’ in the sample project folder)<br />
We don’t need to setup the whole EDI Trading partner piece. – just send messages to
a restful endpoint – aka the bridge.<br /></li>
        </ol>
        <ol>
          <li>
From the samples folder locate the <strong>Tools\MessageSender</strong> project. (you
may have to build it in VS.NET first)</li>
          <li>
from a command prompt run <strong>messagesender.exe 
<br /></strong><a href="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_22.png"><strong><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_thumb_10.png" width="1190" height="53" /></strong></a><br /><br />
In my case it looks like this:<br /><br /><a href="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_28.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_thumb_13.png" width="672" height="335" /></a><br /><br />
Took me a little to get this originally, make sure all your VS.NET stuff is deployed
properly.<br /><br />
So effectively we have sent PO1.xml to our ‘Bridge’ and it’s been accepted, validated
and transformed into ‘something else’ and popped onto a Queue called <strong>Samples/gettingstarted/QueueOrders.<br /><br />
We will now get the message Reader to Read it.<br /></strong></li>
        </ol>
        <li>
From under the <strong>Samples\Tools </strong>folder locate the <strong>MessageReceiver </strong>project
and build if required.</li>
        <li>
From a command prompt at that location, run the following to <strong>Listen</strong> to
the queue<br /><br /><a href="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_30.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_thumb_14.png" width="672" height="335" /></a></li>
        <p>
          <br />
          <br />
        </p>
        <strong>
        </strong>
        <p>
          <br />
          <br />
        </p>
        <p>
          <br />
        </p>
        <p>
          <strong>Wrapping up - </strong>
          <br />
          <br />
Here is obviously a quick walk through of what’s possible, performance, scale and
throughput are other measures that we haven’t got here – given it’s CTP/Labs we’re
not quite ready for that conversation.
</p>
        <p>
BizTalk adapter pack will expose out for e.g. your SAP system to a wider audience
and imagine having restful WCF services to call that provide you customer data in
the format you want…or better still…deliver it straight to you!<br />
(currently in BTS 2010, the adapter pack is licensed separately, it’s part of BTS
standard or enterprise. BTS2009 it *was* licensed separately for RRP $5K. Maybe we’ll
see this as a separate component again.)<br />
Or you could do like the SharePoint team and write a brand new WCF Adapter (‘connector’
in their terms) – ‘Duet’ and spend 18 months doing so.<br /><br />
Some things I’d like to see here is a <strong>Rules Processor</strong> or Engine –
being a long long BizTalk fan, the rules engine is a massive strength of any loosely
coupled solution. The majority of BizTalk solutions I come across don’t employ any
rules engines…or better still, Windows Workflow 2,3+ (but not 4 or 4.5) has a rules
‘executor’ which is very powerful in it’s own right. Who’s heard or used the Policy
shape?
</p>
        <p>
Given that this is a sneak peak at what is on the horizon, this is definitely a space
not to miss.
</p>
        <p>
Get those trial accounts going and enjoy!
</p>
        <p>
In particular I’d like to call out <a href="http://rickgaribay.net/archive/2011/12/16/azure-service-bus-connect-eai-and-edi-ldquointegration-servicesrdquo-ctp.aspx" target="_blank">Rick’s
Article</a> (well done Rick!) for a great read on this space also.
</p>
        <p>
Mick.
</p>
        <img width="0" height="0" src="http://blogs.breeze.net/mickb/aggbug.ashx?id=a0ae34e6-cb75-42c0-9970-05baad02d8f2" />
      </body>
      <title>Azure AppFabric Labs–EAI, Service Bus in the Cloud</title>
      <guid isPermaLink="false">http://blogs.breeze.net/mickb/PermaLink,guid,a0ae34e6-cb75-42c0-9970-05baad02d8f2.aspx</guid>
      <link>http://blogs.breeze.net/mickb/2011/12/17/AzureAppFabricLabsEAIServiceBusInTheCloud.aspx</link>
      <pubDate>Sat, 17 Dec 2011 11:08:00 GMT</pubDate>
      <description>&lt;p&gt;
Well folks – the appfabric labs have come out with a real gem recently.
&lt;/p&gt;
&lt;p&gt;
In CTP we have:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
EDI + EAI processing&lt;/li&gt;
&lt;li&gt;
AS2 http/s endpoints&lt;/li&gt;
&lt;li&gt;
‘Bridges’&lt;/li&gt;
&lt;li&gt;
Transforms&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
and of course the latest version of
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
ServcieBus, Queues and Topics.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
To get the real benefit from this ‘sneak peek’ there’s a bit of setup required. To
those familiar with BizTalk there’s a few EDI screens declaring parties/partners and
agreements you’ll have seen before.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;To get cracking:&lt;/strong&gt;
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Update your local bits with the latest and greatest - &lt;a href="http://msdn.microsoft.com/en-us/library/windowsazure/hh689760.aspx" target="_blank"&gt;Installing
the Windows Azure Service Bus EAI and EDI Labs - December 2011&lt;/a&gt;
&lt;br&gt;
Part of this install is to install the &lt;strong&gt;Service Bus Connect&lt;/strong&gt; component,
which installs the &lt;strong&gt;BizTalk 2010 LOB Adapter pack&lt;/strong&gt;.&lt;br&gt;
&lt;a href="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_2.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_thumb.png" width="644" height="284"&gt;&lt;/a&gt;
&lt;br&gt;
&lt;br&gt;
So this is really quite interesting. As the WCF LOB Adapter SDK provides a framework
for developers to build out ‘adapters’ to connect systems/endpoints through a sync/async
messaging pattern.&lt;br&gt;
&lt;br&gt;
The BizTalk Adapter Pack 2010 is the BizTalk Team set of adapters built on top of
the WCF Adapter Framework. The BizTalk Adapter pack includes:&lt;br&gt;
- SQL Server Adapter. Hi performance sql work, notifications, async reads, writes
etc.&lt;br&gt;
- SAP Adapter – uses the SAP Client APIs (under the hood) to talk directly to SAP.
Very powerful&lt;br&gt;
- SIEBEL Adapter&lt;br&gt;
- Oracle DB Adapter&lt;br&gt;
- Oracle ES Adapter&lt;br&gt;
&lt;br&gt;
These adapters are exposed as ‘WCF Bindings’ with BizTalk or a small amount of code,
allows you to expose these adapters as callable WCF Services.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;What does this mean in our case here? &lt;/strong&gt;
&lt;br&gt;
If you think about your on-premise Oracle system, we now have a local means of accessing
Oracle and we can then push the message processing (e.g. a new order arrived) into
our ‘cloud’ bridge where we have the immediate benefit of HA + Scale. Do some work
there, and spit the result out any which way you want. Maybe back down to on-premise,
or in a Queue or to Azure Storage.&lt;br&gt;
&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
Sign up to &lt;strong&gt;AppFabricLabs – &lt;/strong&gt;&lt;a href="http://portal.appfabriclabs.com"&gt;http://portal.appfabriclabs.com&lt;/a&gt; and
provision your ‘servicebus’ service.&lt;br&gt;
This provides your EDI/EAI relay endpoints and also provides a way for you to listen/send
requests to/from the cloud.&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
Here I have used &lt;strong&gt;mickservices &lt;/strong&gt;as my ServiceBus namespace.&lt;br&gt;
&lt;a href="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_4.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_thumb_1.png" width="644" height="273"&gt;&lt;/a&gt;
&lt;br&gt;
(I created a Queue and a couple of Topics for later use – not really needed here)&lt;br&gt;
&lt;strong&gt;Note: grab your HIDDEN KEY details from here – &lt;/strong&gt;owner + &amp;lt;key#&amp;gt;&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
From within the Portal &lt;strong&gt;Create a Queue called samples/gettingstarted/queueorders&lt;/strong&gt;
&lt;br&gt;
&lt;br&gt;
&lt;a href="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_24.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_thumb_11.png" width="834" height="164"&gt;&lt;/a&gt;
&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Register at the EDI Portal&lt;/strong&gt; – &lt;a href="http://edi.appfabriclabs.com"&gt;http://edi.appfabriclabs.com&lt;/a&gt;
&lt;br&gt;
Even though this says ‘EDI’ think of it as your sandpit. It’s where all your ‘widgets’
live that are to run in Azure Integration Services.&lt;br&gt;
&lt;br&gt;
The registration form had me stumped for a little bit. Here’s the details that work.&lt;br&gt;
&lt;br&gt;
&lt;a href="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_6.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_thumb_2.png" width="704" height="460"&gt;&lt;/a&gt;
&lt;br&gt;
&lt;br&gt;
Notice my servicebus namespace – just the first word. I previously had the whole thing,
then variations of it.&lt;br&gt;
Issuer Name: owner&lt;br&gt;
Issuer secret: &amp;lt;the hidden key from above&amp;gt;&lt;br&gt;
&lt;br&gt;
Click &lt;strong&gt;save/register&lt;/strong&gt; and you should be good here.&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
Once this is done – click on &lt;strong&gt;Settings –&amp;gt; AS2 &lt;/strong&gt;and &lt;strong&gt;Enable
AS2 message processing&lt;/strong&gt; (which is EDI/HTTP – you might be lucky enough to
get the msgs as XML, but most times no). This will create some endpoints for you &lt;strong&gt;b2bgateway…&lt;/strong&gt; style
endpoints.&lt;br&gt;
&lt;br&gt;
&lt;a href="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_8.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_thumb_3.png" width="1057" height="521"&gt;&lt;/a&gt;
&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
At this stage, have a look under &lt;strong&gt;Resources &lt;/strong&gt;and you’ll notice that
it’s empty. &lt;strong&gt;But…&lt;/strong&gt;they have &lt;strong&gt;Schemas, Transforms and Certificates.&lt;/strong&gt; We’ll
come back to that later.&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
Let’s head to Visual Studio 2010 with the updates installed and open up the Sample
Order Processing project.&lt;br&gt;
&lt;br&gt;
I installed my samples under &lt;strong&gt;c:\samples&lt;/strong&gt; 
&lt;br&gt;
&lt;a href="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_10.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_thumb_4.png" width="244" height="167"&gt;&lt;/a&gt;
&lt;br&gt;
&lt;br&gt;
If all opens well you should see:&lt;br&gt;
&lt;a href="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_12.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_thumb_5.png" width="301" height="142"&gt;&lt;/a&gt;
&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;Note: there’s a couple of new items here: &lt;/strong&gt;(expand out artifacts)&lt;br&gt;
&lt;strong&gt;*.bcs – &lt;/strong&gt;Bridge. There’s a &lt;a href="http://msdn.microsoft.com/en-us/library/windowsazure/hh689768.aspx" target="_blank"&gt;MSDN
Article describing these&lt;/a&gt; – I was like ‘what???’. Basically these are a ‘processing
pipe’ of which various operations can be performed on a message in stages. These stages
are ‘atomic’ and they also have ‘conditions’ as to whether they *need* to be applied
to the said message. So a bridge could take a message, convert it to XML and broadcast
the message out to a Topic.&lt;br&gt;
&lt;br&gt;
Opening up the designer – it gets pretty cool I must say!!! 
&lt;br&gt;
&lt;br&gt;
&lt;a href="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_14.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_thumb_6.png" width="1362" height="595"&gt;&lt;/a&gt;
&lt;br&gt;
&lt;strong&gt;Note the ‘operations’ on the LHS&lt;/strong&gt;. I must have a play with these guys &lt;img class="wlEmoticon wlEmoticon-smile" style="border-top-style: none; border-bottom-style: none; border-right-style: none; border-left-style: none" alt="Smile" src="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/wlEmoticon-smile_2.png"&gt;&amp;nbsp;&lt;br&gt;
Another thought – how extensible is this? I’d bet we could write our own widgets to
throw on the design surface as well.&lt;br&gt;
&lt;br&gt;
By double clicking on the &lt;strong&gt;BridgeOrders &lt;/strong&gt;component, you can see the
designer surface come up with the ‘stage processing’.&lt;br&gt;
&lt;br&gt;
&lt;a href="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_16.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_thumb_7.png" width="344" height="560"&gt;&lt;/a&gt;
&lt;br&gt;
&lt;br&gt;
Here you can see the ‘bridge’ (I wonder if that term will last till the release) will
accept only 2 types of message schemas – PO1 + PO2. Maps them out to a more generic &lt;strong&gt;PO
format&lt;/strong&gt;.&lt;br&gt;
The map – XMLTransform from my initial testing only applies one map, the first one
that matches the source schema (this is the same as BizTalk).&lt;br&gt;
&lt;br&gt;
Close the bridge view down and leave the &lt;strong&gt;BridgeConfiguration&lt;/strong&gt; open.&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Click anywhere on the white surface of the BridgeConfiguration&lt;/strong&gt; and
set your &lt;strong&gt;Service Namespace &lt;/strong&gt;property from the Properties window (this
guy was hard to find!!)&lt;br&gt;
Put &lt;strong&gt;&amp;lt;your service namespace&amp;gt;&lt;/strong&gt; you created originally.&lt;br&gt;
&lt;a href="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_18.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_thumb_8.png" width="362" height="126"&gt;&lt;/a&gt;
&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
Save and click &lt;strong&gt;Deploy &lt;/strong&gt;and a Deployment window comes up – put your
details in from above.&lt;br&gt;
&lt;a href="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_20.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_thumb_9.png" width="442" height="244"&gt;&lt;/a&gt;
&lt;br&gt;
&lt;br&gt;
After deployment completes, keep an eye on the Output window as this has all the URLs
you’ll need for the next step. In particular the &lt;strong&gt;BridgeOrders&lt;/strong&gt;.&lt;br&gt;
&lt;br&gt;
Feel free to go back to your Azure Portal –&amp;gt; Resources and see your deployed bits
in there, Schemas, Transforms etc.&lt;br&gt;
&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Running what you’ve built&lt;/strong&gt; – sending a message to the ‘bridge’ (here
I’ve borrowed info from the ‘Readme.html’ in the sample project folder)&lt;br&gt;
We don’t need to setup the whole EDI Trading partner piece. – just send messages to
a restful endpoint – aka the bridge.&lt;br&gt;
&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;
From the samples folder locate the &lt;strong&gt;Tools\MessageSender&lt;/strong&gt; project. (you
may have to build it in VS.NET first)&lt;/li&gt;
&lt;li&gt;
from a command prompt run &lt;strong&gt;messagesender.exe 
&lt;br&gt;
&lt;/strong&gt;&lt;a href="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_22.png"&gt;&lt;strong&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_thumb_10.png" width="1190" height="53"&gt;&lt;/strong&gt;&lt;/a&gt;
&lt;br&gt;
&lt;br&gt;
In my case it looks like this:&lt;br&gt;
&lt;br&gt;
&lt;a href="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_28.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_thumb_13.png" width="672" height="335"&gt;&lt;/a&gt;
&lt;br&gt;
&lt;br&gt;
Took me a little to get this originally, make sure all your VS.NET stuff is deployed
properly.&lt;br&gt;
&lt;br&gt;
So effectively we have sent PO1.xml to our ‘Bridge’ and it’s been accepted, validated
and transformed into ‘something else’ and popped onto a Queue called &lt;strong&gt;Samples/gettingstarted/QueueOrders.&lt;br&gt;
&lt;br&gt;
We will now get the message Reader to Read it.&lt;br&gt;
&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;
From under the &lt;strong&gt;Samples\Tools &lt;/strong&gt;folder locate the &lt;strong&gt;MessageReceiver &lt;/strong&gt;project
and build if required.&lt;/li&gt;
&lt;li&gt;
From a command prompt at that location, run the following to &lt;strong&gt;Listen&lt;/strong&gt; to
the queue&lt;br&gt;
&lt;br&gt;
&lt;a href="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_30.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.breeze.net/mickb/content/binary/Windows-Live-Writer/Azure-AppFabric-LabsEAI-Service-Bus-in-t_11ED4/image_thumb_14.png" width="672" height="335"&gt;&lt;/a&gt;
&lt;/li&gt;&gt;
&lt;p&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/p&gt;
&lt;strong&gt;&lt;/strong&gt; 
&lt;p&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;br&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Wrapping up - &lt;/strong&gt;
&lt;br&gt;
&lt;br&gt;
Here is obviously a quick walk through of what’s possible, performance, scale and
throughput are other measures that we haven’t got here – given it’s CTP/Labs we’re
not quite ready for that conversation.
&lt;/p&gt;
&lt;p&gt;
BizTalk adapter pack will expose out for e.g. your SAP system to a wider audience
and imagine having restful WCF services to call that provide you customer data in
the format you want…or better still…deliver it straight to you!&lt;br&gt;
(currently in BTS 2010, the adapter pack is licensed separately, it’s part of BTS
standard or enterprise. BTS2009 it *was* licensed separately for RRP $5K. Maybe we’ll
see this as a separate component again.)&lt;br&gt;
Or you could do like the SharePoint team and write a brand new WCF Adapter (‘connector’
in their terms) – ‘Duet’ and spend 18 months doing so.&lt;br&gt;
&lt;br&gt;
Some things I’d like to see here is a &lt;strong&gt;Rules Processor&lt;/strong&gt; or Engine –
being a long long BizTalk fan, the rules engine is a massive strength of any loosely
coupled solution. The majority of BizTalk solutions I come across don’t employ any
rules engines…or better still, Windows Workflow 2,3+ (but not 4 or 4.5) has a rules
‘executor’ which is very powerful in it’s own right. Who’s heard or used the Policy
shape?
&lt;/p&gt;
&lt;p&gt;
Given that this is a sneak peak at what is on the horizon, this is definitely a space
not to miss.
&lt;/p&gt;
&lt;p&gt;
Get those trial accounts going and enjoy!
&lt;/p&gt;
&lt;p&gt;
In particular I’d like to call out &lt;a href="http://rickgaribay.net/archive/2011/12/16/azure-service-bus-connect-eai-and-edi-ldquointegration-servicesrdquo-ctp.aspx" target="_blank"&gt;Rick’s
Article&lt;/a&gt; (well done Rick!) for a great read on this space also.
&lt;/p&gt;
&lt;p&gt;
Mick.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.breeze.net/mickb/aggbug.ashx?id=a0ae34e6-cb75-42c0-9970-05baad02d8f2" /&gt;</description>
      <comments>http://blogs.breeze.net/mickb/CommentView,guid,a0ae34e6-cb75-42c0-9970-05baad02d8f2.aspx</comments>
      <category>Async</category>
      <category>BizTalk</category>
      <category>BizTalk/2010 R2</category>
      <category>BizTalk/BizTalk Adapter Pack</category>
      <category>BizTalk/BizTalk Adapter Pack/SAP</category>
    </item>
    <item>
      <trackback:ping>http://blogs.breeze.net/mickb/Trackback.aspx?guid=f85a40cb-5655-4c6f-bf76-8f307d223564</trackback:ping>
      <pingback:server>http://blogs.breeze.net/mickb/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.breeze.net/mickb/PermaLink,guid,f85a40cb-5655-4c6f-bf76-8f307d223564.aspx</pingback:target>
      <dc:creator>Mick Badran</dc:creator>
      <wfw:comment>http://blogs.breeze.net/mickb/CommentView,guid,f85a40cb-5655-4c6f-bf76-8f307d223564.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.breeze.net/mickb/SyndicationService.asmx/GetEntryCommentsRss?guid=f85a40cb-5655-4c6f-bf76-8f307d223564</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
        </p>
        <p>
I hope you’ve all been well over the break and enjoying the ‘thinking time’ – I’ve
been keeping one ear to the ground and just on the lookout for new bits. Here’s one….
</p>
        <p>
The BizTalk team have been busily working hard over the break and produced another
issue of BizTalk at it’s best – <strong>BizTalk Hotrod.</strong></p>
        <p>
          <a href="http://blogs.breezetraining.com.au/mickb/content/2010/BizTalkNextHotrodissueavailable_13B15/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/BizTalkNextHotrodissueavailable_13B15/image_thumb.png" width="644" height="194" />
          </a>
        </p>
        <p>
          <b>
            <a href="http://biztalkhotrod.com/Documents/BizTalkHotrod11_Q4_2010.pdf">http://biztalkhotrod.com/Documents/BizTalkHotrod11_Q4_2010.pdf</a>
          </b>
        </p>
        <p>
          <strong>
          </strong>  
</p>
        <p>
Specifically this issues talks about: 
</p>
        <ul>
          <li>
Async communication with BizTalk across WCF-Duplex messaging. 
</li>
          <li>
Calling SAP RFCs from BizTalk – all you need to know.</li>
        </ul>
        <p>
Guys – the biztalk hotrod mag set is some of the best technical biztalk discussions
around, grab the previous issues and add them to your internal networks. A must.
</p>
        <p>
Enjoy and talk to you soon.
</p>
        <p>
Mick.
</p>
        <img width="0" height="0" src="http://blogs.breeze.net/mickb/aggbug.ashx?id=f85a40cb-5655-4c6f-bf76-8f307d223564" />
      </body>
      <title>BizTalk: Next Hotrod issue available</title>
      <guid isPermaLink="false">http://blogs.breeze.net/mickb/PermaLink,guid,f85a40cb-5655-4c6f-bf76-8f307d223564.aspx</guid>
      <link>http://blogs.breeze.net/mickb/2011/01/09/BizTalkNextHotrodIssueAvailable.aspx</link>
      <pubDate>Sun, 09 Jan 2011 11:24:17 GMT</pubDate>
      <description>&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
I hope you’ve all been well over the break and enjoying the ‘thinking time’ – I’ve
been keeping one ear to the ground and just on the lookout for new bits. Here’s one….
&lt;/p&gt;
&lt;p&gt;
The BizTalk team have been busily working hard over the break and produced another
issue of BizTalk at it’s best – &lt;strong&gt;BizTalk Hotrod.&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blogs.breezetraining.com.au/mickb/content/2010/BizTalkNextHotrodissueavailable_13B15/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/BizTalkNextHotrodissueavailable_13B15/image_thumb.png" width="644" height="194"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;b&gt;&lt;a href="http://biztalkhotrod.com/Documents/BizTalkHotrod11_Q4_2010.pdf"&gt;http://biztalkhotrod.com/Documents/BizTalkHotrod11_Q4_2010.pdf&lt;/a&gt;&lt;/b&gt; 
&lt;p&gt;
&lt;strong&gt;&lt;/strong&gt;&amp;nbsp; 
&lt;p&gt;
Specifically this issues talks about: 
&lt;ul&gt;
&lt;li&gt;
Async communication with BizTalk across WCF-Duplex messaging. 
&lt;li&gt;
Calling SAP RFCs from BizTalk – all you need to know.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Guys – the biztalk hotrod mag set is some of the best technical biztalk discussions
around, grab the previous issues and add them to your internal networks. A must.
&lt;/p&gt;
&lt;p&gt;
Enjoy and talk to you soon.
&lt;/p&gt;
&lt;p&gt;
Mick.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.breeze.net/mickb/aggbug.ashx?id=f85a40cb-5655-4c6f-bf76-8f307d223564" /&gt;</description>
      <comments>http://blogs.breeze.net/mickb/CommentView,guid,f85a40cb-5655-4c6f-bf76-8f307d223564.aspx</comments>
      <category>BizTalk</category>
      <category>BizTalk/2010</category>
      <category>BizTalk/BizTalk Adapter Pack/SAP</category>
      <category>BizTalk/Insights</category>
      <category>Tips</category>
    </item>
    <item>
      <trackback:ping>http://blogs.breeze.net/mickb/Trackback.aspx?guid=4a8b5e42-60b2-4c8d-bbd7-1bc6258634e1</trackback:ping>
      <pingback:server>http://blogs.breeze.net/mickb/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.breeze.net/mickb/PermaLink,guid,4a8b5e42-60b2-4c8d-bbd7-1bc6258634e1.aspx</pingback:target>
      <dc:creator>Mick Badran</dc:creator>
      <georss:point>0 0</georss:point>
      <wfw:comment>http://blogs.breeze.net/mickb/CommentView,guid,4a8b5e42-60b2-4c8d-bbd7-1bc6258634e1.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.breeze.net/mickb/SyndicationService.asmx/GetEntryCommentsRss?guid=4a8b5e42-60b2-4c8d-bbd7-1bc6258634e1</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Wow! I'm finally through the other side... what a quest and I thought I'd share some
of the details with you.
</p>
        <p>
          <strong>RFC_READ_TABLE </strong>rfc can be used to call into SAP and retrieve table
data - *sort of* (and that's a big sort of) like a 'DataSet'.
</p>
        <p>
Using it requires a little work and understanding.
</p>
        <p>
In your either BizTalk project or other project from VS.NET:
</p>
        <ol>
          <li>
            <strong>Add the SAP bits to your VS.NET project </strong>- ready for action 
<ol><li>
select 'Add Adapter Service Reference' (for BTS projects -&gt; Add New Generated
Item-&gt;Consume Service Adapter...)<br /></li><li>
On the Binding Wizard Screen select <strong>sapBinding</strong> and configure the
appropriate connection string details such as:<br /><font color="#0000ff" size="2"><font color="#0000ff" size="2"><p>
string
</p></font></font><font color="#000000" size="2"> sapUri = </font><font color="#a31515" size="2"><font color="#a31515" size="2">"sap://CLIENT=800;LANG=EN;@A/sapsrv/00?GWHOST=sapsrv&amp;GWSERV=sapgw00&amp;RfcSdkTrace=true"</font></font><font size="2"><font color="#000000">;<br />
&lt;You need to stick your own sapURI above - that is more or less a sample&gt;</font></font></li><li>
Click on the <strong>Connect</strong> and under <strong>RFC-&gt;OTHER</strong> , select <strong>RFC_READ_TABLE </strong>(or
you can type it in the box to search) 
</li><li>
Click <strong>Ok</strong> to generate the proxy and other details. 
</li><li>
Either your BizTalk Project or your non-BTS project has now all the relevant details
to communicate to SAP.<br /><br />
I tend to build out all this functionality first in a <strong>Console App</strong> just
so I know what is needed within the BTS environment, also I find it much quicker to
test/debug etc. here.<br /></li></ol></li>
          <li>
Ok - onto the code. I've got 2 routines for you, one that uses the Proxy Classes built
by the wizard in the last step, and a routine from 'first principles'.<br /><br />
One of the things that I really like about the <strong>BTS Adapter Pack</strong> and
certainly in this case, is that depending on the shape of the XML you pass to the
adapter, it determines the table and type of operation that it is to do.<br /><br />
Both of these examples below you could wrap into a functoid/helper/whatever and use
directly from code.<br /></li>
          <li>
Proxy Code - version 1 - here I define some parameters and make a straight call to
the table <strong>CSKS</strong>. 
<br /><strong>NOTE: </strong>Use <strong>FieldNames </strong>not Field Labels (took me a
few hrs on that one ;)<br /><br /><font color="#0000ff" size="2"><font color="#0000ff" size="2"><p>
using
</p></font></font><font size="2"><font color="#000000"> LOBTYPES = microsoft.lobservices.sap._2007._03.Types.Rfc;</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2"><p dir="ltr" style="MARGIN-RIGHT: 0px">
private
</p></font></font><font color="#000000" size="2"></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">static</font></font><font color="#000000" size="2"></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">void</font></font><font size="2"><font color="#000000"> GetDataFromSAP()<br /></font>{  
<br />
     </font><font color="#2b91af" size="2"><font color="#2b91af" size="2">RfcClient</font></font><font size="2"> clnt
= </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">new</font></font><font size="2"></font><font color="#2b91af" size="2"><font color="#2b91af" size="2">RfcClient</font></font><font size="2">();
//myproxy client<br />
     </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">string</font></font><font size="2">[]
data = GetAppDetailsForCurrentUser(</font><font color="#a31515" size="2"><font color="#a31515" size="2">"SAP"</font></font><font size="2">);<br />
     clnt.ClientCredentials.UserName.UserName = data[0];<br />
     clnt.ClientCredentials.UserName.Password = data[1];<br />
     LOBTYPES.</font><font color="#2b91af" size="2"><font color="#2b91af" size="2">TAB512</font></font><font size="2">[]
rfcData = </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">new</font></font><font size="2"> microsoft.lobservices.sap._2007._03.Types.Rfc.</font><font color="#2b91af" size="2"><font color="#2b91af" size="2">TAB512</font></font><font size="2">[0];<br />
     LOBTYPES.</font><font color="#2b91af" size="2"><font color="#2b91af" size="2">RFC_DB_OPT</font></font><font size="2">[]
rfcOps = </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">new</font></font><font size="2"> microsoft.lobservices.sap._2007._03.Types.Rfc.</font><font color="#2b91af" size="2"><font color="#2b91af" size="2">RFC_DB_OPT</font></font><font size="2">[0];<br />
     LOBTYPES.</font><font color="#2b91af" size="2"><font color="#2b91af" size="2">RFC_DB_FLD</font></font><font size="2">[]
rfcFlds = </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">new</font></font><font size="2"> microsoft.lobservices.sap._2007._03.Types.Rfc.</font><font color="#2b91af" size="2"><font color="#2b91af" size="2">RFC_DB_FLD</font></font><font size="2">[]<br />
     { <br />
         n</font><font color="#0000ff" size="2"><font color="#0000ff" size="2">ew</font></font><font size="2"> LOBTYPES.</font><font color="#2b91af" size="2"><font color="#2b91af" size="2">RFC_DB_FLD</font></font><font size="2">()
{ 
<br />
         FIELDNAME = </font><font color="#a31515" size="2"><font color="#a31515" size="2">"KOSTL"</font></font><font size="2">,<br />
         LENGTH=10<br />
         },<br />
         </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">new</font></font><font size="2"> LOBTYPES.</font><font color="#2b91af" size="2"><font color="#2b91af" size="2">RFC_DB_FLD</font></font><font size="2">()
{<br />
         FIELDNAME = </font><font color="#a31515" size="2"><font color="#a31515" size="2">"DATBI"</font></font><font size="2">,<br />
         LENGTH=8<br />
         },<br />
         </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">new</font></font><font size="2"> LOBTYPES.</font><font color="#2b91af" size="2"><font color="#2b91af" size="2">RFC_DB_FLD</font></font><font size="2">()
{<br />
         FIELDNAME = </font><font color="#a31515" size="2"><font color="#a31515" size="2">"DATAB"</font></font><font size="2">,<br />
         LENGTH=8<br />
         }<br />
     };<br /></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">try<br /></font></font><font size="2">{<br />
  clnt.Open();<br />
  clnt.RFC_READ_TABLE(</font><font color="#a31515" size="2"><font color="#a31515" size="2">";"</font></font><font size="2">, </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">string</font></font><font size="2">.Empty, </font><font color="#a31515" size="2"><font color="#a31515" size="2">"CSKS"</font></font><font size="2">,
50, 0,</font><font color="#0000ff" size="2"><font color="#0000ff" size="2">ref</font></font><font size="2"> rfcData, </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">ref</font></font><font size="2"> rfcFlds, </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">ref</font></font><font size="2"> rfcOps);<br /></font><font color="#2b91af" size="2"><font color="#2b91af" size="2">  Console</font></font><font size="2">.WriteLine(</font><font color="#a31515" size="2"><font color="#a31515" size="2">"RFC
RESPONSE\r\n\r\nData:"</font></font><font size="2"> + rfcData.Length.ToString());<br />
}<br /></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">catch</font></font><font size="2"> (</font><font color="#2b91af" size="2"><font color="#2b91af" size="2">Exception</font></font><font size="2"> ex)<br />
 {<br /></font><font color="#2b91af" size="2"><font color="#2b91af" size="2">  
Console</font></font><font size="2">.WriteLine(</font><font color="#a31515" size="2"><font color="#a31515" size="2">"ERROR:
"</font></font><font size="2"> + ex.Message);<br />
 }<br />
}
</font></li>
          <li>
More from first principles so this is to give you more of a BTS picture.<br /><strong>NOTE: The use of the '%' sign </strong>to get a wildcard match on a KOSTL
field, despite in the SAP Client UI the users enter a '*'<br /><br /><font color="#0000ff" size="2"><font color="#0000ff" size="2"><p>
private
</p></font></font><font color="#000000" size="2"></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">static</font></font><font color="#000000" size="2"></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">void</font></font><font size="2"><font color="#000000"> GetDataFromSAPV1()<br /></font>{<br /></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">   
string</font></font><font size="2">[] data = GetAppDetailsForCurrentUser(</font><font color="#a31515" size="2"><font color="#a31515" size="2">"SAP"</font></font><font size="2">);<br /></font><font color="#2b91af" size="2"><font color="#2b91af" size="2">   
SAPBinding</font></font><font size="2"> binding = </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">new</font></font><font size="2"></font><font color="#2b91af" size="2"><font color="#2b91af" size="2">SAPBinding</font></font><font size="2">(); 
//A reference to Microsoft.Adapters.Sap is needed.<br /></font><font color="#008000" size="2"><font color="#008000" size="2">   
//set up an endpoint address<br />
    </font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">string</font></font><font size="2"> sapUri
= </font><font color="#a31515" size="2"><font color="#a31515" size="2">"sap://CLIENT=800;LANG=EN;@A/sapsrv/00?GWHOST=sapsrv&amp;GWSERV=sapgw00&amp;RfcSdkTrace=true"</font></font><font size="2">;<br /></font><font color="#2b91af" size="2"><font color="#2b91af" size="2">   
EndpointAddress</font></font><font size="2"> address = </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">new</font></font><font size="2"></font><font color="#2b91af" size="2"><font color="#2b91af" size="2">EndpointAddress</font></font><font size="2">(sapUri);<br />
    </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">try<br /></font></font><font size="2">    {<br /></font><font color="#2b91af" size="2"><font color="#2b91af" size="2">       
ChannelFactory</font></font><font size="2">&lt;</font><font color="#2b91af" size="2"><font color="#2b91af" size="2">IRequestChannel</font></font><font size="2">&gt;
fact = </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">new</font></font><font size="2"></font><font color="#2b91af" size="2"><font color="#2b91af" size="2">ChannelFactory</font></font><font size="2">&lt;</font><font color="#2b91af" size="2"><font color="#2b91af" size="2">IRequestChannel</font></font><font size="2">&gt;(binding </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">as</font></font><font size="2"></font><font color="#2b91af" size="2"><font color="#2b91af" size="2">Binding</font></font><font size="2">,
address);<br /></font><font color="#008000" size="2"><font color="#008000" size="2">       
// add credentials<br /></font></font><font size="2">        fact.Credentials.UserName.UserName
= data[0];<br />
        fact.Credentials.UserName.Password = data[1];<br /></font><font color="#008000" size="2"><font color="#008000" size="2">       
// Open client<br /></font></font><font size="2">        fact.Open();<br /></font><font color="#008000" size="2"><font color="#008000" size="2">       
//get a channel from the factory<br /></font></font><font color="#2b91af" size="2"><font color="#2b91af" size="2">       
IRequestChannel</font></font><font size="2"> irc = fact.CreateChannel();<br /></font><font color="#008000" size="2"><font color="#008000" size="2">       
//open the channel<br /></font></font><font size="2">        irc.Open();<br /></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">       
string</font></font><font size="2"> inputXml = </font><font color="#a31515" size="2"><font color="#a31515" size="2">"&lt;RFC_READ_TABLE
xmlns='http://Microsoft.LobServices.Sap/2007/03/Rfc/' xmlns:ns1='http://Microsoft.LobServices.Sap/2007/03/Types/Rfc/'&gt;"<br />
        </font></font><font size="2">+ </font><font color="#a31515" size="2"><font color="#a31515" size="2">"&lt;DELIMITER&gt;|&lt;/DELIMITER&gt;"<br /></font></font><font size="2">        + </font><font color="#a31515" size="2"><font color="#a31515" size="2">"&lt;QUERY_TABLE&gt;CSKS&lt;/QUERY_TABLE&gt;"<br /></font></font><font size="2">        + </font><font color="#a31515" size="2"><font color="#a31515" size="2">"&lt;ROWCOUNT&gt;10&lt;/ROWCOUNT&gt;&lt;ROWSKIPS&gt;0&lt;/ROWSKIPS&gt;"<br /></font></font><font size="2">        + </font><font color="#a31515" size="2"><font color="#a31515" size="2">"&lt;DATA
/&gt;&lt;FIELDS&gt;"<br /></font></font><font size="2">        + </font><font color="#a31515" size="2"><font color="#a31515" size="2">"&lt;ns1:RFC_DB_FLD&gt;&lt;ns1:FIELDNAME&gt;KOSTL&lt;/ns1:FIELDNAME&gt;&lt;/ns1:RFC_DB_FLD&gt;"<br /></font></font><font size="2">        + </font><font color="#a31515" size="2"><font color="#a31515" size="2">"&lt;ns1:RFC_DB_FLD&gt;&lt;ns1:FIELDNAME&gt;DATAB&lt;/ns1:FIELDNAME&gt;&lt;/ns1:RFC_DB_FLD&gt;"<br /></font></font><font size="2">        + </font><font color="#a31515" size="2"><font color="#a31515" size="2">"&lt;ns1:RFC_DB_FLD&gt;&lt;ns1:FIELDNAME&gt;DATBI&lt;/ns1:FIELDNAME&gt;&lt;/ns1:RFC_DB_FLD&gt;"<br /></font></font><font size="2">        + </font><font color="#a31515" size="2"><font color="#a31515" size="2">"&lt;/FIELDS&gt;"<br /></font></font><font size="2">        + </font><font color="#a31515" size="2"><font color="#a31515" size="2">"&lt;OPTIONS&gt;"<br /></font></font><font size="2">        + </font><font color="#a31515" size="2"><font color="#a31515" size="2">"&lt;ns1:RFC_DB_OPT&gt;&lt;ns1:TEXT&gt;KOSTL
LIKE '1234%' AND BUKRS EQ '63' AND KOKRS EQ 'APPL'&lt;/ns1:TEXT&gt;&lt;/ns1:RFC_DB_OPT&gt;"<br /></font></font><font size="2">        + </font><font color="#a31515" size="2"><font color="#a31515" size="2">"&lt;/OPTIONS&gt;"<br /></font></font><font size="2">        + </font><font color="#a31515" size="2"><font color="#a31515" size="2">"&lt;/RFC_READ_TABLE&gt;"</font></font><font size="2">;<br /></font><font color="#008000" size="2"><font color="#008000" size="2">       
//create an XML reader from the input XML<br /></font></font><font color="#2b91af" size="2"><font color="#2b91af" size="2">       
XmlReader</font></font><font size="2"> reader = </font><font color="#2b91af" size="2"><font color="#2b91af" size="2">XmlReader</font></font><font size="2">.Create(</font><font color="#0000ff" size="2"><font color="#0000ff" size="2">new</font></font><font size="2"></font><font color="#2b91af" size="2"><font color="#2b91af" size="2">MemoryStream</font></font><font size="2">(</font><font color="#2b91af" size="2"><font color="#2b91af" size="2">Encoding</font></font><font size="2">.Default.GetBytes(inputXml)));<br /></font><font color="#008000" size="2"><font color="#008000" size="2">       
//create a WCF message from our XML reader<br /></font></font><font color="#2b91af" size="2"><font color="#2b91af" size="2">       
Message</font></font><font size="2"> inputMessge = </font><font color="#2b91af" size="2"><font color="#2b91af" size="2">Message</font></font><font size="2">.CreateMessage(<br /></font><font color="#2b91af" size="2"><font color="#2b91af" size="2">                    
MessageVersion</font></font><font size="2">.Soap11, 
<br /></font><font color="#a31515" size="2"><font color="#a31515" size="2">                     <a href="http://Microsoft.LobServices.Sap/2007/03/Rfc/RFC_READ_TABLE">http://Microsoft.LobServices.Sap/2007/03/Rfc/RFC_READ_TABLE</a></font></font><font size="2">, 
<br />
                    
reader);<br /></font><font color="#008000" size="2"><font color="#008000" size="2">       
//send the message to SAP and obtain a reply<br /></font></font><font color="#2b91af" size="2"><font color="#2b91af" size="2">       
Message</font></font><font size="2"> replyMessage = irc.Request(inputMessge);<br /></font><font color="#008000" size="2"><font color="#008000" size="2">       
//create a new XML document<br /></font></font><font color="#2b91af" size="2"><font color="#2b91af" size="2">       
XmlDocument</font></font><font size="2"> xdoc = </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">new</font></font><font size="2"></font><font color="#2b91af" size="2"><font color="#2b91af" size="2">XmlDocument</font></font><font size="2">();<br /></font><font color="#008000" size="2"><font color="#008000" size="2">       
//load the XML document with the XML reader from the output message received from
SAP<br /></font></font><font size="2">        xdoc.Load(replyMessage.GetReaderAtBodyContents());<br /></font><font color="#2b91af" size="2"><font color="#2b91af" size="2">       
XmlNodeList</font></font><font size="2"> nds = xdoc.DocumentElement.SelectNodes(</font><font color="#a31515" size="2"><font color="#a31515" size="2">"//*[local-name()='WA']"</font></font><font size="2">);<br /></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">        foreach</font></font><font size="2"> (</font><font color="#2b91af" size="2"><font color="#2b91af" size="2">XmlNode</font></font><font size="2"> nd </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">in</font></font><font size="2"> nds)<br />
        {<br /></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">               
string</font></font><font size="2">[] parts = nd.InnerText.Split(</font><font color="#a31515" size="2"><font color="#a31515" size="2">'|'</font></font><font size="2">);<br /></font><font color="#2b91af" size="2"><font color="#2b91af" size="2">               
Console</font></font><font size="2">.WriteLine(</font><font color="#a31515" size="2"><font color="#a31515" size="2">"CC={0}
From: {1} To: {2}"</font></font><font size="2">, parts[0], parts[1], parts[2]);<br />
         }<br />
         xdoc.Save(</font><font color="#a31515" size="2"><font color="#a31515" size="2">@"d:\sapout.xml"</font></font><font size="2">);<br />
         irc.Close();<br />
         fact.Close();<br />
    }
<p></p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">catch</font></font><font size="2"> (</font><font color="#2b91af" size="2"><font color="#2b91af" size="2">Exception</font></font><font size="2"> ex)<br />
{<br /></font><font color="#2b91af" size="2"><font color="#2b91af" size="2">        
Console</font></font><font size="2">.WriteLine(</font><font color="#a31515" size="2"><font color="#a31515" size="2">"ERROR:
"</font></font><font size="2"> + ex.Message);<br />
}<br />
}
</font><br /></li>
        </ol>
        <img width="0" height="0" src="http://blogs.breeze.net/mickb/aggbug.ashx?id=4a8b5e42-60b2-4c8d-bbd7-1bc6258634e1" />
      </body>
      <title>BizTalk: Calling SAP RFC_READ_TABLE with the BizTalk Adapter Pack</title>
      <guid isPermaLink="false">http://blogs.breeze.net/mickb/PermaLink,guid,4a8b5e42-60b2-4c8d-bbd7-1bc6258634e1.aspx</guid>
      <link>http://blogs.breeze.net/mickb/2010/05/12/BizTalkCallingSAPRFCREADTABLEWithTheBizTalkAdapterPack.aspx</link>
      <pubDate>Wed, 12 May 2010 05:54:57 GMT</pubDate>
      <description>&lt;p&gt;
Wow! I'm finally through the other side... what a quest and I thought I'd share some
of the details with you.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;RFC_READ_TABLE &lt;/strong&gt;rfc can be used to call into SAP and retrieve table
data - *sort of* (and that's a big sort of) like a 'DataSet'.
&lt;/p&gt;
&lt;p&gt;
Using it requires a little work and understanding.
&lt;/p&gt;
&lt;p&gt;
In your either BizTalk project or other project from VS.NET:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Add the SAP bits to your VS.NET project &lt;/strong&gt;- ready for action 
&lt;ol&gt;
&lt;li&gt;
select 'Add&amp;nbsp;Adapter Service Reference' (for BTS projects -&amp;gt; Add New Generated
Item-&amp;gt;Consume Service Adapter...)&lt;br&gt;
&lt;li&gt;
On the Binding Wizard Screen select &lt;strong&gt;sapBinding&lt;/strong&gt; and configure the
appropriate connection string details such as:&lt;br&gt;
&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt; 
&lt;p&gt;
string
&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt; sapUri = &lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;"sap://CLIENT=800;LANG=EN;@A/sapsrv/00?GWHOST=sapsrv&amp;amp;GWSERV=sapgw00&amp;amp;RfcSdkTrace=true"&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&lt;font color=#000000&gt;;&lt;br&gt;
&amp;lt;You need to stick your own sapURI above - that is more or less a sample&amp;gt;&lt;/font&gt;&gt;
&lt;/font&gt; 
&lt;li&gt;
Click on the &lt;strong&gt;Connect&lt;/strong&gt; and under &lt;strong&gt;RFC-&amp;gt;OTHER&lt;/strong&gt; , select &lt;strong&gt;RFC_READ_TABLE &lt;/strong&gt;(or
you can type it in the box to search) 
&lt;li&gt;
Click &lt;strong&gt;Ok&lt;/strong&gt; to generate the proxy and other details. 
&lt;li&gt;
Either your BizTalk Project or your non-BTS project has now all the relevant details
to communicate to SAP.&lt;br&gt;
&lt;br&gt;
I tend to build out all this functionality first in a &lt;strong&gt;Console App&lt;/strong&gt; just
so I know what is needed within the BTS environment, also I find it much quicker to
test/debug etc. here.&lt;br&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;
Ok - onto the code. I've got 2 routines for you, one that uses the Proxy Classes built
by the wizard in the last step, and a routine from 'first principles'.&lt;br&gt;
&lt;br&gt;
One of the things that I really like about the &lt;strong&gt;BTS Adapter Pack&lt;/strong&gt; and
certainly in this case, is that depending on the shape of the XML you pass to the
adapter, it determines the table and type of operation that it is to do.&lt;br&gt;
&lt;br&gt;
Both of these examples below you could wrap into a functoid/helper/whatever and use
directly from code.&lt;br&gt;
&lt;li&gt;
Proxy Code - version 1 - here I define some parameters and make a straight call to
the table &lt;strong&gt;CSKS&lt;/strong&gt;. 
&lt;br&gt;
&lt;strong&gt;NOTE: &lt;/strong&gt;Use &lt;strong&gt;FieldNames &lt;/strong&gt;not Field Labels (took me a
few hrs on that one ;)&lt;br&gt;
&lt;br&gt;
&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt; 
&lt;p&gt;
using
&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&lt;font color=#000000&gt; LOBTYPES = microsoft.lobservices.sap._2007._03.Types.Rfc;&lt;/font&gt;&gt;
&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt; 
&lt;p dir=ltr style="MARGIN-RIGHT: 0px"&gt;
private
&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;static&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;void&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&lt;font color=#000000&gt; GetDataFromSAP()&lt;br&gt;
&lt;/font&gt;{&amp;nbsp; 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;RfcClient&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; clnt
= &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;new&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; &lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;RfcClient&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;();
//myproxy client&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;[]
data = GetAppDetailsForCurrentUser(&lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;"SAP"&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clnt.ClientCredentials.UserName.UserName = data[0];&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clnt.ClientCredentials.UserName.Password = data[1];&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOBTYPES.&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;TAB512&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;[]
rfcData = &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;new&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; microsoft.lobservices.sap._2007._03.Types.Rfc.&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;TAB512&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;[0];&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOBTYPES.&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;RFC_DB_OPT&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;[]
rfcOps = &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;new&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; microsoft.lobservices.sap._2007._03.Types.Rfc.&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;RFC_DB_OPT&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;[0];&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOBTYPES.&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;RFC_DB_FLD&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;[]
rfcFlds = &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;new&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; microsoft.lobservices.sap._2007._03.Types.Rfc.&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;RFC_DB_FLD&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;[]&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;&amp;nbsp;&amp;nbsp; n&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;ew&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; LOBTYPES.&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;RFC_DB_FLD&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;()
{ 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FIELDNAME = &lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;"KOSTL"&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LENGTH=10&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;new&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; LOBTYPES.&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;RFC_DB_FLD&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;()
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FIELDNAME = &lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;"DATBI"&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LENGTH=8&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;new&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; LOBTYPES.&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;RFC_DB_FLD&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;()
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FIELDNAME = &lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;"DATAB"&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LENGTH=8&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; };&lt;br&gt;
&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;try&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;{&lt;br&gt;
&amp;nbsp; clnt.Open();&lt;br&gt;
&amp;nbsp; clnt.RFC_READ_TABLE(&lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;";"&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;, &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;.Empty, &lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;"CSKS"&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;,
50, 0,&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;ref&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; rfcData, &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;ref&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; rfcFlds, &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;ref&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; rfcOps);&lt;br&gt;
&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;&amp;nbsp; Console&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;.WriteLine(&lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;"RFC
RESPONSE\r\n\r\nData:"&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; + rfcData.Length.ToString());&lt;br&gt;
}&lt;br&gt;
&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;catch&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; (&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;Exception&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; ex)&lt;br&gt;
&amp;nbsp;{&lt;br&gt;
&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;&amp;nbsp;&amp;nbsp; Console&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;.WriteLine(&lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;"ERROR:
"&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; + ex.Message);&lt;br&gt;
&amp;nbsp;}&lt;br&gt;
}&gt;
&lt;/font&gt; 
&lt;li&gt;
More from first principles so this is to give you more of a BTS picture.&lt;br&gt;
&lt;strong&gt;NOTE: The use of the '%' sign &lt;/strong&gt;to get a wildcard match on a KOSTL
field, despite in the SAP Client UI the users enter a '*'&lt;br&gt;
&lt;br&gt;
&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt; 
&lt;p&gt;
private
&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;static&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;void&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&lt;font color=#000000&gt; GetDataFromSAPV1()&lt;br&gt;
&lt;/font&gt;{&lt;br&gt;
&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; string&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;[]
data = GetAppDetailsForCurrentUser(&lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;"SAP"&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;);&lt;br&gt;
&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SAPBinding&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; binding
= &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;new&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; &lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;SAPBinding&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;();&amp;nbsp;
//A reference to Microsoft.Adapters.Sap is needed.&lt;br&gt;
&lt;/font&gt;&lt;font color=#008000 size=2&gt;&lt;font color=#008000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //set
up an endpoint address&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; sapUri
= &lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;"sap://CLIENT=800;LANG=EN;@A/sapsrv/00?GWHOST=sapsrv&amp;amp;GWSERV=sapgw00&amp;amp;RfcSdkTrace=true"&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;;&lt;br&gt;
&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EndpointAddress&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; address
= &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;new&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; &lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;EndpointAddress&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;(sapUri);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;try&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
ChannelFactory&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&amp;lt;&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;IRequestChannel&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&amp;gt;
fact = &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;new&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; &lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;ChannelFactory&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&amp;lt;&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;IRequestChannel&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&amp;gt;(binding &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;as&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; &lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;Binding&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;,
address);&lt;br&gt;
&lt;/font&gt;&lt;font color=#008000 size=2&gt;&lt;font color=#008000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
// add credentials&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fact.Credentials.UserName.UserName
= data[0];&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fact.Credentials.UserName.Password = data[1];&lt;br&gt;
&lt;/font&gt;&lt;font color=#008000 size=2&gt;&lt;font color=#008000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
// Open client&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fact.Open();&lt;br&gt;
&lt;/font&gt;&lt;font color=#008000 size=2&gt;&lt;font color=#008000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
//get a channel from the factory&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
IRequestChannel&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; irc = fact.CreateChannel();&lt;br&gt;
&lt;/font&gt;&lt;font color=#008000 size=2&gt;&lt;font color=#008000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
//open the channel&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; irc.Open();&lt;br&gt;
&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
string&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; inputXml = &lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;"&amp;lt;RFC_READ_TABLE
xmlns='http://Microsoft.LobServices.Sap/2007/03/Rfc/' xmlns:ns1='http://Microsoft.LobServices.Sap/2007/03/Types/Rfc/'&amp;gt;"&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;+ &lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;"&amp;lt;DELIMITER&amp;gt;|&amp;lt;/DELIMITER&amp;gt;"&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + &lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;"&amp;lt;QUERY_TABLE&amp;gt;CSKS&amp;lt;/QUERY_TABLE&amp;gt;"&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + &lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;"&amp;lt;ROWCOUNT&amp;gt;10&amp;lt;/ROWCOUNT&amp;gt;&amp;lt;ROWSKIPS&amp;gt;0&amp;lt;/ROWSKIPS&amp;gt;"&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + &lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;"&amp;lt;DATA
/&amp;gt;&amp;lt;FIELDS&amp;gt;"&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + &lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;"&amp;lt;ns1:RFC_DB_FLD&amp;gt;&amp;lt;ns1:FIELDNAME&amp;gt;KOSTL&amp;lt;/ns1:FIELDNAME&amp;gt;&amp;lt;/ns1:RFC_DB_FLD&amp;gt;"&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + &lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;"&amp;lt;ns1:RFC_DB_FLD&amp;gt;&amp;lt;ns1:FIELDNAME&amp;gt;DATAB&amp;lt;/ns1:FIELDNAME&amp;gt;&amp;lt;/ns1:RFC_DB_FLD&amp;gt;"&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + &lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;"&amp;lt;ns1:RFC_DB_FLD&amp;gt;&amp;lt;ns1:FIELDNAME&amp;gt;DATBI&amp;lt;/ns1:FIELDNAME&amp;gt;&amp;lt;/ns1:RFC_DB_FLD&amp;gt;"&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + &lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;"&amp;lt;/FIELDS&amp;gt;"&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + &lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;"&amp;lt;OPTIONS&amp;gt;"&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + &lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;"&amp;lt;ns1:RFC_DB_OPT&amp;gt;&amp;lt;ns1:TEXT&amp;gt;KOSTL
LIKE '1234%' AND BUKRS EQ '63' AND KOKRS EQ 'APPL'&amp;lt;/ns1:TEXT&amp;gt;&amp;lt;/ns1:RFC_DB_OPT&amp;gt;"&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + &lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;"&amp;lt;/OPTIONS&amp;gt;"&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;+ &lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;"&amp;lt;/RFC_READ_TABLE&amp;gt;"&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;;&lt;br&gt;
&lt;/font&gt;&lt;font color=#008000 size=2&gt;&lt;font color=#008000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
//create an XML reader from the input XML&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
XmlReader&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; reader = &lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;XmlReader&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;.Create(&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;new&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; &lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;MemoryStream&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;(&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;Encoding&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;.Default.GetBytes(inputXml)));&lt;br&gt;
&lt;/font&gt;&lt;font color=#008000 size=2&gt;&lt;font color=#008000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
//create a WCF message from our XML reader&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Message&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; inputMessge = &lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;Message&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;.CreateMessage(&lt;br&gt;
&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
MessageVersion&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;.Soap11, 
&lt;br&gt;
&lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="http://Microsoft.LobServices.Sap/2007/03/Rfc/RFC_READ_TABLE"&gt;http://Microsoft.LobServices.Sap/2007/03/Rfc/RFC_READ_TABLE&lt;/a&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=2&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;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
reader);&lt;br&gt;
&lt;/font&gt;&lt;font color=#008000 size=2&gt;&lt;font color=#008000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
//send the message to SAP and obtain a reply&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Message&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; replyMessage = irc.Request(inputMessge);&lt;br&gt;
&lt;/font&gt;&lt;font color=#008000 size=2&gt;&lt;font color=#008000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
//create a new XML document&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
XmlDocument&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; xdoc = &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;new&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; &lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;XmlDocument&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;();&lt;br&gt;
&lt;/font&gt;&lt;font color=#008000 size=2&gt;&lt;font color=#008000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
//load the XML document with the XML reader from the output message received from
SAP&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xdoc.Load(replyMessage.GetReaderAtBodyContents());&lt;br&gt;
&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
XmlNodeList&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; nds = xdoc.DocumentElement.SelectNodes(&lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;"//*[local-name()='WA']"&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;);&lt;br&gt;
&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;foreach&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; (&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;XmlNode&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; nd &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;in&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; nds)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
string&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;[] parts = nd.InnerText.Split(&lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;'|'&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;);&lt;br&gt;
&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Console&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;.WriteLine(&lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;"CC={0}
From: {1} To: {2}"&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;, parts[0], parts[1], parts[2]);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;&amp;nbsp;&amp;nbsp; xdoc.Save(&lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;@"d:\sapout.xml"&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; irc.Close();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fact.Close();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&gt;
&lt;p&gt;
&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;catch&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; (&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;Exception&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; ex)&lt;br&gt;
{&lt;br&gt;
&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Console&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;.WriteLine(&lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;"ERROR:
"&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; + ex.Message);&lt;br&gt;
}&lt;br&gt;
}&gt;
&lt;/font&gt;
&lt;br&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;img width="0" height="0" src="http://blogs.breeze.net/mickb/aggbug.ashx?id=4a8b5e42-60b2-4c8d-bbd7-1bc6258634e1" /&gt;</description>
      <comments>http://blogs.breeze.net/mickb/CommentView,guid,4a8b5e42-60b2-4c8d-bbd7-1bc6258634e1.aspx</comments>
      <category>BizTalk</category>
      <category>BizTalk/BizTalk Adapter Pack</category>
      <category>BizTalk/BizTalk Adapter Pack/SAP</category>
    </item>
    <item>
      <trackback:ping>http://blogs.breeze.net/mickb/Trackback.aspx?guid=141884ed-0117-4e3b-bccd-074fd4072af1</trackback:ping>
      <pingback:server>http://blogs.breeze.net/mickb/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.breeze.net/mickb/PermaLink,guid,141884ed-0117-4e3b-bccd-074fd4072af1.aspx</pingback:target>
      <dc:creator>Mick Badran</dc:creator>
      <wfw:comment>http://blogs.breeze.net/mickb/CommentView,guid,141884ed-0117-4e3b-bccd-074fd4072af1.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.breeze.net/mickb/SyndicationService.asmx/GetEntryCommentsRss?guid=141884ed-0117-4e3b-bccd-074fd4072af1</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I thought I’d share a few interesting SAP tales.
</p>
        <p>
I’ve been working on a project lately of integrating with not 1 SAP Server, but 2
and the 2nd one is across the seas accessible via a <strong>SAP Router</strong> (which
is similar to Proxy Servers for the internet). I’ve got to thank Rohit Singh (MS)
and his team for some great feedback, as well as Scotty and Kent Weare whom were helping
me to nut out where half these settings go.
</p>
        <p>
Specifically I needed BTS to be a ‘remote RFC server’ for the two SAP Servers.
</p>
        <p>
What does a Router string look like I hear you ask - <strong>“/H/devapp1/S/3300/H/acmesaprouter.acme/S/3300/H/sapdb01.acme”.</strong> Something
like that, and the user’s type this into the SAP Client UI to connect…my chances of
being able to ‘stick’ this somewhere in the BizTalk world was diminishing.
</p>
        <p>
So I had to get my BizTalk box to talk through the ‘SAP Router’ out with the right
credentials to another SAP Server 1200KMs away…”good luck” little adapter I thought.
("good luck” Mick I though too)
</p>
        <p>
Here’s the low down:
</p>
        <ol>
          <li>
Use a saprfc.ini file – scarce documentation, but do able.</li>
          <li>
Set a <strong>RFC_INI</strong> System Environment variable.</li>
          <li>
Turn on Rfc Tracing</li>
          <li>
Get on well with the SAP teams.</li>
          <li>
Get on well with the SAP teams…oh I mentioned that one already.</li>
        </ol>
        <p>
Here’s how you do it – after you’ve installed and setup the prereqs for the SAP Adapter
(don’t forget to add the SAP Adapter property schema to BizTalk)
</p>
        <p>
          <strong>Starting out:</strong>
        </p>
        <p>
- I jumped in and used the 'Consume Service Adapter' Wizard to work out connection
details and look at the IDOCs schemas. 
</p>
        <p>
The problem is - as time goes by, you want to see debugging and other details to tweak
as trying to establish a connection. The Receive Location (WCF-Custom, sapBinding)
SAP URI get's horribly long. 
</p>
        <p>
  
</p>
        <p>
I was happy to put up with this when I got the first connection to the SAP Server1
(local). 
</p>
        <p>
  
</p>
        <p>
This *didn't* work for SAP Server2(remote) - trust me, it's a square peg in a round
hole. 
</p>
        <p>
  
</p>
        <p>
          <strong>Using SAPRFC.INI</strong> :(generally the MS Docs will get you started, but
I found they had incomplete settings so I had to go elsewhere - a Siebel-&gt;SAP 2001
document served the purpose) 
</p>
        <ol>
          <li>
Create a System Environment Variable called <strong>RFC_INI</strong>  and point
it to where you want your <strong>saprfc.ini </strong>file to live.<br />
e.g. <strong>SET RFC_INI=d:\BizTalk_Dev\SAP\saprfc.ini<br /></strong>(the MS documentation doesn't say *exactly* where to put the saprfc.ini -
I tried it in the bts folder, windir...many places)</li>
          <li>
Set the Receive Location to use the saprfc.ini - e.g. <strong>sap://client=110;lang=en;@D/SAPSERVER?LISTENERDEST=BTS_INBOUND&amp;RfcTraceSdk=true</strong></li>
          <li>
Using the SAPRFC.INI file</li>
        </ol>
        <blockquote>
          <p>
            <strong>Sample SAPRFC.INI - for local SAP connection<br /></strong>
          </p>
          <p>
            <strong>DEST=SAPSERVER<br /></strong>TYPE=A<br />
ASHOST=DEVAPP1<br />
GWHOST=DEVDB1<br />
GWSERV=sapgw00<br />
SYSNR=00<br />
RFC_TRACE=0<br />
ABAP_DEBUG=0<br />
USE_SAPGUI=0<br /></p>
          <p>
            <strong>DEST=BTS_INBOUND<br /></strong>TYPE=R<br />
GWHOST=DEVDB1<br />
GWSERV=sapgw00<br />
PROGID=BizTalkDev_Inbound  (&lt;-- this is allocated from SAP)<br />
SYSNR=00<br />
RFC_TRACE=0<br />
ABAP_DEBUG=0<br />
USE_SAPGUI=0
</p>
        </blockquote>
        <blockquote>
          <p>
            <strong>Connecting to a SAP Server via a SAP Router</strong>
            <strong>String - sample
saprfc.ini<br /></strong>e.g. router string -/H/devapp1/S/3300/H/acmesaprouter.acme/S/3300/H/sapdb01.acme 
</p>
          <p>
ListenerURI (BTS Receive Location) = <strong>sap://client=110;lang=en;@D/ACMESAP?LISTENERDEST=ACMESAP_INBOUND&amp;RfcTraceSdk=true</strong></p>
        </blockquote>
        <blockquote>
          <p>
            <strong>DEST=ACMESAP<br /></strong>TYPE=A<br />
ASHOST=/H/devapp1/S/3300/H/acmesaprouter.acme/S/3300/H/sapdb01.acme<br />
GWHOST/H/devapp1/S/3300/H/acmesaprouter.acme/S/3300/H/sapdb01.acme 
</p>
          <p>
GWSERV=sapgw00<br />
SYSNR=00<br />
RFC_TRACE=0<br />
ABAP_DEBUG=0
</p>
          <p>
            <strong>DEST=ACMESAP_INBOUND<br /></strong>TYPE=R<br />
GWSERV=sapgw00<br />
GWHOST=/H/devapp1/S/3300/H/acmesaprouter.acme/S/3300/H/sapdb01.acme<br />
PROGID=BizTalkDev2_Inbound<br />
SYSNR=00<br />
RFC_TRACE=0<br />
ABAP_DEBUG=0
</p>
        </blockquote>
        <p>
  
</p>
        <p>
  
</p>
        <p>
HTH folks and saves you guys some time - :)
</p>
        <img width="0" height="0" src="http://blogs.breeze.net/mickb/aggbug.ashx?id=141884ed-0117-4e3b-bccd-074fd4072af1" />
      </body>
      <title>BAP 2.0 – using the SAP Adapter and SAP Router Strings</title>
      <guid isPermaLink="false">http://blogs.breeze.net/mickb/PermaLink,guid,141884ed-0117-4e3b-bccd-074fd4072af1.aspx</guid>
      <link>http://blogs.breeze.net/mickb/2009/09/22/BAP20UsingTheSAPAdapterAndSAPRouterStrings.aspx</link>
      <pubDate>Tue, 22 Sep 2009 11:42:18 GMT</pubDate>
      <description>&lt;p&gt;
I thought I’d share a few interesting SAP tales.
&lt;/p&gt;
&lt;p&gt;
I’ve been working on a project lately of integrating with not 1 SAP Server, but 2
and the 2nd one is across the seas accessible via a &lt;strong&gt;SAP Router&lt;/strong&gt; (which
is similar to Proxy Servers for the internet). I’ve got to thank Rohit Singh (MS)
and his team for some great feedback, as well as Scotty and Kent Weare whom were helping
me to nut out where half these settings go.
&lt;/p&gt;
&lt;p&gt;
Specifically I needed BTS to be a ‘remote RFC server’ for the two SAP Servers.
&lt;/p&gt;
&lt;p&gt;
What does a Router string look like I hear you ask - &lt;strong&gt;“/H/devapp1/S/3300/H/acmesaprouter.acme/S/3300/H/sapdb01.acme”.&lt;/strong&gt; Something
like that, and the user’s type this into the SAP Client UI to connect…my chances of
being able to ‘stick’ this somewhere in the BizTalk world was diminishing.
&lt;/p&gt;
&lt;p&gt;
So I had to get my BizTalk box to talk through the ‘SAP Router’ out with the right
credentials to another SAP Server 1200KMs away…”good luck” little adapter I thought.
("good luck” Mick I though too)
&lt;/p&gt;
&lt;p&gt;
Here’s the low down:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Use a saprfc.ini file – scarce documentation, but do able.&lt;/li&gt;
&lt;li&gt;
Set a &lt;strong&gt;RFC_INI&lt;/strong&gt; System Environment variable.&lt;/li&gt;
&lt;li&gt;
Turn on Rfc Tracing&lt;/li&gt;
&lt;li&gt;
Get on well with the SAP teams.&lt;/li&gt;
&lt;li&gt;
Get on well with the SAP teams…oh I mentioned that one already.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
Here’s how you do it – after you’ve installed and setup the prereqs for the SAP Adapter
(don’t forget to add the SAP Adapter property schema to BizTalk)
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Starting out:&lt;/strong&gt; 
&lt;p&gt;
- I jumped in and used the 'Consume Service Adapter' Wizard to work out connection
details and look at the IDOCs schemas. 
&lt;p&gt;
The problem is - as time goes by, you want to see debugging and other details to tweak
as trying to establish a connection. The Receive Location (WCF-Custom, sapBinding)
SAP URI get's horribly long. 
&lt;p&gt;
&amp;nbsp; 
&lt;p&gt;
I was happy to put up with this when I got the first connection to the SAP Server1
(local). 
&lt;p&gt;
&amp;nbsp; 
&lt;p&gt;
This *didn't* work for SAP Server2(remote) - trust me, it's a square peg in a round
hole. 
&lt;p&gt;
&amp;nbsp; 
&lt;p&gt;
&lt;strong&gt;Using SAPRFC.INI&lt;/strong&gt; :(generally the MS Docs will get you started, but
I found they had incomplete settings so I had to go elsewhere - a Siebel-&amp;gt;SAP 2001
document served the purpose) 
&lt;ol&gt;
&lt;li&gt;
Create a System Environment Variable called &lt;strong&gt;RFC_INI&lt;/strong&gt;&amp;nbsp; and point
it to where you want your &lt;strong&gt;saprfc.ini &lt;/strong&gt;file to live.&lt;br&gt;
e.g. &lt;strong&gt;SET RFC_INI=d:\BizTalk_Dev\SAP\saprfc.ini&lt;br&gt;
&lt;/strong&gt;(the MS documentation doesn't say *exactly* where to put the saprfc.ini -
I tried it in the bts folder, windir...many places)&lt;/li&gt;
&lt;li&gt;
Set the Receive Location to use the saprfc.ini - e.g. &lt;strong&gt;sap://client=110;lang=en;@D/SAPSERVER?LISTENERDEST=BTS_INBOUND&amp;amp;RfcTraceSdk=true&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
Using the SAPRFC.INI file&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt; 
&lt;p&gt;
&lt;strong&gt;Sample SAPRFC.INI - for local SAP connection&lt;br&gt;
&lt;/strong&gt; 
&lt;p&gt;
&lt;strong&gt;DEST=SAPSERVER&lt;br&gt;
&lt;/strong&gt;TYPE=A&lt;br&gt;
ASHOST=DEVAPP1&lt;br&gt;
GWHOST=DEVDB1&lt;br&gt;
GWSERV=sapgw00&lt;br&gt;
SYSNR=00&lt;br&gt;
RFC_TRACE=0&lt;br&gt;
ABAP_DEBUG=0&lt;br&gt;
USE_SAPGUI=0&lt;br&gt;
&lt;p&gt;
&lt;strong&gt;DEST=BTS_INBOUND&lt;br&gt;
&lt;/strong&gt;TYPE=R&lt;br&gt;
GWHOST=DEVDB1&lt;br&gt;
GWSERV=sapgw00&lt;br&gt;
PROGID=BizTalkDev_Inbound&amp;nbsp; (&amp;lt;-- this is allocated from SAP)&lt;br&gt;
SYSNR=00&lt;br&gt;
RFC_TRACE=0&lt;br&gt;
ABAP_DEBUG=0&lt;br&gt;
USE_SAPGUI=0
&lt;/p&gt;
&lt;/blockquote&gt; &lt;blockquote&gt; 
&lt;p&gt;
&lt;strong&gt;Connecting to a SAP Server via a SAP Router&lt;/strong&gt; &lt;strong&gt;String - sample
saprfc.ini&lt;br&gt;
&lt;/strong&gt;e.g. router string -/H/devapp1/S/3300/H/acmesaprouter.acme/S/3300/H/sapdb01.acme 
&lt;p&gt;
ListenerURI (BTS Receive Location) = &lt;strong&gt;sap://client=110;lang=en;@D/ACMESAP?LISTENERDEST=ACMESAP_INBOUND&amp;amp;RfcTraceSdk=true&lt;/strong&gt;
&lt;/p&gt;
&lt;/blockquote&gt; &lt;blockquote&gt; 
&lt;p&gt;
&lt;strong&gt;DEST=ACMESAP&lt;br&gt;
&lt;/strong&gt;TYPE=A&lt;br&gt;
ASHOST=/H/devapp1/S/3300/H/acmesaprouter.acme/S/3300/H/sapdb01.acme&lt;br&gt;
GWHOST/H/devapp1/S/3300/H/acmesaprouter.acme/S/3300/H/sapdb01.acme 
&lt;p&gt;
GWSERV=sapgw00&lt;br&gt;
SYSNR=00&lt;br&gt;
RFC_TRACE=0&lt;br&gt;
ABAP_DEBUG=0
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;DEST=ACMESAP_INBOUND&lt;br&gt;
&lt;/strong&gt;TYPE=R&lt;br&gt;
GWSERV=sapgw00&lt;br&gt;
GWHOST=/H/devapp1/S/3300/H/acmesaprouter.acme/S/3300/H/sapdb01.acme&lt;br&gt;
PROGID=BizTalkDev2_Inbound&lt;br&gt;
SYSNR=00&lt;br&gt;
RFC_TRACE=0&lt;br&gt;
ABAP_DEBUG=0
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&amp;nbsp; 
&lt;p&gt;
&amp;nbsp; 
&lt;p&gt;
HTH folks and saves you guys some time - :)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.breeze.net/mickb/aggbug.ashx?id=141884ed-0117-4e3b-bccd-074fd4072af1" /&gt;</description>
      <comments>http://blogs.breeze.net/mickb/CommentView,guid,141884ed-0117-4e3b-bccd-074fd4072af1.aspx</comments>
      <category>BizTalk/2009</category>
      <category>BizTalk/BizTalk Adapter Pack</category>
      <category>BizTalk/BizTalk Adapter Pack/SAP</category>
    </item>
  </channel>
</rss>