60 lines
1.5 KiB
C#
60 lines
1.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Sarand.Net.Standard.Base.Utils
|
|
{
|
|
//=======================================================================
|
|
public enum SoapElementType
|
|
{
|
|
Envelope,
|
|
Header,
|
|
Body
|
|
}
|
|
public enum SoapNamespaceType
|
|
{
|
|
Soap_1_1,
|
|
Soap_1_2,
|
|
Encoding_1_2,
|
|
Security,
|
|
}
|
|
|
|
//=======================================================================
|
|
public static class SacsSoapUtils
|
|
{
|
|
//-------------------------------------------------------------------
|
|
public static String GetElementName (SoapElementType element)
|
|
{
|
|
switch (element)
|
|
{
|
|
case SoapElementType.Envelope: return "Envelope";
|
|
case SoapElementType.Header: return "Header";
|
|
case SoapElementType.Body: return "Body";
|
|
}
|
|
return "";
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
public static String GetSoapNamespace(SoapNamespaceType namespaceType)
|
|
{
|
|
switch (namespaceType)
|
|
{
|
|
case SoapNamespaceType.Soap_1_1:
|
|
return "http://schemas.xmlsoap.org/soap/envelope/";
|
|
case SoapNamespaceType.Soap_1_2:
|
|
return "http://www.w3.org/2003/05/soap-envelope";
|
|
case SoapNamespaceType.Encoding_1_2:
|
|
return "http://www.w3.org/2003/05/soap-encoding";
|
|
case SoapNamespaceType.Security:
|
|
return "http://schemas.xmlsoap.org/soap/security/2000-12";
|
|
}
|
|
return "";
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
}
|
|
//=======================================================================
|
|
}
|