Reputation: 1115
Can anyone please explain me how to discover a WCF service if you do not know the type of the service Interface. I am very new to WCF services and I need to write an application to discover some WCF services hosted in the subnet. I found that you need to specify the service interface in inorder to create a FindCriteria object.
FindCriteria criteria new FindCriteria(typeof(IService1)
Please explain me how this works generally.
Upvotes: 0
Views: 1522
Reputation: 1
You can define scopes in the service behavior to "classify" your service and define the scope and scopematch on the findcriteria for partial or full or none match...
Upvotes: 0
Reputation: 1695
You can create an empty findcriteria: new FindCriteria().
This will find all discoverable service endpoints.
Upvotes: 1
Reputation: 364249
This is not how discovery works. WCF discovery is based on WS-Discovery protocol. The protocol is for discovering service with known contract = discovery finds address of the service with known contract. If you don't know the contract you can't use WCF discovery. This is explained in WCF Discovery overview.
If you don't know the contract you don't know what service you are looking for so how would you like to automatically discover it and how would you like to use it?
Upvotes: 2
Reputation: 38179
If you just want to take a look at the service operations, you can use the wcf test client application usually located in "C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\"
All you'll need is the address to the service and you'll be able to try its operations
Upvotes: 0