Last post May 27, 2009 07:22 PM by Joseph Baggett
May 27, 2009 04:17 PM|Joseph Baggett|LINK
I am trying to call a web service inside a .Net Framework 3.5 assembly. I noticed a difference between this version of an assembly is that it only gives you two options, Add Reference and Add Service Reference.
I select the Add Service Reference, and put in a url to a web service, extension .asmx, and it seems fine. When I go to consume the web service I get this error:
Could not find default endpoint element that references contract 'SomeObject.mdWebServicesSoap' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching
this contract could be found in the client element.
I see the ServiceModel being noted in the error. Are .Net Framework 3.5 assemblies able to consume web services? Or can they only consume WCF?
Thanks in advance for any help.
May 27, 2009 05:36 PM|MetalAsp.Net|LINK
I can say with good certainty (since I've done it) that you can consume web services.
May 27, 2009 07:22 PM|Joseph Baggett|LINK
Ok thanks for letting me know that, I've tested this with more one web service, specifically pointing to https in the uri, in a .Net Framework 3.5 assembly and none seem to work out of the box. I do see the app.config file generated. I had to setup the
constructor on the web service to take in parameters: