Nguyen Minh Tien
Nguyen Minh Tien

Reputation: 11

WCF Publishing Service - How to publish multiple Web Methods and Web Operations at the same time?

I consumed a web service from a Provider, it includes 100 operations (two ways request and response). I deployed a BizTalk project on a BizTalk Server including the schemas (without mapping, orchestration, etc.). After this I imported the binding config files that were generated by Visual Studio when consuming the WCF web service.

Now, I want to publish BizTalk Receive Location through WCF-WSHttp or WCF-BasicHttp. As I said, I don't use Orchestrations, so I will import by Schema and the step "WCF Services" I have to select more than 100 times to configure this step.

Does anyone have a solution to solve this case?

Upvotes: 1

Views: 542

Answers (1)

Bitmask
Bitmask

Reputation: 958

You could use powershell.

[void] 

[System.reflection.Assembly]::LoadWithPartialName("Microsoft.BizTalk.ExplorerOM")
$server = "."
$connectionString = "SERVER=" + $server + ";DATABASE=BizTalkMgmtDb;Integrated Security=SSPI"
$Catalog = New-Object Microsoft.BizTalk.ExplorerOM.BtsCatalogExplorer
$Catalog.ConnectionString = $connectionString
$app = $Catalog.AddNewApplication()
$rcvPort = $app.AddNewReceivePort(0)
for($i=1 
     $i -le 100
     $i++)
{
$rcvLocation = $rcvPort.AddNewReceiveLocation()
$rcvLocation.Name = 'what ever name you choose'
...
...
$rcvLocation.TransportTypeData = "<> ... THIS IS WHERE YOU PUT SVC DESCRIPTION <>"

}

There are a bunch of other properties that you will have to set before you can actually use it.

Upvotes: 0

Related Questions