+ Start a Discussion

How to use WSDL file in my web application


I am very new for .NET. I want to develop a web application where end user can enter new persuits information and also can update existing persuits. If I have my own database then I don't have any problem to perform this action. But I am working on enterprise edition of www.salesforce.com. and I want to connect my web application with www.salesforce.com database.

I have downloaded WSDL file but I am not able to understand how can I use it. As I mentioned earlier that I want to make a web application where user can enter new persuit and update existing persuits. Here I want to perform my web application functionality  with salesforce database as I am having existing data in salesforce.

Now the problem is that how WSDL file can help for my web applciation and how can I use it in my web applciation.

Can anyone help me. It is very urgent as I want to develop my web applciation using salesforce.com WSDL file.

Hope anyone will help me.

Thanks in advance.



Hi sunil,

It's quite simple really.  First, do a search on web services within the .Net help.  You will use our wsdl just as any other web service.

The steps involved are

1.  Add a web reference to you project.  On the menu select Project/Add Web Reference.  For the URL enter the path and file name of the wsdl file you generated from salesforce.com.  Give the web reference a convenient name (sforce is a good one).

2. On the page load use the classes that were generted by the add web reference.  You can see examples of this from the samples provided on the sforce web site.


Hi DevAngel,

Thank you very much for help.

After downloading WSDL file, I saved it as enterprise.wsdl and followed the steps given by you.
But I am getting following errors:-

========================= ERROR ==============================

The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.


Invalid at the top level of the document. Error processing resource 'file:///D:/Documents and Settings/Kumar/Desktop/WSDL/enterprise.wsdl'. Line 1, Position 42

  <?xml version="1.0" encoding="UTF-8" ?>

======================= END ERROR ===========================

Thanks in advance.



Hi Sunil,

Can we back up a bit, please?

Have you been able to successfully download and run the Visual Basic .Net Samples located at


<inserted edits to original post>

I want to make sure you can run the executable (basicSample_vb.exe) as well as successfully load and run the Visual Studio project file (basicSample_vb.vbproj) before we move to the next step.

<end inserted edits>

Let me know.



Message Edited by sarah on 07-07-2004 12:19 PM


Hi Sarah,


Visual Basic .Net Samples located at


is running successfully at my system.