471,627 Members | 2,344 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

WSE filters

Today was my first experience using WSE filters in SOAP clients. One of
the simpler things I wanted to create was an OutputFilter/InputFilter pair
that calculates response time by having the OutputFilter store the start
time in the SoapContext for the InputFilter to subtract from the end time.
Of course, I had assumed that the OutputFilter and InputFilter shared a
SoapContext (or at least its table of properties) and was very surprised to
find that this isn't the case. As it is, I don't see any way for the two
to communicate except via a ThreadLocal, which is both unnecessarily complex
and error-prone. Am I missing something?

Note that in JAX-RPC, which is the equivalent Java technology, the context
*is* shared between outbound and inbound filters, making this kind of thing
simple.
Dec 31 '05 #1
2 1379
Mike,

Instead of attaching it to the context (I would try and learn more about
WSE if WCF wasn't coming out), can you alter the payload on the way in, and
then strip it on the way out? On the way in, you can attach your piece of
information, and then remove it on the way out.

It will increase processing time, of course, because you have to shred
and re-create the payload, but it should work.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Mike Schilling" <ms*************@hotmail.com> wrote in message
news:eI**************@tk2msftngp13.phx.gbl...
Today was my first experience using WSE filters in SOAP clients. One of
the simpler things I wanted to create was an OutputFilter/InputFilter pair
that calculates response time by having the OutputFilter store the start
time in the SoapContext for the InputFilter to subtract from the end time.
Of course, I had assumed that the OutputFilter and InputFilter shared a
SoapContext (or at least its table of properties) and was very surprised
to find that this isn't the case. As it is, I don't see any way for the
two to communicate except via a ThreadLocal, which is both unnecessarily
complex and error-prone. Am I missing something?

Note that in JAX-RPC, which is the equivalent Java technology, the
context *is* shared between outbound and inbound filters, making this kind
of thing simple.

Dec 31 '05 #2

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:%2****************@TK2MSFTNGP14.phx.gbl...
Mike,

Instead of attaching it to the context (I would try and learn more
about WSE if WCF wasn't coming out), can you alter the payload on the way
in, and then strip it on the way out? On the way in, you can attach your
piece of information, and then remove it on the way out.


The payload on the way out is the SOAP request; on the way back in it's the
SOAP response. So no, unless I'm going to alter every service to echo this
information, that wouldn't work.
Dec 31 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Aaron | last post: by
69 posts views Thread by DeJuan Jackson | last post: by
6 posts views Thread by TJO | last post: by
1 post views Thread by Dieter Vanderelst | last post: by
reply views Thread by kucol | last post: by
reply views Thread by leo001 | last post: by

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.