mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12874 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
36 lines
1.2 KiB
C#
36 lines
1.2 KiB
C#
using System;
|
|
using System.ServiceModel.Channels;
|
|
using System.ServiceModel.Dispatcher;
|
|
using System.ServiceModel.Description;
|
|
|
|
namespace WcfCmisWSTests {
|
|
///
|
|
/// author: Dmitry Velichkevich
|
|
///
|
|
public class SoapRequestHeaderProcessorAttribute: Attribute, IEndpointBehavior {
|
|
private string userName;
|
|
private string password;
|
|
|
|
public SoapRequestHeaderProcessorAttribute(string userName, string password) {
|
|
|
|
this.userName = userName;
|
|
this.password = password;
|
|
}
|
|
|
|
void IEndpointBehavior.ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime) {
|
|
|
|
clientRuntime.MessageInspectors.Add(new SoapRequestMassagesInspector(userName, password));
|
|
}
|
|
|
|
void IEndpointBehavior.AddBindingParameters(ServiceEndpoint endpoint,
|
|
BindingParameterCollection bindingParameters) {
|
|
}
|
|
|
|
void IEndpointBehavior.ApplyDispatchBehavior(ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher) {
|
|
}
|
|
|
|
void IEndpointBehavior.Validate(ServiceEndpoint endpoint) {
|
|
}
|
|
}
|
|
}
|