Click here to Skip to main content
13,458,920 members
Click here to Skip to main content
Add your own
alternative version


18 bookmarked
Posted 19 Jun 2005

WSS Web Service DISCO and WSDL Generator Helper

, 19 Jun 2005
Rate this:
Please Sign up or sign in to vote.
The application attached to the article automates the process of generation of *wsdl.aspx and *disco.aspx files needed when developing Web Services for Windows SharePoint Services products.

Sample Image


If any of you have written Web Services for the Windows SharePoint Services then you know how tedious (and actually boring and annoying) it is to generate the WSDL and disco files using the disco command and then make string replacements to produce new *wsdl.aspx and *disco.aspx files. Since the development is generally done not on the server where WSS (or SharePoint Portal Server) resides, it is even worse to upload the DLLs and definition files to the server and find out that you have made a syntactic error (there's no compiler to tell you that you are wrong, unfortunately). Then you have to do it all once again. Same thing happens when you add a method to the web service, you have to reflect the changes made in the asmx file to the disco and WSDL files, then generate *wsdl.aspx and *disco.aspx again and again.

Our team has written a very simple and very straightforward application that takes the URL of the web service as the argument and it produces those *wsdl.aspx and *disco.aspx files, making all necessary replacements for you. It's a very simple code, but it's very useful especially if you write or modify many web services for WSS.


This article is for the developers who are developing custom web services for Windows SharePoint Services (equally SharePoint Portal Server).

Using the code

The WSSWebServicePackager.exe uses disco.exe (also provided here) to generate first the disco and WSDL files of the web service. Then the standard string replacements are made (described in MSDN documents) to make the file recognizable by WSS.

The code below starts disco.exe and generates the files. It generates the files into Temp directory. If the directory doesn't exist, it firstly creates it.

//start disco utility to generate the wsdl and disco files
ProcessStartInfo psi = new ProcessStartInfo();
psi.WorkingDirectory = strPathToTempFolder;
psi.FileName = Application.StartupPath + "\\disco.exe";
psi.Arguments = txtURLAsmx.Text;
Process p = Process.Start(psi);

//wait for process to finish
while (!p.HasExited) { }

Then the string replacements in both files are carried. The replacements are described in detail in the MSDN documentation (Writing Custom Web Services for SharePoint Products and Technologies).

The newly generated files are then copied to the folder chosen and are ready to be copied to the ISAPI directory (refer to the MSDN article above).

Hope it helps.

Points of Interest

Before we developed this small application, which actually does only the string replacements, it was a very annoying task to make those string replacements by hand after finishing writing the actual code. Now life is a little easier, hope it helps you all :)


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Casey Rayback
United States United States
No Biography provided

You may also be interested in...


Comments and Discussions

Questionvery helpful utility Pin
ManShah31-Jan-14 8:33
memberManShah31-Jan-14 8:33 
Questionnoob question Pin
Member 915595022-Jun-12 0:22
memberMember 915595022-Jun-12 0:22 
GeneralCommandline tool to generate offline the SharePoint wsdl and disco files. Pin
Stef_H8-Mar-10 20:11
memberStef_H8-Mar-10 20:11 
GeneralUpdated Generator Pin
Member 28654844-Sep-09 10:09
memberMember 28654844-Sep-09 10:09 
GeneralRe: Updated Generator Pin
Ye Wint Aung13-Sep-09 21:43
memberYe Wint Aung13-Sep-09 21:43 
GeneralRe: Updated Generator Pin
Member 286548429-Sep-09 0:37
memberMember 286548429-Sep-09 0:37 
GeneralNice share Pin
guaneme4-Dec-08 7:59
memberguaneme4-Dec-08 7:59 
GeneralUpdated for WSSv3/MOSS Pin
Paul Horsfall20-Apr-07 23:41
memberPaul Horsfall20-Apr-07 23:41 
GeneralRe: Updated for WSSv3/MOSS Pin
RobinB30-May-07 8:46
memberRobinB30-May-07 8:46 
GeneralSharePoint Custom Web services VS 2005 Pin
braber1-Nov-06 12:08
memberbraber1-Nov-06 12:08 
Any insight on the creation of custom webservices within WSS using the .net 2.0 framework. The nice walk through and disco.aspx, wsdl.aspx creation doesnt seem to wrok with any 2.0 web services...

QuestionDisco File Generation Error Pin
Chuffy9-Jan-06 5:57
memberChuffy9-Jan-06 5:57 
GeneralIDisco file generator error Pin
John Brancaleon6-Jul-05 4:38
sussJohn Brancaleon6-Jul-05 4:38 
GeneralRe: IDisco file generator error Pin
rayback_219-Jul-05 6:15
memberrayback_219-Jul-05 6:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03-2016 | 2.8.180323.1 | Last Updated 20 Jun 2005
Article Copyright 2005 by Casey Rayback
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid