views:

377

answers:

1

I am using .NET 3.5 to call a FedEx web service.

In Fedex's sample code (VS2005) it has things like:

AddressValidationService addressValidationService = new AddressValidationService();
AddressValidationReply reply = addressValidationService.addressValidation(request);

This is nice. I like that. I'm calling a method on a 'Service'.

but in .NET 3.5 I get this generated from the same WSDL:

AddressValidationPortTypeClient addressValidationService = new AddressValidationPortTypeClient();
AddressValidationReply reply = addressValidationService.addressValidation(request);

What is all this 'PortTypeClient' *#&$. I am quite happy with progress, but this just seems a little crazy. I dont know what it means.

Is there any documentation that tells me what changed and why?

+1  A: 

What tool are you using? wsdl.exe? or svcutil.exe? If you are adding a "service reference", then that is WCF, so svcutil.exe is used - this names things as clients. There is, however, still the option to use the old wsdl.exe tool. In the IDE you do this via "Advanced..." -> "Add Web Reference..." - this will generate a 2.0 style service proxy.

Re the names; WCF is correct - the proxy class is a client, not a service.

Marc Gravell
I guess I was using WSDL.EXE. I had seen 'advanced' before, but missed 'Add Web Reference'. Yes youre right about the name of course. it was the 'PortTypeClient' part I'm not in love with. Whats wrong with just 'Client' :-)
Simon_Weaver
is it morally bad to add WCF to my resume even though i didnt know I was using it :-) ?
Simon_Weaver