Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 10th, 2006, 11:18 AM
Registered User
 
Join Date: Jan 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default activating a SOAP extension from a client

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
{

[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?






Similar Threads
Thread Thread Starter Forum Replies Last Post
.NET C# webservices and VC++ SOAP client samdesilva .NET Web Services 0 June 10th, 2007 10:09 PM
C# client for SOAP::Lite web service wirespring C# 0 December 8th, 2006 07:14 PM
Problem activating Excel Interop lagyossarian ASP.NET 2.0 Basics 1 July 21st, 2006 02:36 AM
Soap Extension and error being returned khoy .NET Web Services 0 July 14th, 2006 10:55 AM
Soap Client & Permissions jlick Pro VB 6 0 June 22nd, 2004 10:38 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.