So what happens when you create a few operations or services during a single instance of the BizTalk WCF Service Publishing wizard? What types of web service projects and BizTalk messaging configurations get produced? I was messing around with this the other day, and thought I’d quickly show the output. Maybe this is common knowledge, but I hadn’t tried all these scenarios before.
Let’s assume you have a schema to use for the wizard, and a BizTalk application to hold the generated ports. In this first scenario, I’m creating two operations for the single service. I started out the wizard by saying that I wanted my receive locations (notice that “locations” is plural here) in a particular BizTalk application.
I then decided to build a service from existing schemas instead of an orchestration. I’ve created two one-way service operations on the root service.
I accept the rest of the wizard’s default values and complete this wizard instance. The first thing that I end up with is a web service application in IIS that contains a single service file.
When I browse that service, I can clearly see in its metadata that there are two operations available for consumption.
On the BizTalk side, the application has a single new receive port and a single receive location that points to my web service.
In my next run through the wizard, I’ve once again selected to have a metadata endpoint enabled and to put my receive locations in a particular BizTalk application. I’ve also chosen to build my services from schemas. In this case, I’ve created two services, each with a single one-way operation underneath.
With all the other default values selected (but using a different output service location), I completed the wizard. As you’d probably expect, my generated web service application now has two services within it.
The generated BizTalk output surprised me slightly. What I ended up with where a distinct receive port and receive location for each service. I was expecting to have a single receive port with two locations. I could see why they’d have to be different if the exchange pattern (two-way vs. one-way) was different for the services, but both of my services are one-way, and could theoretically live fine in the same receive port.
I can only guess that the reason for doing this is because folks could use the single wizard instance to build completely unrelated services while trying to save the time of opening a new wizard for each new service.
To be thorough, let’s compare this against a multi-operation orchestration-generated service. I’ve built an orchestration that has two (public) receive ports.
After deploying this and starting the BizTalk WCF Service Publishing Wizard again, I chose to build a service from an orchestration. Here I get a different interface and both of my public ports are shown. I’ve NOT selected the “merge ports into a single service” option for this pass through the wizard.
With the wizard complete, I confirmed that I have a web service application with two services, and a BizTalk application containing two receive ports, each with a single receive location.
In my last pass through the wizard, I’ve again chosen to build a service from an orchestration and chose to merge my selected ports. I have to change my orchestration itself before I proceed since my orchestration used the default Operation_1 operation name for each port and I get an error from the wizard saying that I cannot merge the operation because of the name collision. After dealing with that unpleasantness, I completed the wizard instance with my ports merged.
What did I get? I have a single service in my IIS web application. and a single receive port with a single receive location in my BizTalk application.
The wizard works consistently whether you are building services from schemas or orchestrations. It’d be great if you had a choice to merge ports from a BizTalk messaging sense in addition to the orchestration sense, but such is life.
Do any of you use the wizard to build up a whole set of services at once, or do you typically fly through it for each individual service?