How to create custom sharepoint web service, you can see:
http://www.walisystems.com/articles/SPS/uplservice/v1/creating%20a%20custom%20web%20service.htm
When using the commond:
disco http://localhost/_layouts/*.asmx
There is an error as follow:
In the *.asmx file,
<%@ WebService Language="C#" Class="CustomWebServiceLib.CustomWebService_GetLists" %>
Change to:
<%@ WebService Language="C#" Class="CustomWebServiceLib.CustomWebService_GetLists, CustomWebServiceLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=fbe2e565a3b3e37d" %>
The document at the url
http://localhost/_vti_bin/CustomWebServices/CustomWebService_GetLists.asmx
was not recognized as a known document type.
The error message from each known type may help you fix the problem:
- Report from 'XML Schema' is 'The document format is not recognized (the content type
Click “Service Description”:
When converting *.disco to *disco.aspx and *.wsdl to *wsdl.aspx, there are some errors.
You can copy the files of the system services, then rename the files;
Update the service name in the binding tags to your service name.
There are two object models that can use:
<% SPHttpUtility.AddQuote(SPHttpUtility.HtmlEncode(SPWeb.OriginalBaseUrl(Request)),Response.Output); %>
<% SPEncode.WriteHtmlEncodeWithQuote(Response, SPWeb.OriginalBaseUrl(Request), '"'); %>