dotnet web services enhancements:
I would like to make use of WSE filters directly bypassing standard pipeline
processing mechanizm.
In other words I have a payload in a form of raw XML and would like to apply
some filters' processig power onto it.
I tried this:
// 1.create SoapEnvelope
SoapEnvelope se = new SoapEnvelope();
se.LoadXml(xmlEnvelope); // xmlEnvelope is a text string with "standard"
soap payload
// 2.specify X509 security token for the Context of SoapEnvelope
X509SecurityToken token = GetClientToken();
se.Context.Security.Tokens.Add( token );
se.Context.Security.Elements.Add( new MessageSignature( token ) );
// 3.create a new pipeline with Security filter
Pipeline pipeline = new Pipeline();
pipeline.OutputFilters.Clear();
pipeline.OutputFilters.Add(new SecurityOutputFilter());
// 4. Process message (apply signature)
pipeline.ProcessOutputMessage( se );
xmlEnvelope = se.OuterXml; // this is my new "signed" XML
================
It all works fine, but I am curious about 2 things:
1. If I do not create a pipeline, but just call
new SecurityOutputFilter().ProcessMessage(se);
It does not work, meaning xmlEnvelope = se.OuterXml; returns original
"unsigned" XML
2. If I want to apply one more signature on top of existing I can not do it,
because my message already has wsa:MessageID and second processing will not
work.
SO.... the question: HOW TO MAKE USE OF WSE FILTERS' SERVICES (HOW TO CALL
THEM DIRECTLY IN THE ORDER I CHOOSE)
Thank toy,
Andrew