soap - C# WSDL proxy methods -
i need consume soap web service c# .net 4.0 client. i've added wsdl service reference in vs 2008 , can see xml types classes can construct soap message.
the wsdl port defined interface , 2 operations defined in wsdl (uploadmessage , validatemessage) visible methods.
how use these methods? thought port available class directly call methods , vs have created relevant code sending soap message, looks have write code go in these methods. correct?
i have googled can't find simple example using .net 4.0 ;-(
when add service using add service reference
, should have new namespace (which defined in add service reference
dialog box - bottom left corner).
inside namespace, there ought class called (yourservicename)client
.
if can't find it, open service references
node in visual studio solution explorer, , find show files
button in solution explorer's little toolbar - click on see files.
under service reference, several nodes deep, should find file called reference.cs
contains code classes generated wsdl.
in reference.cs
, should find client class. regular class, can instantiate in code , call methods on. call web service methods on remote server want connect to.
Comments
Post a Comment