Michael Stephenson

keeping your feet on premise while your heads in the cloud
posts - 256, comments - 277, trackbacks - 11

My Links

News

View Michael Stephenson's profile on BizTalk Blog Doc View Michael Stephenson's profile on LinkedIn

Twitter












Archives

Post Categories

Image Galleries

BizTalk

Mates

BizTalk Web Service Publishing - Soap Adapter

I have been doing a little work with msbuild and BizTalk.  I want to regenerate the web services that are published from my orchestrations and schemas as part of my automated build process.  This post will describe my experience for the Soap Adapter, I will also probably write about the WSE2 and maybe WSE3 adapter also.

Problem

We want a process for publishing web services from BizTalk that is simple and also will support our automated build process.  Within our automated build we wanted to regenerate the web services from scratch rather than have them included as a project in the solution. 

Some of the issues we had with different ways of doing it were

Problem 1:BTSWebSvcPub.exe

You can use the command line like demonstrated in the following msbuild exec task

<Exec Command ='BTSWebSvcPub.exe $(OrchestrationAssemblyPath) -Location:$(WebServicesUrl) -Overwrite -Anonymous -Namespace:$(WebServicesNamespace) '/>

Although this is a perfectly good way to do it, The main problems with this are that you don’t have a lot of control over the web services that are outputted, and additionally the same technique cant be used with say the WSE 2 adapter as this requires additional information to generate the web services.

Problem 2: Use Wizard from Command Line

I read an article which described using the web service publishing wizard from the command line and supplying the path to a description of the web services as a config parameter.  This article was BizTalk 2004 I think, but it doesn’t seem to work in BTS 2006 as it just pops open the wizard ready to start filling it in.

Solution

I decided to use a code snippet from the same article which uses what is under the hood of the Web Service Publishing Wizard to allow me to pass the xml description of the web services and have them regenerated.  The process which is used is as follows:

1. For the first time, or each time there is a significant change to the web services you want to generate, you would manually use the web services publishing wizard to generate your web services.

2. When the web services are published grab the WebServiceDescription.xml file which is produced and include it in your solution.

3. When you run your automated build our msbuild task will be passed the xml description and regenerate the web services.

An example of calling the msbuild task is as follows:

<WebServiceGenerator WebServiceDescription=”C:\WebServiceDescription.xml” />

 

A code snippet to show how easy it is to regenerate web services from the description is as follows:

using Microsoft.BizTalk.WebServices;

using Microsoft.BizTalk.WebServices.Description;

WebServiceDescription desc = WebServiceDescription.LoadXml(this._Path);

WebServiceBuilder builder = new WebServiceBuilder();

builder.WebServiceDescription = desc;

builder.BuildWebService();

 

 

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Print | posted on Saturday, September 16, 2006 6:55 PM | Filed Under [ BizTalk ]

Feedback

Gravatar

# re: BizTalk Web Service Publishing - Soap Adapter

در خواست مقاله در مورد
web service publishing
3/8/2011 2:11 AM | sohrab
Gravatar

# re: BizTalk Web Service Publishing - Soap Adapter

request jornnal for web service publishing
3/8/2011 2:15 AM | sohrab
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 
 

Powered by: