473,326 Members | 2,147 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,326 software developers and data experts.

Soap Extender and session infromation between BeforeSerialize and AfterDeserialize events

Hi,

I am developing a SOAP extender and I need to store some session information
at BeforeSerialize ProcessMessage event, so at the AfterDeserialize
ProcessMessage event I know which call I am dealing with.

What would be the best way for storing some session information during
ProcessMessage method call?

Any help would be appreciated,

Alan


Nov 23 '05 #1
5 2960
Hi Alan,

As for SoapExtension, generally they're not designed for stateful
operation. And for the webmethod, in each sending request or accepting
response operations, the SoapExtension chain will be established. You can
verify this through debugging and set breakpoint in the ChainStream method.
Also, if your SoapExtension is applied on webmethod through
SoapExtension Attribute, it is certain that the Sending Request operation
will be followedd by a receiving response operation unless it's a one way
method.

If you do need to store some stateful info which will be used across multi
Message processing stage , you can try
add a custom property in the SoapExtension class since the SoapExtension
instance will be initialized only once for a certain webmethod(if using
SoapExtensionAttribute) or for an whole application .

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
From: "A.M-SG" <al******@newsgroup.nospam>
Subject: Soap Extender and session infromation between BeforeSerialize and
AfterDeserialize events
Date: Thu, 15 Sep 2005 09:06:50 -0400
Lines: 20
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Message-ID: <eh**************@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: 199.71.241.10
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP09.phx.gbl
microsoft.public.dotnet.framework.webservices:7909
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Hi,

I am developing a SOAP extender and I need to store some session
information
at BeforeSerialize ProcessMessage event, so at the AfterDeserialize
ProcessMessage event I know which call I am dealing with.

What would be the best way for storing some session information during
ProcessMessage method call?

Any help would be appreciated,

Alan

Nov 23 '05 #2
Hi Steven,

Your reply is very helpful. The only point that I am very interested to know
more about is adding a custom property to the SoapExtention class.

Could you give me some clue how can I add custom properties to a
SoapExtention class?

Thank you,

Alan
"Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
news:Y6**************@TK2MSFTNGXA01.phx.gbl...
Hi Alan,

As for SoapExtension, generally they're not designed for stateful
operation. And for the webmethod, in each sending request or accepting
response operations, the SoapExtension chain will be established. You can
verify this through debugging and set breakpoint in the ChainStream
method.
Also, if your SoapExtension is applied on webmethod through
SoapExtension Attribute, it is certain that the Sending Request operation
will be followedd by a receiving response operation unless it's a one way
method.

If you do need to store some stateful info which will be used across multi
Message processing stage , you can try
add a custom property in the SoapExtension class since the SoapExtension
instance will be initialized only once for a certain webmethod(if using
SoapExtensionAttribute) or for an whole application .

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
From: "A.M-SG" <al******@newsgroup.nospam>
Subject: Soap Extender and session infromation between BeforeSerialize and
AfterDeserialize events
Date: Thu, 15 Sep 2005 09:06:50 -0400
Lines: 20
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Message-ID: <eh**************@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: 199.71.241.10
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP09.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.webservices:7909
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Hi,

I am developing a SOAP extender and I need to store some session
information
at BeforeSerialize ProcessMessage event, so at the AfterDeserialize
ProcessMessage event I know which call I am dealing with.

What would be the best way for storing some session information during
ProcessMessage method call?

Any help would be appreciated,

Alan


Nov 23 '05 #3
Hi Alan,

As for adding a Custom Property, we can just add a normal Property or field
in our SoapExtension class like:

public class LogMessageExtension :
System.Web.Services.Protocols.SoapExtension
{
private Stream oldStream = null;
private Stream newStream = null;

protected ArrayList lists = new ArrayList();
.......
}

Then, we can access these class fields/properteis in the ProcessMessage
method.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
From: "A.M-SG" <al******@newsgroup.nospam>
References: <eh**************@TK2MSFTNGP09.phx.gbl>
<Y6**************@TK2MSFTNGXA01.phx.gbl>
Subject: Re: Soap Extender and session infromation between BeforeSerialize
and AfterDeserialize events
Date: Fri, 16 Sep 2005 09:04:11 -0400
Lines: 94
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Message-ID: <el**************@TK2MSFTNGP14.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: 199.71.241.10
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP14.phx.gbl
microsoft.public.dotnet.framework.webservices:7915
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Hi Steven,

