Cannot generate disco and wsdl file for MOSS custom web service
Locked
-
Wednesday, October 24, 2007 3:57 PM
Hi all,
I was following MSDN article http://msdn2.microsoft.com/en-us/library/ms464040.aspx to create& deploy my own web service for sharepoint . I am stuck at generating disco and wsdl files for my web services. After I copied my .asmx file to layouts folder in my MOSS server and run disco.exe (tried both local and live server) to generate files, I got this error : HTML document does not contain Web service discovery information. I saw many others having the same problem but noone really proposed a working solution. Someone said it's because of the MOSS hive folder doesn't allow writing for current user, but my login is domain admin...
So, please do have a look at my problem and let me know if there's any thoughts. Many thanks!
Answers
-
Saturday, December 15, 2007 1:17 PM
Hi,
I have experienced the same issue and I find the solution that it works in my case. When you use a class attribute inside the @ WebService directive, you have to insert the following information:-
Fully Qualified Name (FQN) of the class
-
FQN of the Assembly that it contains the class
-
Version
-
Culture
-
Public key token
The directive should appear like this:
<%@ WebService Language="C#" Class="Knodev.Services.ServicesCore.MossService, Knodev.Services.ServicesCore, Version=1.0.0.0, Culture=neutral, PublicKeyToken=96cd654737929a49" %>
My initial mistake has been the following:
<%@ WebService Language="C#" Class="Knodev.Services.ServicesCore, Version=1.0.0.0, Culture=neutral, PublicKeyToken=96cd654737929a49" %>
Do you see the difference? In the second snippet of code there isn't the FQN of the class.
After spendig some time searching and reading how to solve this issue:
Microsoft (R) Web Services Discovery Utility
[Microsoft (R) .NET Framework, Version 2.0.50727.42]
Copyright (C) Microsoft Corporation. All rights reserved.
ERROR: http://test.knodev.com/MossService.asmx- The HTML document does not contain Web service discovery information.
I just put more attention to the instruction that the MOSS SDK give me to implement a custom web service. How you can see it, sometime we need a break to find the solution on a silly problem.
HTH
Microsoft MVP ASP/ASP.NET
-
-
Thursday, April 23, 2009 3:06 AM
Use the SPDev tool to auto-generate your disco.aspx and wsdl.aspx files in two seconds! After having to manually modify the disco.aspx and wsdl.aspx files by hand for the last three years, I finally created a utility to do this automatically. Unlike the other tools available, this is a command line tool that can be called quickly and easily (or in a script) without having to type in data into a Windows program each time. It also does not need or use the disco.exe utility. Command runs in one second, and your done. Here is the link to the tool and more information.
http://www.crsw.com/mark/Lists/Posts/Post.aspx?ID=57
Mark Wagner- Marked As Answer by Mike Walsh FINMicrosoft Community Contributor Thursday, March 03, 2011 9:11 AM
-
Wednesday, March 02, 2011 4:20 PM
I had same problem and resolved by adding dll to GAC before running disco.exe. If anyone has this " -The HTML document does not contain Web service discovery information" error, you want to add dll to GAC.- Marked As Answer by Mike Walsh FINMicrosoft Community Contributor Thursday, March 03, 2011 9:10 AM
All Replies
-
Wednesday, November 21, 2007 10:17 PMHi!
I have exactly the same problem. Have you managed to solve it? Could you please share the solution if so?
Thanks!
Dmitry -
Saturday, December 15, 2007 1:17 PM
Hi,
I have experienced the same issue and I find the solution that it works in my case. When you use a class attribute inside the @ WebService directive, you have to insert the following information:-
Fully Qualified Name (FQN) of the class
-
FQN of the Assembly that it contains the class
-
Version
-
Culture
-
Public key token
The directive should appear like this:
<%@ WebService Language="C#" Class="Knodev.Services.ServicesCore.MossService, Knodev.Services.ServicesCore, Version=1.0.0.0, Culture=neutral, PublicKeyToken=96cd654737929a49" %>
My initial mistake has been the following:
<%@ WebService Language="C#" Class="Knodev.Services.ServicesCore, Version=1.0.0.0, Culture=neutral, PublicKeyToken=96cd654737929a49" %>
Do you see the difference? In the second snippet of code there isn't the FQN of the class.
After spendig some time searching and reading how to solve this issue:
Microsoft (R) Web Services Discovery Utility
[Microsoft (R) .NET Framework, Version 2.0.50727.42]
Copyright (C) Microsoft Corporation. All rights reserved.
ERROR: http://test.knodev.com/MossService.asmx- The HTML document does not contain Web service discovery information.
I just put more attention to the instruction that the MOSS SDK give me to implement a custom web service. How you can see it, sometime we need a break to find the solution on a silly problem.
HTH
Microsoft MVP ASP/ASP.NET
-
-
Wednesday, February 06, 2008 3:16 PM
Hi,
I’m also experiencing the same issue. I'm only new to Visual Studio C# programming. I was wondering if someone could clarify explain why I'm getting the Disco.exe Error
"-The HTML document does not contain Web service discovery information."
I've followed this walkthrough to the letter, I created a Website Called - "FirstWebsite"
I've Create a class library Called "First_ws"
I've Created I’ve copied the Service.cs from my website from app data to my Class library.
I've created a Strong Name Called "First_ws.snk"
I've Renamed the Service.asmx file to Service_temp.asmx
Because I'm working with SharePoint Service 3.0 on a remote Windows 2003 R2 Editions Server. I placed the build Dill
"First_ws.dll" in the Windows assembly folder. From there I got the properties of that file , so that I could place them with my Service,asmx file. As I stated before this is a remote Access server so I placed the Service_temp.asmx file in \\My_Sharepoint_Server\\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS. on my SharePoint Service 3.0 Server and then from my development pc I run the disco.exe command which is located on my development pc @ C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin. Below is the contents of my Service_temp.asmx file
Service_temp.asmx
<%@ WebService++ Language="C#" Class="FirstWebsite.First_ws.Service, FirstWebsite.First_ws, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7b9f7160d0615abb" %>
I've also tried
<%@ WebService Language="C#" Class="FirstWebsite.First_ws.Service.service, FirstWebsite.First_ws.service, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7b9f7160d0615abb" %>
After running this command
disco http:\\My_Sharepoint_Server\_layout\service_temp.asmx
No luck I still get the Disco error
ERROR: http:\\My_Sharepoint_Server\_layout\service_temp.asmx
-The HTML document does not contain Web service discovery information.
Any help with this would be appreciated -
Thursday, February 28, 2008 5:32 PMHi,
Has anyone found a solution for this as I am also struggling with the same problem!
Regards
Paul -
Monday, March 17, 2008 3:35 AMI guess the web app is not running at port 80, so you do need to specify the portnumber
something like this
disco http://celerity-12:45616/_layouts/Service.asmx
Thx
celerity12- Proposed As Answer by celerity12 Friday, August 15, 2008 6:34 PM
- Unproposed As Answer by Mike Walsh FINMicrosoft Community Contributor Thursday, March 03, 2011 9:10 AM
-
Tuesday, March 18, 2008 4:32 PM
The fully resolved namespace solved the problem for me. The page renders as it should, and shows up. I'm still a little concerned about how its going to effect regular .net pages.
quoted from sunilprabha
Class="Create_Site.Class1, 'Create_Site, Version=1.0.0.0, Culture=neutral, PublicKeyToken=12bef56a6427b4cc"
The example on http://msdn2.microsoft.com/en-us/library/ms464040.aspx
shows Class="Class1, 'Create_Site, Version=1.0.0.0, Culture=neutral, PublicKeyToken=12bef56a6427b4cc"
Without the preceding namespace, the correct class doesn't open.
-
Tuesday, January 20, 2009 1:56 PMI have a similar problem. Why doesn't Visual Studio generate the correct .DISCO or .WDSL files automatically? I don't understand! Can anybody explain? Or could the renaming of service.asmx etc. cause the problems? I am using Visual Studio Web Developer 2008, Express Edition. (It used to work 4 years ago when I developed a similar web service). Please, help. I'am stuck.
-
Wednesday, April 08, 2009 3:02 PMIt seems as though WSS doesn't create the WSDL or DISCO files on the fly like .NET does. Since WSS takes over the processing of all files (including .aspx and .asmx) it must do something to the way .NET usually handles .asmx. The article mentioned above tells you to create the disco and wsdl files by hand in the ISAPI folder and then change the extension to .aspx so WSS can process them and recreate the paths on the fly. The formats ServiceNamewsdl.aspx and ServiceNamedisco.aspx have special meaning and need to match on the prefixing ServiceName portion to the actual web service. I did a test and found that if you do ServiceName.asmx?WSDL (need caps on WSDL) that it loads the ServiceNamewsdl.aspx file (I modifed the *wsdl.aspx file and it updated the ServiceName.asmx?WSDL representation). Why WSS takes over the .asmx processing from .NET and forces us to make these 2 additional files is beyond me. I'm sure they had a reason - but it sucks for us.I found a nice little tool that is supposed to create these 2 extra files for me but it seems that it was designed for Sharepoint 2 not WSS 3. http://www.codeproject.com/KB/XML/wss_web_service_helper.aspx Someone made a WSS 3 version but their site is gone. BUMMMER!I guess I just need to chalk this up to another WSS quirky work around. It sure seems there are a lot of remnants from 2.0 and Frontpage left in WSS. Ug.
Dirk Watkins -
Thursday, April 23, 2009 3:06 AM
Use the SPDev tool to auto-generate your disco.aspx and wsdl.aspx files in two seconds! After having to manually modify the disco.aspx and wsdl.aspx files by hand for the last three years, I finally created a utility to do this automatically. Unlike the other tools available, this is a command line tool that can be called quickly and easily (or in a script) without having to type in data into a Windows program each time. It also does not need or use the disco.exe utility. Command runs in one second, and your done. Here is the link to the tool and more information.
http://www.crsw.com/mark/Lists/Posts/Post.aspx?ID=57
Mark Wagner- Marked As Answer by Mike Walsh FINMicrosoft Community Contributor Thursday, March 03, 2011 9:11 AM
-
Wednesday, September 30, 2009 8:48 PMMark, I'd like to try out SPDev, but your site is password protected.
On the subject of why this is so complicated and error prone, let's just admit that someone at MS is brain-dead. For years we used things like ONC RPC, DCE RPC, OMG CORBA, (not to mention MICROSOFT RPC, for gods sake), and we had simple, sensible tools referred to as IDL (or "stub") compilers. You designed your interface, ran it through the compiler, and voila. All this garbage about copying DLL's, installing things in IIS, fixing broken settings in ASP.NET, running command line tools, editing the output of the tools, and so on, is so DAY BEFORE YESTERDAY! How in the heck is a developer supposed to automate their build processes even if the %@^#$%$#*( things worked?
I'm really sorry, .NET web service people, you just haven't gotten this piece right yet.
Ram Sudama
Ram -
Tuesday, January 26, 2010 12:10 PMGreat solution..
Additionally..
Make sure that the .dll to which you're reference is pointing is deployed into the GAC (VS Tools > VS cmd > gacutil /i myDLL.dll) otherwise you still get the same error. This because, obviously, the referenced library can't be found.
Regards,
Guus -
Thursday, June 24, 2010 1:07 AM
The solution at http://www.crsw.com/spdev/Wiki%20Pages/Home.aspx did it for me. For the life of me I could only produce dsico and wsdl files if I used the url http://localhost:port/_layouts/myfile.asmx but then I could not reference them into my VS projects. This SPDev utility produced the files for me. All I had to do was copy them over to the 12/ISAPI folder and the referencing them was smooth and simple.
All I can say is GREAT WORK MARK WAGNER !!!!!
Regards
Ben Messenger
-
Wednesday, March 02, 2011 4:20 PM
I had same problem and resolved by adding dll to GAC before running disco.exe. If anyone has this " -The HTML document does not contain Web service discovery information" error, you want to add dll to GAC.- Marked As Answer by Mike Walsh FINMicrosoft Community Contributor Thursday, March 03, 2011 9:10 AM

