Another new Pluralsight course
I and Pluralsight are excited to announce another new BizTalk Server 2006 R2 course
– one specifically geared toward RFID! Check it out here – http://www.pluralsight.com/courses/AppliedBizTalkRfid.aspx
no public offerings schedule yet – but there should be one RSN.
BizTalk 2006 R2 – consume an .ASMX webservice using WCF-BasicHttp adapter
Normally when we need to consume a .asmx web service in BizTalk 2004/2006 (NOT R2) inside an orchestration, we add a web reference, which will create all the multi-part message and web port type required to consume the orchestration. You construct the orchestration and configure the SOAP adapter in the send port to consume the web service. I suppose that’s the normal route any BizTalk developer will take when you are put under a circumstance to consume an .asmx webservice using WCF-BasicHttp adapter.
But when you are going to use the WCF-BasicHttp adapter, “Add Web Reference” is not going to work, and we need to take advantage of the hidden “Consume WCF Service” wizard, which comes as part of BizTalk 2006 R2. The wizard will generate required schemas, multi-part messages, orchestration port types, and also binding files for both basicHttp and custom binding. I’ll put the steps here to consume a basic .asmx webservice in BizTalk 2006 R2 with WCF-BasicHttp adapter.
The sample webservice we are going to use contains a very simple webmethod as shown below.
[WebMethod]
public string ConcatName(string firstName, string lastName)
{
return firstName + ” ” + lastName;
}
The below walk-through is based on the sample webservice, which comes as part of the download.
- Create a blank BizTalk Project
- Right-Click on the project and select Add->Add Generated Items->Consume WCF Service
- Select the option “Metadata file (WSDL and XSD)“, Click “Next”
- Open an instance of a browser and navigate to your “.asmx?WSDL” file and save it somewhere in your harddrive (Example: c:\Service.wsdl).
- Click on the “Add” button (next step in the wizard after the one shown above), browse to the .WSDL file you saved in Step 4, Click “Next” (Accept defaults), Click “Import” and then Click “Finish” to complete the wizard.
- Once you click “Finish” the following files will be added to your project (File name will depend on the name of the .WSDL file you selected)
Service.BindingInfo.xml
Service.odx
Service_Custom.BindingInfo.xml
Service.tempuri_org.xsd - Open the Service.odx file, inside the orchestration view create 2 messages as shown below
WSRequest – Multi-part Message Type – ConsumeWebService.ConcatNameSoapIn
WSResponse – Multi-part Message Type – ConsumeWebService.ConcatNameSoapOut - Right-Click on the orchestration “Port Surface“, Click “Next”, In the port properties page Click “Next”, In the “Select a Port Type” page select “Use an existing Port Type” and select “ConsumeWebService.ServiceSoap“, In port binding page select “I’ll be sending a request and receiving a response.” for port direction and “Specify later” for port binding. Click “Next” and then “Finish”.
- Construct an orchestration as shown in the below figure
Receive_1 -> Activate=true, Message= WSRequest
Send_1 -> Message = WSRequest
Receive_2 -> Message = WSResponse
Send_2 -> Message = WSResponse - I created a FILE Receive and FILE Send (Specify Now) port binding for port_2 and port_3
- Assign a key file to the project and set the “Application Name” to “ConsumeWebService“. Build and Deploy the project.
Open BizTalk Administration Console, Right-Click on the application and select “Import Binding“. Browse to the auto generated binding file “Service.BindingInfo.xml” and select it. - Bind your Orchestration to the correct ports and host. For the .asmx webservice logical port, select the auto generated “WcfSendPort_Service_ServiceSoap“. (Start the application)
- Create a sample message by right-clicking on “Service_tempuri_org.xsd” file and clicking “Generate Instance“. Drop the message in the folder you configured for port_2 in the orchestration, you should see the output result in folder you configured for port_3 in your orchestration.
Download the sample here
Nandri!
Saravana
Teched Orlando
Well Microsoft Teched is here !!!!!!!! This year I will be sharing stage again with my friend Sonu Arora who is the Program Manager for the WCF Line of Business Adapters SDK (official name until they change it again). We will be talking about using WCF…(read more)
Upcoming WCF/WF training
Workflow Foundation Tracking Birds of a Feather (BOF) at Tech Ed 2007
BizTalk Server 2006 Posters
My team has been working on a set of technical BizTalk Server 2006 posters that are finally ready and available for download. Hey, we had to have been doing something while we weren’t blogging. :^)
Be that as it may, the first in the series is a capabilities categorization poster that you can get here.
The next one is a runtime architecture poster downloadable here.
The final poster is a legacy modernization with BizTalk Server 2006 and Host Integration Server 2006 that you can get here.
In order to successfully download the posters make sure to follow the instructions near the bottom of the download page.
Let us know what you think about this set and if you have a good idea for the next wave of BizTalk Server 2006 R2 posters that we’ll be delivering once it launches please share it with us.
Oh, by the way, for those of you attending Tech Ed in Orlando next week; stop by the BizTalk Server booth. We’ll be giving away full sized prints of all three posters.
Enjoy!
mike woods

