Publishing Biztalk Orchestrations as webservices


When developing Biztalk applications that are exposed as webservices, it becomes quite a tedious job to expose them as webservices everytime there is a change in the orchestration. Even though Visual Studio integrates the BizTalk Web Service Publishing Wizard, it is definitely a cumbersome tool to use everytime.

To minimize the efforts, we can have a simple batch file that can do the job for us. Biztalk comes with a command line utility - btswebsvcpub.exe

Here is an example of how you can achieve this on the command prompt -

 

btswebsvcpub "C:\TestOrchSolution\TestOrch \bin\Deployment\MyTestOrch.dll" -Overwrite -Anonymous -TargetNamespace:http://testorch /service -ReceiveLocation -ApplicationName:MyTestApp

 

Furthermore, you can also use this trick for quickly deploying your assemblies from one environment to the other.

Comments (9)

  1. Hi Techi Boy,

    Good uitlity to make all things at your finger tips.. (Command Line)..

    And how is life.. good to see your contribution and writing on blog.. Keep it up..

    And what abt gliding,,, under water diving ??? something thirlling in life..

    Hope job,,, life,, wife,, everything.. going good..

    See ya.. then..

  2. Wael Al wirr says:

    publishing is done, but please i need to merge the ports into a single web service

  3. Sanket B says:

    Hi Wael,

    The btswebsvcpub utility unfortunately does not provide a flag for merging into a single service.

    However, this utility does create a webservice solution that can be opened in the Visual Studio. You can use this solution to merge your webservices manually.

    Unless you change any of your Biztalk schemas that are being exposed from these ports, you would never really have to change these webservice projects.

    –Sanket

  4. Abir says:

    Any idea on how to find if an application has a orchstration which is exposed as a wbservice through code?

  5. Sanket B says:

    Hi Abir,

    Not really a direct way to achieve this.

    But thinking about it, it is basically an orchestration which is linked to a SOAP recieve port.

    So going on these lines, you should be able to use the Biztalk ExplorerOM to get a list of SOAP receive ports and the associated orchestrations in a particular application.

    Here is the ExplorerOM link that can get you started with this – http://msdn2.microsoft.com/en-us/library/microsoft.biztalk.explorerom.aspx

    Do note however, that the Explorer OM is a 32 bit library & cannot be used on the 64 bit machines.

    –Sanket

  6. Sachin Gupta says:

    Hi

    I want to publish two different orchestrations as web service with two web methods. First orchestration is with soap request response port whereas the other one has a one way soap port. Biztalk Wizard for publishing orchestrations as web service doesn’t allows to merge different port types under a single web service. Does anyone suggest me a way how to go about it using c#.

    Regards

    Sachin Gupta

  7. Sanket B says:

    Hi Sachin,

    The Biztalk web service publishing wizard does nothing but provides a C# solution for the webservice to emit the WSDL.  

    You can always open the two solutions and merge the CS files together. This will still work good with the orchestration till the time you do not mess with the resulting WSDL for a particular operation.

    –Sanket

  8. Jit says:

    Hi,

     I am publishing an orchestration as webserice. But I am getting a tool defined name of my webservice. How can I have acustom nameed webservice like “MyWebservice.asmx” ?

    Thanks

    Jit

  9. Sanket B says:

    Jit,

    The webservice publishing tool simply generates a websrervice project. You can always change the ASMX name. Make sure that the recieve ports use the same asmx file name that you changed to.

    –Sanket

Skip to main content