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.

Example for Pipeline.GetInputBehavior or Pipeline.GetOutputBehavio

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mo - 20 Feb 2006 06:11 GMT
I am looking for a sample code on using GetInputBehavior  or  
GetOutputBehavior method on Pipeline class.

I saw the WSE 3.0 help documentation but it does not have sample except the
buit in

SecureConversationClientSendSecurityFilter which has one, but that does not
tell me how to

implement a class a reference to which can be retrieved from GetInputBehavior

from one on my own on a Custom policy assertion filter (inheriting from
SoapFilter).

Here is an example of the a code which I have created:

public interface ISomething
{

void SendData(string xmlData);

}

class SomeInputFilter: SoapFilter, ISomething
{

   // Implement the ISomething interface
   void ISomething.SendData(string xmlData)
   {
   ......    
   }
...
public override T GetBehavior<T>()

{

return (IDataTransfer)this;    // This gives a syntax error

?????      // What should be the implementation here to return instance of  
ISomething interface from the current instance of SomeInputFilter???

}

}

------------------------------------------------------------------------
Code on Service Client:
ISomething something =     (ISomething)PipeLine.GetInputBehavior<ISomething>
();    
----------------------------------------------------------------------------------

Thanks,
Mo
Mo - 20 Feb 2006 19:10 GMT
Would appreciate is someone could please respond to my question below.
Thanks, Mo

Pasting the code again as there were few typos in the first one.
------------------------------------------------------------------------------

public interface ISomething
{

void SendData(string xmlData);

}

class SomeInputFilter: SoapFilter, ISomething
{

   // Implement the ISomething interface
   void ISomething.SendData(string xmlData)
   {
   ......    
   }
...
public override T GetBehavior<T>()

{

return (ISomething)this;    // This gives a syntax error

?????      // What should be the implementation here to return instance of  
ISomething interface from the current instance of SomeInputFilter???

}

}

------------------------------------------------------------------------
Code on Service Client:
ISomething something =     (ISomething)Proxy.
PipeLine.GetInputBehavior<ISomething> ();    
----------------------------------------------------------------------------------

> I am looking for a sample code on using GetInputBehavior  or  
> GetOutputBehavior method on Pipeline class.
[quoted text clipped - 49 lines]
> Thanks,
> Mo
Mo - 21 Feb 2006 17:16 GMT
Got it my self.
It should be

return (T)((ISomething)this);  

> Would appreciate is someone could please respond to my question below.
> Thanks, Mo
[quoted text clipped - 90 lines]
> > Thanks,
> > Mo

Rate this thread:







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.