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 / ASP.NET / Web Services / February 2006

Tip: Looking for answers? Try searching our database.

SoapFilter for WSE 3.0

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
immu4u2@gmail.com - 01 Feb 2006 13:58 GMT
Hi All,

I have a client application that used WSE 2.0 SP3.
I used SoapInputFilter class to create a custom filter and use the same
in the application. I used to register this customInputFilter into the
SoapInputFilterCollection, so WSE runtime can use this filter.
I also had to refer to a policy file that would apply on my requests to
the webservice.

But now i am migrating this application to use WSE 3.0.

For WSE to use the policyfile, I set the policy name specified in the
policyfile in the
application as

serverPolicy.SetPolicy(policyName);

For the filters in WSE 3.0 am using SoapFilter class to create my
custom input filter.

CustomInputFilter : SoapFilter

Now there is nothing called as SoapInputFilterCollection where i can
register this custom filter.

So i created a custom assertion using the Policy Assertion class and
overrided the 4 methods and specified my custom input filter in the
CreateClientInputFilter() function.

public override SoapFilter
CreateClientInputFilter(FilterCreationContext context)
{
           return (new CustomInputFilter());
}

Later i created the policy and add the assertion on to this class.

public class CustomFilterPolicy : Policy
{
      public CustomFilterPolicy()
           : base(new PolicyAssertion[1]{new CustomFilterAssertion()})
       {
       }
}

So i can set this policy obejct in my client as

serverPolicy.SetPolicy(new CustomFilterPolicy());

So can i set both policy object and the policyname in the client
application using the SetPolicy( ).

Or there is some other way that i can use both filter and policy in the
application.

Regards
Immu
Pablo Cibraro - 02 Feb 2006 14:20 GMT
Hi,
Yes, you are approach is correct.
There is no need to develop a custom policy (Policy class) if you specify
your assertion as an extension in the WSE policy file.

Regards,
Pablo Cibraro
http://weblogs.asp.net/cibrax
http://www.lagash.com

> Hi All,
>
[quoted text clipped - 53 lines]
> Regards
> Immu

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.