views:

43

answers:

1

How do you start a WCF client when using the service is only available on net.msmq
- when you use the "Add Service Reference", you get an error ...

The MetadataExchangeClient instance could not be initialized because no Binding is available for scheme 'net.msmq'. You can supply a Binding in the constructor, or specify a configurationName. Parameter name: scheme If the service is defined in the current solution, try building the solution and adding the service reference again.

For example, I've got the BizTalk example WcfNetAdapterPublishing from MSDN up and running, and it includes a console test client that uses the service at ...

net.msmq://localhost/private/WcfNetMsmqAdapterPublishing

so it seems it's possible, but I can't see anyway to start ?

+1  A: 

You could expose the same service and data contracts over say basicHttpBinding on a separate endpoint, create the service reference using that endpoint (and Metadata Exchange for it), and then manually adapt your app.config to use netMsmqBinding instead.

Or you could just share the contracts assembly with your service and data contracts between the server and the client project, and create the config manually (really not a big deal), and create your client proxy in code, using ChannelFactory<T>. Since you're already using the netMsmqBinding, you're definitely using .NET on both ends of the wire - so that technique should work just fine.

marc_s
Thanks for the pointer Marc
SteveC