views:

321

answers:

3

Is it possible to add a service reference in visual studio, which generates the local proxy class to call the WCF service when using the netTcpBinding?

As I understood it, the service reference method requires a WSDL to be exposed by the service, which is only supported by the http bindings no?

Perhaps, could I add the service reference locally in development, but then switch the configuration to use nettcp at runtime in production?

The reason I am asking is because I am hosting in a windows service (server 2003, so no WAS, and can't use IIS). And we are unable to change the permissions to do the HTTP namespace reservation ... so we can't use the HTTP bindings. NetTcp works, but in this specific case the object graph we're passing back and forth involves objects generated in the service by an EDMX model ... so we can't share it in a contract assembly.

Thanks in advance!

A: 

All bindings are exposed though WSDL. If you add the NETTCP bindings svcutil will atuo generate the client correctly. I haven't used it in the ADD reference in VS as i have always preferred to generate the class with svcutil.

rerun
We do it how is it not true. Unless I misunderstood the question this is also referenced here http://social.msdn.microsoft.com/forums/en-US/wcf/thread/0ca5c79a-ed72-4458-b476-2f4d8477c64f/
rerun
Sorry, I misread your "WSDL comes only over HTTP" to mean you thought metadata could only come over HTTP. If you'll edit the question (in any way at all), then I'll remove the downvote. I just tried, but it won't let me until you do an edit.
John Saunders
@rerun: I fixed it.
John Saunders
Np it wasn't worded well
rerun
+2  A: 

Simply add a binding using mexTcpBinding.

John Saunders
+1  A: 

Is it possible to add a service reference in visual studio, which generates the local proxy class to call the WCF service when using the netTcpBinding?

Yes, most definitely!

As I understood it, the service reference method requires a WSDL to be exposed by the service, which is only supported by the http bindings no?

No, definitely not - WCF metadata (either its own specific format, or exposed as WSDL / XSD files) is definitely available for all SOAP-based calls - regardless of their transport.

Can you show us what you have, in terms of server-side config? Most likely, you're just missing a little config setting or something - if we see what you have, we might be able to pinpoint that and help you more!

marc_s