Click here to Skip to main content
15,879,326 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I have created a web service client with the help of .wsdl file and after that am just trying to instantiate the class which is in there in that service but am not getting any of references of that class.

What I have tried:

Am including the namespace of that serivice in my code
like
using ConsoleApplication11.ServiceReference1;

and expecting the availability of class from the service so trying to access that class but no luck there.
so can any one guide me with this issue?
forgot to mension one more thing.
i have tested the same scenario with this [^] am saving the file with .wsdl extention by simply right clicking on page in which it got open-up. and creating a client with this one and with this one every thing goes well.
so does my .wsdl has any issue?
Posted
Updated 9-Jul-17 21:06pm

1 solution

See the answers here: how to consume WSDL in c sharp application[^]
Also see: Generating a Web Service from WSDL in C# for Visual Studio 2010[^]
If that does not help, you can try without using WSDL: Your first C# Web Service[^]
 
Share this answer
 
v2
Comments
Madhav Gunjal 10-Jul-17 3:19am    
I haven't done any code so far,
I have just created a web service client and trying to access the class from that in my code.
i.e after including the namespace of my service reference.
and simply the class name e.g if there is a class MyClass in my service am trying to call that like below.

using ConsoleApplication11.ServiceReference1;
namespace ConsoleApplication11
{
class Program
{
static void Main(string[] args)
{
MyClass obj = new MyClass();
}

}
}

which is not happening with me.
RickZeeland 10-Jul-17 3:31am    
Did you do this: right click on the project, select "Add a Service Reference..." On the dialog that pops up, click the "Advanced" box and choose "Add a Web Service Reference"
Madhav Gunjal 10-Jul-17 3:34am    
No,because I have that .wsdl file
means i have added that file from Add serevice references it self ,here am only puting the physical location of my file to the Address Textbox.Instead of web references.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900