tags:

views:

574

answers:

1

Hi.

I need to consume a WCF service based on a (preferably single) wsdl file.

The environment is VS-2008 (sp1), and I will be using a customized "Add Service Reference" macro to generate an error handling proxy. I want to be able to do this, by supplying a WSDL file that I get from the service provider (I do not want to supply a host URL).

Is this possible?

Thanks, Assaf.

+3  A: 

Sure - you can copy the path+filename for the WSDL and paste that into the "Add Service Reference" dialog box in Visual Studio (or just type int the full path + WSDL file name).

Or you can use the svcutil.exe command line utility to convert the WSDL file to your client proxy class.

Marc

marc_s
I tried adding a service reference from a local wsdl, one that has multiple contracts, and all I got was a blank reference.cs file (it had the code-gen remarks, but that's it).Any idea why?Thanks,Assaf.
Assaf Stone
that would indicate an invalid WSDL, probably - or it can't handle the multiple services inside the same WSDL - not 100% sure
marc_s