-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathSignedSOAPRequest.cs
More file actions
43 lines (36 loc) · 1.34 KB
/
SignedSOAPRequest.cs
File metadata and controls
43 lines (36 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using System;
using System.Collections.Generic;
using System.Text;
using System.Security.Cryptography.Xml;
using System.Xml;
/*
* The material embodied in this software is provided to you "as-is" and without warranty of any kind, express,
* implied or otherwise, including without limitation, any warranty of fitness for a particular purpose.
*
* Copyright (c) 2018 - Dhval Mudawal
*/
namespace WSClient
{
public class SignedSOAPRequest : SignedXml
{
public SignedSOAPRequest(XmlDocument xml) : base(xml)
{
}
public SignedSOAPRequest(XmlElement xmlElement)
: base(xmlElement)
{
}
public override XmlElement GetIdElement(XmlDocument document, string idValue)
{
// check to see if it's a standard ID reference
XmlElement idElem = base.GetIdElement(document, idValue);
if (idElem == null)
{
XmlNamespaceManager nsManager = new XmlNamespaceManager(document.NameTable);
nsManager.AddNamespace("wsu", "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd");
idElem = document.SelectSingleNode("//*[@wsu:Id=\"" + idValue + "\"]", nsManager) as XmlElement;
}
return idElem;
}
}
}