lundi 9 février 2015

How do I connect to a Web Service using an existing wsdl?

I am used to just getting a path from someone who wants me to consume their service. However, in this case the producer of the web service provided me with a wsdl and insisted I just need to put it in my project and set a service reference to it. To me, this defeats the purpose of services.


When I do this and look in the reference.svcmap, it points to files on my pc which means it won't work when I push it out.


When I run the thing, it does fail, but the message hasn't been much help: System.InvalidOperationException: Could not find default endpoint element that references contract 'BVSService.BVS_Construct_MSPortType' 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. at DOVE.BC.BVS.InquireByDemog(BVSDATAINPUT oInput) in C:\KsKorner\DOTNETProjects\DOVE\DOVE.BC\BVS.vb:line 12 at _Default.btnBVS_Click(Object sender, EventArgs e) in C:\Inetpub\wwwroot\DOVE\Default.aspx.vb:line 46


The end point is there and it is the path that was given to me.





Aucun commentaire:

Enregistrer un commentaire