简体   繁体   中英

Cannot override System.Web.Services.Protocols.SoapHttpClientProtocol to Microsoft.Web.Services2.WebServicesClientProtocol

My Website (3.5 version) has a web reference to an external web service created in App_WebReference folder. This folder does not have Reference.cs (.wsdl and .discomap only available) . I can find the proxy classes in the dll inside the ASP.NET temporary folder located at: C:\\Users\\Amit\\AppData\\Local\\Temp\\2\\Temporary ASP.NET Files\\core_webservices\\2e1ad39b_shadow\\16784daa\\249954494\\30312779\\App_WebReferences.c1uisrry.dll

Here is the class declaration: public class Service1 : SoapHttpClientProtocol

I can not edit it as it's showing in the DLL.

I need to override the inheritance to as below so that I can create WSE 2.0 supported SOAP message:

Public class Service1 : Microsoft.Web.Services2.WebServicesClientProtocol

Please help. Thank you!

I am using VS Studio 2010 + WSE 2.0

Change in refernce file generated to below :

System.Web.Services.Protocols.SoapHttpClientProtocol to Microsoft.Web.Services2.WebServicesClientProtocol

You should be good to go.

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