.NET Framework Bookmark and Share   
 index > ASMX Web Services and XML Serialization > SoapExtension
 

SoapExtension

I have one question:

I have class, with variable num:

public class EncryptMessage : SoapExtension
{
public int num=10;
....
}
Soap extension on web method:

public class Service1 : System.Web.Services.WebService
{
/*in this place I want call some methods, which change variable num in class EncryptMessage,
before than is soap extension used on web method .. it is possible ??If yes, how can I change variable in class EncryptMessage*/

int num2=5;
someMethods(num2); // this methods change variable num in 
class EncryptMessage

public const string k = "something";
[WebMethod]
[EncryptMessage(SetKey =k)]
public string test2()
{
return "ok";
}
}

I want call some methods, which change variable num in class EncryptMessage, before than is soap extension used on web method .. it is possible ??If yes, how can I change variable in class EncryptMessage.

klerik123456
Answered at http://stackoverflow.com/questions/1398583/asmx-web-service-soap-extension-how-to-inject-attribute-into-client-proxy-class.

John Saunders
WCF is Web Services. They are not two separate things.
Use WCF for All New Web Service Development, instead of legacy ASMX or obsolete WSE
Use File->New Project to create Web Service Projects
John Saunders

You can use google to search for other answers

Custom Search

More Threads

• Precompiled web deployement problem
• ICallbackEventHandler returning postback?
• using XmlSerializer on properties and classes marked as internal
• Can we use WSE 2.0 in VS2005 to generate a proxy?
• Gridview headers display "Â" character when htmlencode=false and htmltextwriter is used
• Generating WSDL file via a UNC path
• Enumeration in webservices based on culture
• Web Service - view xml?
• Serialization error
• Permissions for calling unmanaged DLL in ASP.NET web service on win2k