473,386 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

activating a SOAP extension from the client

I want to write a SOAP extension that gets activated from both the
client and the server. From whast I have read, this should be quite
easy to do. Yet I can only activate it from the server.

I have a service (.asmx file) which contains the following:

namespace OfficerCallIn
{
[WebService(Name="OfficerCallInService",
Namespace="TheOfficerCallInService")]
public class OfficerCallInService :
System.Web.Services.WebService
{

. . .

[WebServiceHeaderExtension.CryptoSOAPExtAttribute]
[WebMethod(EnableSession=true)]
public void ProcessOfficerLocationAndStatus { ... }
}
}

The SOAP extension file looks like this:

namespace WebServiceHeaderExtension
{
[AttributeUsage(AttributeTargets.Method)]
public class CryptoSOAPExtAttribute :
System.Web.Services.Protocols.SoapExtensionAttribu te
{
...

public override Type ExtensionType
{get { return typeof(CryptoSOAPExt); }}
}

public class CryptoSOAPExt :
System.Web.Services.Protocols.SoapExtension
{
... // the usual methods
}
}

and the client call looks like this:

OfficerCallInService srvc = new OfficerCallInService();
srvc.ProcessOfficerLocationAndStatus( . . .);

The intention is to put some encryption/decryption code, currently
residing in the client, into the SOAP extension. Right now, the
extension methods are essentially empty, containing nothing more than
the usual boilerplate code and a few MessageBox() pop-ups to signal that
they are being activated.

I can see that the service is activating the SOAP code, since the
pattern of activations is: BeforeDeserialize, AfterDeserialize,
BeforeSerialize, AfterSerialize. This is the standard server-side
pattern. But what must I do to get the client to activate the SOAP
extensions? I'm sure that I am overlooking something perfectly simple
and obvious, but, as I am a beginner at this material, I don't know what
it is. Can someone clue me in?
Jan 10 '06 #1
0 1363

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: David | last post by:
Hi everyone, I wonder how is it possible to make PHP SOAP extension convert the returned complex type to an instance of one of my classes. Here I give you a short example: complexTest.wsdl:...
1
by: David C. allen | last post by:
I have created a simple Client-side SOAP Extension for a webclass that I have. When I apply the extension attribute to the the calling function in the proxy class I get an error 'Value cannot be...
4
by: pepcag | last post by:
I used http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconalteringsoapmessageusingsoapextensions.asp as a template to create a very simple web method with soap...
0
by: Matt Wood | last post by:
Hi, I have written a Web Service for a customer which expects a SOAP message with Document/Literal encoding, and uses RoutingStyle=SoapServiceRoutingStyle.RequestElement to route the SOAP body...
0
by: Robert Rotstein | last post by:
I want to write a SOAP extension that gets activated from both the client and the server. But so far, I have only been able to activate from the server. I have a service (.asmx file) which...
0
by: Søren | last post by:
I have a web service with a SOAP extension loggin the SOAP. In the client's config file a <soapExtensionTypes> section is added and the SOAP extension is called as expected. Now the client is...
2
by: Frederik Vanderhaegen | last post by:
Hi, I'm writing a simple soap extension for a webservice I developed (without the use of an extension the webservice works perfect). The extension is registered through the web.config files of...
0
by: maraujo | last post by:
Hi, I have built a customized soap extension in order to log soap messages in client side. Is it possible? On every webservice call, I want to log all soap messages in client side (c:\log.txt...
1
by: klerik123456 | last post by:
I try set soap extension attributes on client side. For example: Implementation in web service: public class EncryptMessageAttribute : SoapExtensionAttribute { private string...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.