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

Tip: Looking for answers? Try searching our database.

Removing timestamp in WSE 3.0

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
F.Mondelo - 26 Oct 2006 17:19 GMT
Hi,

I need send a message to a Java WebService from a .NET Client. When I
use WSE 3.0 to send the message, by default in SOAP Header, WSE adds
Timestamp.

Java WebService doesn´t understand this header and I need to remove
it, how can I remove Timestamp header in WSE 3.0?
Rasika WIJAYARATNE - 27 Oct 2006 05:47 GMT
Hi,

You need to create a custom filter and place it at the end of the WSE
pipeline, and then get hold of the soap message, and manually remove
this element. There maybe an easier way but I haven't come across it!

1. You can create a custom SoapFilter, then a custom PolicyAssertion
that creates this custom SoapFilter and then associate the assertion to
the policy in the config file (e.g. wse3policyCache.config).

Refer to WSE 3.0 local help, url:
ms-help://MS.WSE30.1033/WSE3.0/html/2169b720-80b1-46a8-a990-7e9619de1ea9.htm

Also have a look at the sample here (c#):
C:\Program Files\Microsoft
WSE\v3.0\Samples\CS\QuickStart\Basic\CustomPolicyTraceAssertion

2. Basically once you have your custom filter in the pipeline, you can
override the ProcessMessage method of your custom SoapFilter class and
search remove the timestamp element in the soap header of the soap
envelope that is passed into this method.

Rasika.

> Hi,
>
[quoted text clipped - 4 lines]
> Java WebService doesn´t understand this header and I need to remove
> it, how can I remove Timestamp header in WSE 3.0?
F.Mondelo - 27 Oct 2006 11:18 GMT
Thanks,

I have already your solution but it not works. The solution is to
override SecureMessage method, because Timestamp header is not in Soap
Header until the call to SecureMessage method, not in ProcessMessage.
Pablo Cibraro [MVP] - 27 Oct 2006 14:52 GMT
Hi,

In addition, you have to remove the option to sign the timestamp header.
Othewise, the signature created by WSE will have a reference to a
non-existing element.

Regards,
Pablo Cibraro.

> Thanks,
>
> I have already your solution but it not works. The solution is to
> override SecureMessage method, because Timestamp header is not in Soap
> Header until the call to SecureMessage method, not in ProcessMessage.
Rasika WIJAYARATNE - 29 Oct 2006 22:39 GMT
That is unusual because I already have the method I suggested earlier
working. I have placed my filter right at the end of the pipeline (this
maybe why mine works) and can gain access to the soap header object's
xml. I then  get a reference to the

//wsse:Security/wsu:Timestamp

node and then remove it, and in the output xml it no longer appears.
However your method seems to be a better way to do it as to my
understanding it is removing the timestamp earlier, if not before it is
even added.

Rasika.

> Thanks,
>
> I have already your solution but it not works. The solution is to
> override SecureMessage method, because Timestamp header is not in Soap
> Header until the call to SecureMessage method, not in ProcessMessage.

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.