473,773 Members | 2,345 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 ="OfficerCallIn Service",
Namespace="TheO fficerCallInSer vice")]
public class OfficerCallInSe rvice :
System.Web.Serv ices.WebService
{

. . .

[WebServiceHeade rExtension.Cryp toSOAPExtAttrib ute]
[WebMethod(Enabl eSession=true)]
public void ProcessOfficerL ocationAndStatu s { ... }
}
}

The SOAP extension file looks like this:

namespace WebServiceHeade rExtension
{
[AttributeUsage( AttributeTarget s.Method)]
public class CryptoSOAPExtAt tribute :
System.Web.Serv ices.Protocols. SoapExtensionAt tribute
{
...

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

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

and the client call looks like this:

OfficerCallInSe rvice srvc = new OfficerCallInSe rvice();
srvc.ProcessOff icerLocationAnd Status( . . .);

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: BeforeDeseriali ze, AfterDeserializ e,
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 1394

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

Similar topics

0
2627
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: <?xml version="1.0" encoding="UTF-8"?>
1
5728
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 null'. When the extension attribute is not applied it runs fine. The wierd thing is that it does not appear to be an error within the SOAP extension because I break-pointed it and when the proxy function gets called the SOAP extension runs fine....
4
6029
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 extension. The code like this: public string HelloWorld() { return "Hello World.";
0
4369
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 message to my Web Method. The Web Method expects a string as its parameter and then feeds that string to an XML deserializer which maps the XML elements contained within the string to my custom objects, then performs an insert/update on an SQL...
0
1334
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 contains the following: namespace OfficerCallIn {
0
2004
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 to be hosted by third party, and I want to be able to enable/disable the logging from the web.config of the web service. So I pasted the following into the web.config file (within the <system.web> section):
2
4037
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 my webservice and my application. In my extension I override the Chainstream method and implement the abstract methods (GetInitializer, Initialize and ProcessMessage) my chainstream method:
0
2125
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 for example). Ps: I am using an attribute as it follows: <TraceExtensionAttribute("c:\log.txt")> _ (to enable my soap extension in every webservice call)
1
4834
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 strKey="null";
0
9621
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10264
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10106
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10039
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9914
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8937
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6717
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5355
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2852
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.