Orchestration performance
So I had to fire up my XP laptop today because my new Rode
Podcaster microphone (which is otherwise is totally awesome) won’t start on Vista
despite getting a usbaudio.sys hotfix from MS Support (which was a suprisingly painless
experience).
Anyway – cleaning out my old harddrive I found this picture:
This is a picture of the BAM portal. What I was doing was using BAM to give
me some rough performance metrics between two version of an orchestration. In
the “XmlDocument” version of the orchestration I was reading in a 9MB Xml file into
BizTalk. In the orchestration I was passing the document to a .NET component
as “XmlDocument” and reading the whole document. This is the typical example
code you’ll find for reading BizTalk messages from .NET code.
In the “XmlReader” version of the orchestration – I was passing the message as XLANGMessage.
This is the underlying datatype that the Orchestration compiler uses to represent
a message. Only when you pass it to a .NET component as XmlDocument do they
actually convert it to an XmlDocument (even if your message type on your orchestration
is System.Xml.XmlDocument btw). Inside of the method my code looked something
like this:
public static XmlDocument
FromMsg(XLANGMessage old)
{
//get
at the data
XmlDocument ret = new XmlDocument();
XmlReader reader = (XmlReader)old[0].RetrieveAs(typeof(XmlReader));
//construct
new message from old
//read
property
object msgid = old.GetPropertyValue(typeof(BTS.MessageID));
return ret;
}
By calling RetrieveAs and passing typeof(XmlReader) I avoid loading the BizTalk message
into a DOM – and can read the message using standard XmlReader techniques.
As you can see from the BAM metrics (which is not an absolutely high performance timing
mechanism – but in this case should be close enough) the XmlDocument version took
about 3xs as long as the XmlReader version. So rule of thumb – if you care about
performance – use XmlReader with XLANGMessage – not XmlDocument for your .NET methods
from an Orchestration.
Unfortunately the XLANGs compiler won’t allow us to return XmlReader as the return
value – so for constructing we are still stuck with the DOM.
AS/2 Certificate Management
We have received a lot of questions from our TAP customers and beta users regarding how and where to configure certificates for encryption and signing of AS/2 messages and MDNs in BizTalk Server 2006 R2. To that end, our resident expert Yury Bogucharov posted some help on the MSDN forum (http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1633486&SiteID=1) for R2 EDI. I thought that it would also make a good blog post so I reformatted Yury’s message into table format and am posting it here for the benefit of all. Thanks Yury!
Message or MDN | Direction | Certificate Type | Certificate Owner | Public or Private | Certificate Location | Where to configure |
Message | Outbound | Signing | Home Org | Private | Personal certificate store of in-proc host user | BizTalk Group / Properties / Certificate |
Message | Outbound | Encryption | Partner | Public | Other People certificate store of local computer | Send port / Certificate |
Message | Inbound | Signing | Partner | Public | Other People certificate store of local computer | Party / Certificate |
Message | Inbound | Encryption | Home Org | Private | Personal certificate store of in-proc host user | Isolated Host / Certificates |
MDN | Outbound | Signing | Home Org | Private | Synch MDN: Personal certificate store of isolated host user Asynch MDN: Personal certificate store of in-proc host user | BizTalk Group / Properties / Certificate |
MDN | Inbound | Signing | Partner | Public | Other People certificate store of local computer | Party / Certificate |
Cheers,
Tony
Tech-Ed Session on BizTalk 2006 R2 Advanced Concepts
Just wanted put in a plug for me firstbreak out session called Advanced Microsoft BizTalk 2006 R2 Concepts. It’s SOA312 and it is on Thursday at 2:45 PM.
The abstract is:
“Business processes are a required component in most Enterprise Integration solutions today. Business processes are modeled, designed, and built inside BizTalk Server 2006 R2 using Orchestrations. Orchestration can range from a few simple shapes to a complex multi Orchestration, Transactional process. This session focuses on highlighting key Orchestration features to shorten development time and increase overall Business Process reusability. Also, messaging-only scenarios using WCF are discussed, and the power of BizTalk as a Web service routing system is shown. Topics covers are: Untyped Messages, Dynamic Transforms, Starting Orchestration and Passing Port Parameters, using Helper .NET Components, and Message Only WCF Calls.“
If you like the content on me website and blog, then you will probably like this talk.
Hope to see you in Orlando!