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
32 lines
911 B
C#
32 lines
911 B
C#
using System.ServiceModel;
|
|
using System.ServiceModel.Channels;
|
|
using System.ServiceModel.Dispatcher;
|
|
|
|
namespace WcfCmisWSTests {
|
|
///
|
|
/// author: Dmitry Velichkevich
|
|
///
|
|
public class SoapRequestMassagesInspector: IClientMessageInspector {
|
|
private string userName;
|
|
private string password;
|
|
|
|
public SoapRequestMassagesInspector(string userName, string password) {
|
|
|
|
this.userName = userName;
|
|
this.password = password;
|
|
}
|
|
|
|
object IClientMessageInspector.BeforeSendRequest(ref Message request, IClientChannel channel) {
|
|
|
|
request.Headers.Clear();
|
|
|
|
request.Headers.Add(SecurityMessageHeader.CreateHeader(userName, password));
|
|
|
|
return null;
|
|
}
|
|
|
|
void IClientMessageInspector.AfterReceiveReply(ref Message reply, object correlationState) {
|
|
}
|
|
}
|
|
}
|