Your reply is very helpful. The only point that I am very interested to
know
more about is adding a custom property to the SoapExtention class.

Could you give me some clue how can I add custom properties to a
SoapExtention class?

Thank you,

Alan
"Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
news:Y6**************@TK2MSFTNGXA01.phx.gbl...
Hi Alan,

As for SoapExtension, generally they're not designed for stateful
operation. And for the webmethod, in each sending request or accepting
response operations, the SoapExtension chain will be established. You can
verify this through debugging and set breakpoint in the ChainStream
method.
Also, if your SoapExtension is applied on webmethod through
SoapExtension Attribute, it is certain that the Sending Request operation
will be followedd by a receiving response operation unless it's a one way
method.

If you do need to store some stateful info which will be used across multi
Message processing stage , you can try
add a custom property in the SoapExtension class since the SoapExtension
instance will be initialized only once for a certain webmethod(if using
SoapExtensionAttribute) or for an whole application .

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
From: "A.M-SG" <al******@newsgroup.nospam>
Subject: Soap Extender and session infromation between BeforeSerialize and
AfterDeserialize events
Date: Thu, 15 Sep 2005 09:06:50 -0400
Lines: 20
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Message-ID: <eh**************@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: 199.71.241.10
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP09.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.webservices:7909
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Hi,

I am developing a SOAP extender and I need to store some session
information
at BeforeSerialize ProcessMessage event, so at the AfterDeserialize
ProcessMessage event I know which call I am dealing with.

What would be the best way for storing some session information during
ProcessMessage method call?

Any help would be appreciated,

Alan



Nov 23 '05 #4


Thanks alot Steven for help.


"Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
news:Z$***************@TK2MSFTNGXA01.phx.gbl...
Hi Alan,

As for adding a Custom Property, we can just add a normal Property or
field
in our SoapExtension class like:

public class LogMessageExtension :
System.Web.Services.Protocols.SoapExtension
{
private Stream oldStream = null;
private Stream newStream = null;

protected ArrayList lists = new ArrayList();
......
}

Then, we can access these class fields/properteis in the ProcessMessage
method.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
From: "A.M-SG" <al******@newsgroup.nospam>
References: <eh**************@TK2MSFTNGP09.phx.gbl>
<Y6**************@TK2MSFTNGXA01.phx.gbl>
Subject: Re: Soap Extender and session infromation between BeforeSerialize
and AfterDeserialize events
Date: Fri, 16 Sep 2005 09:04:11 -0400
Lines: 94
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Message-ID: <el**************@TK2MSFTNGP14.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: 199.71.241.10
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP14.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.webservices:7915
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Hi Steven,

Your reply is very helpful. The only point that I am very interested to
know
more about is adding a custom property to the SoapExtention class.

Could you give me some clue how can I add custom properties to a
SoapExtention class?

Thank you,

Alan
"Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
news:Y6**************@TK2MSFTNGXA01.phx.gbl...
Hi Alan,

As for SoapExtension, generally they're not designed for stateful
operation. And for the webmethod, in each sending request or accepting
response operations, the SoapExtension chain will be established. You can
verify this through debugging and set breakpoint in the ChainStream
method.
Also, if your SoapExtension is applied on webmethod through
SoapExtension Attribute, it is certain that the Sending Request
operation
will be followedd by a receiving response operation unless it's a one way
method.

If you do need to store some stateful info which will be used across
multi
Message processing stage , you can try
add a custom property in the SoapExtension class since the SoapExtension
instance will be initialized only once for a certain webmethod(if using
SoapExtensionAttribute) or for an whole application .

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
From: "A.M-SG" <al******@newsgroup.nospam>
Subject: Soap Extender and session infromation between BeforeSerialize
and
AfterDeserialize events
Date: Thu, 15 Sep 2005 09:06:50 -0400
Lines: 20
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Message-ID: <eh**************@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: 199.71.241.10
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP09.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.webservices:7909
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Hi,

I am developing a SOAP extender and I need to store some session
information
at BeforeSerialize ProcessMessage event, so at the AfterDeserialize
ProcessMessage event I know which call I am dealing with.

What would be the best way for storing some session information during
ProcessMessage method call?

Any help would be appreciated,

Alan



Nov 23 '05 #5
You're welcome :-)

