Created
January 5, 2012 23:10
-
-
Save MikeLarned/1567882 to your computer and use it in GitHub Desktop.
Powershell Wrapper for BtsWcfServicePublisher
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$btsPublisher = "${Env:ProgramFiles(x86)}\Microsoft BizTalk Server 2010\BtsWcfServicePublishing.exe"; | |
#Tool Download - http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=21973 | |
function Create-BtsServices([string]$file) { | |
# File is an WcfServiceDescription xml document describing the services to be generated including: | |
# Location - IIS Site to publish services. SVC files are written to IIS Site's physical location found in Metabase. | |
# Services - WCFService node for each service to be created | |
# MessageType - WcfMessageType per Service node that points to a schema in the GAC (or FS) that will provide the contract for the service | |
& $btsPublisher "$serviceDescriptionFile" | |
} | |
function Print-ServiceDescription([string]$file) { | |
$wcfsd = [xml](Get-Content $file) | |
Write-Host | |
Write-Host "---------------WcfServiceDescription---------------" | |
foreach($service in $wcfsd.WcfServiceDescription.WcfServices.WcfService) { | |
Write-Host $service.GetAttribute("Name")".svc" | |
foreach($operation in $service.WcfOperations.WcfOperation) { | |
Write-Host " Operation: " $operation.GetAttribute("Name") | |
foreach($message in $operation.Wcfmessages.WcfMessage) { | |
Write-Host " "$message.GetAttribute("Name") | |
Write-Host " Schema: " $message.WcfMessageType.GetAttribute("TypeName") | |
Write-Host " AssemblyLocation: " $message.WcfMessageType.GetAttribute("AssemblyLocation") | |
} | |
} | |
Write-Host | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment