Visual Studio 2010 Express で開発された .NET Web サービスから始めて、それ自体が提供する WSDL の URL を認識している独自の Web サービスを作成するにはどうすればよいでしょうか?
たとえば、ボイラープレート コードがあるとします。
[WebService]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
public class MyWS : System.Web.Services.WebService
{
[WebMethod(Description="Something like: http://localhost:12345/MyWS.asmx?WSDL")]
public int RegisterInDB(string ConnectionString)
{
string urlWSDL = "HOW_TO_GET_WEBSERVICE'S_OWN_WSDL_URL_HERE ???";
int NewRowId;
// 1) Connect to DB with ConnectionString
// 2) INSERT into table some info, including urlWSDL
// 3) Get Id of INSERT'ed row.
return NewRowId;
}
}
実行時に WSDL を提供するメソッド/プロパティはどれですか?