Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / December 2005

Tip: Looking for answers? Try searching our database.

WSE filters

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike Schilling - 31 Dec 2005 06:02 GMT
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.
Nicholas Paldino [.NET/C# MVP] - 31 Dec 2005 16:05 GMT
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.

Signature

         - Nicholas Paldino [.NET/C# MVP]
         - mvp@spam.guard.caspershouse.com

> 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
[quoted text clipped - 9 lines]
> context *is* shared between outbound and inbound filters, making this kind
> of thing simple.
Mike Schilling - 31 Dec 2005 17:32 GMT
> 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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.