Good luck!

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
From: "A.M-SG" <al******@newsgroup.nospam>
References: <eh**************@TK2MSFTNGP09.phx.gbl>
<Y6**************@TK2MSFTNGXA01.phx.gbl>
<el**************@TK2MSFTNGP14.phx.gbl>
<Z$*************@TK2MSFTNGXA01.phx.gbl>
Subject: Re: Soap Extender and session infromation between BeforeSerialize
and AfterDeserialize events
Date: Mon, 19 Sep 2005 10:23:53 -0400
Lines: 159
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Message-ID: <ey*************@TK2MSFTNGP10.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: 199.71.241.10
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP10.phx.gbl
microsoft.public.dotnet.framework.webservices:7940
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Thanks alot Steven for help.


"Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
news:Z$***************@TK2MSFTNGXA01.phx.gbl...
Hi Alan,

As for adding a Custom Property, we can just add a normal Property or
field
in our SoapExtension class like:

public class LogMessageExtension :
System.Web.Services.Protocols.SoapExtension
{
private Stream oldStream = null;
private Stream newStream = null;

protected ArrayList lists = new ArrayList();
......
}

Then, we can access these class fields/properteis in the ProcessMessage
method.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
From: "A.M-SG" <al******@newsgroup.nospam>
References: <eh**************@TK2MSFTNGP09.phx.gbl>
<Y6**************@TK2MSFTNGXA01.phx.gbl>
Subject: Re: Soap Extender and session infromation between BeforeSerialize
and AfterDeserialize events
Date: Fri, 16 Sep 2005 09:04:11 -0400
Lines: 94
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Message-ID: <el**************@TK2MSFTNGP14.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: 199.71.241.10
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP14.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.webservices:7915
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Hi Steven,

Your reply is very helpful. The only point that I am very interested to
know
more about is adding a custom property to the SoapExtention class.

Could you give me some clue how can I add custom properties to a
SoapExtention class?

Thank you,

Alan
"Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
news:Y6**************@TK2MSFTNGXA01.phx.gbl...
Hi Alan,

As for SoapExtension, generally they're not designed for stateful
operation. And for the webmethod, in each sending request or accepting
response operations, the SoapExtension chain will be established. You can
verify this through debugging and set breakpoint in the ChainStream
method.
Also, if your SoapExtension is applied on webmethod through
SoapExtension Attribute, it is certain that the Sending Request
operation
will be followedd by a receiving response operation unless it's a one way
method.

If you do need to store some stateful info which will be used across
multi
Message processing stage , you can try
add a custom property in the SoapExtension class since the SoapExtension
instance will be initialized only once for a certain webmethod(if using
SoapExtensionAttribute) or for an whole application .

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
From: "A.M-SG" <al******@newsgroup.nospam>
Subject: Soap Extender and session infromation between BeforeSerialize
and
AfterDeserialize events
Date: Thu, 15 Sep 2005 09:06:50 -0400
Lines: 20
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Message-ID: <eh**************@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: 199.71.241.10
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP09.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.webservices:7909
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Hi,

I am developing a SOAP extender and I need to store some session
information
at BeforeSerialize ProcessMessage event, so at the AfterDeserialize
ProcessMessage event I know which call I am dealing with.

What would be the best way for storing some session information during
ProcessMessage method call?

Any help would be appreciated,

Alan




Nov 23 '05 #6

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

Similar topics

1
by: tonman | last post by:
I'm trying to do some accouting with a .NET web service. I would like to simply log the request and response times for each web service method invocation. The LogRequest function simply INSERTs...
6
by: john deviney | last post by:
I have a C#/.Net 1.1 client talking to a Java based web service. I need to insert a soap header on the client side which is expected on the server side. Currently, the Java ws provider, Axis, does...
1
by: bill | last post by:
I know I can use SOAPExtension to read request and response SOAP messages on the server side for a Web Method. Is there a way to do the same thing on the client side when you make a Web Service...
8
by: Mark | last post by:
Hi... I used wsdl.exe to generate some wrapper classes from someone's soap web service, and I'm looking for some way to look at what the soap request packet actually looks like. The webservice...
0
by: Amar | last post by:
I am recieving the "The root element is missing" error from my soap extension while attempting to validate an incoming SOAP message request. I suspect the problem resides in the ChainStream method...
0
by: Robert Rotstein | last post by:
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...
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...
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: Wijnand Kroes | last post by:
Hi guys, I have a C#.NET client which sends SOAP requests to .Net webservices and non ..Net webservices. If I do not add a SOAP header a get a valid response from all webservices. If I do add...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.