简体   繁体   中英

ASP.net “generic” SOAP web services

I've developed a data access layer that grants the following methods to any subclasses:

List<DataObject> Select(int primaryKey)
List<DataObject> SelectAll()
void Insert(...)
void Delete(int primaryKey)
void Update(...)

I'd like for there to be some easy way I can wire them up to some kind of dispatcher that would look at the URL, pick out the type and present the CRUD operations as web methods in a traditional SOAP web service, generating the WSDL for them on the fly.

Something like:

http://Server/Customer/ or http://Server/Address/

That would present the typical web service client test page we're all used to seeing, with Select() , etc presented as Web Methods. Is that possible in ASP.net? How would I go about doing this?

You should not use ASMX web services for new development. Use WCF instead.

In your particular case, see ADO.NET Data Services (renamed to WCF Data Services in .NET 4.0).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM