HighTechTalks DotNet Forums  

Removing timestamp in WSE 3.0

Dotnet Framework (Webservices Enhancements) microsoft.public.dotnet.framework.webservices.enhancements


Discuss Removing timestamp in WSE 3.0 in the Dotnet Framework (Webservices Enhancements) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
F.Mondelo
 
Posts: n/a

Default Removing timestamp in WSE 3.0 - 10-26-2006 , 11:19 AM






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?


Reply With Quote
  #2  
Old   
Rasika WIJAYARATNE
 
Posts: n/a

Default Re: Removing timestamp in WSE 3.0 - 10-26-2006 , 11:47 PM






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\CustomPolicyT raceAssertion

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.

F.Mondelo wrote:
Quote:
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?


Reply With Quote
  #3  
Old   
F.Mondelo
 
Posts: n/a

Default Re: Removing timestamp in WSE 3.0 - 10-27-2006 , 05:18 AM



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.


Reply With Quote
  #4  
Old   
Pablo Cibraro [MVP]
 
Posts: n/a

Default Re: Removing timestamp in WSE 3.0 - 10-27-2006 , 08:52 AM



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.

"F.Mondelo" <felixmondelo (AT) gmail (DOT) com> wrote

Quote:
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.




Reply With Quote
  #5  
Old   
Rasika WIJAYARATNE
 
Posts: n/a

Default Re: Removing timestamp in WSE 3.0 - 10-29-2006 , 03:39 PM



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.

F.Mondelo wrote:
Quote:
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.


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.