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 / December 2006

Tip: Looking for answers? Try searching our database.

Retreive method name and arguments in the ProcessMessage

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jacques Marcialis - 29 Nov 2006 12:12 GMT
Hi,

I have secured my web service with a MutualCertificate11Security policy
and it work fine. I use AES256 to encrypt communications after
authentication with  establishSecurityContext="true".

Now I would like to log in a database my WS activity with a new policy
assertion.

Does someone know how can I retreive the certificatate's subject, the
method name and the arguments values in the ProcessMessage ?

Thanks a lot
JM
Pablo Cibraro [MVP] - 29 Nov 2006 14:58 GMT
Hi Jacques,

You can get the certificate's subject from the X509Security token, this
token is available through the property SoapContext.Current.IdentityToken

X509SecurityToken token =
(X509SecurityToken)SoapContext.Current.IdentityToken;

The soap context is also available in the soap envelope:
envelope.Context.IdentityToken

There is no way to get the method name and arguments. The assertions are
only able to see soap documents, these documents contains a SoapAction and a
SoapBody with elements. WSE internally maps the SoapAction with the web
service's method and parses the SoapBody to get the arguments.
You can do the same, but it seems to be a hard thing to do. (Unless, you
copy some code from WSE using Reflector).

Regards,
Pablo Cibraro.

> Hi,
>
[quoted text clipped - 10 lines]
> Thanks a lot
> JM
Jacques Marcialis - 05 Dec 2006 09:18 GMT
Hi

Thanks a lot. It work perfectly :)

For the method name and arguments, I parse the envelope.body as you
said :
envelope.Body.ChildNodes(0) is the xmlNode that discribe the method
which the name can be retreived with the property 'Name'.
envelope.Body.ChildNodes(0).ChildNodes(x) are the xmlnodes that
discribe every serialized argument.

Pablo Cibraro [MVP] a ?crit :

> Hi Jacques,
>
[quoted text clipped - 31 lines]
> > Thanks a lot
> > JM

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.