init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
162
Kreta.EESZTInterface/eFT/CreateSoap.cs
Normal file
162
Kreta.EESZTInterface/eFT/CreateSoap.cs
Normal file
|
@ -0,0 +1,162 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
using Kreta.EESZTInterface.eFT.Model;
|
||||
using Kreta.EESZTInterface.eFT.Model.AllomanyResz.Request;
|
||||
using Kreta.EESZTInterface.eFT.Model.IntezmenyiAllomanyLista.Request;
|
||||
using Kreta.EESZTInterface.eFT.Model.SikeresCimzettAllomanyLetoltes.Request;
|
||||
using Kreta.EESZTInterface.STS;
|
||||
|
||||
namespace Kreta.EESZTInterface.eFT
|
||||
{
|
||||
public class CreateSoap
|
||||
{
|
||||
private static string CreateSoapRequest<T>(string samlContent, T bo)
|
||||
{
|
||||
string idTs = "TS-" + Guid.NewGuid().ToString().Replace("-", "");
|
||||
|
||||
var xDoc = new XmlDocument();
|
||||
|
||||
XmlElement root = xDoc.CreateElement("soap", "Envelope", Namespaces.soap11Ns);
|
||||
root.SetAttribute("xmlns:v1", Namespaces.allomanyPublikaloServiceV1Ns);
|
||||
xDoc.AppendChild(root);
|
||||
|
||||
XmlElement head = xDoc.CreateElement("soap", "Header", Namespaces.soap11Ns);
|
||||
root.AppendChild(head);
|
||||
|
||||
XmlElement sec = xDoc.CreateElement("wsse", "Security", Namespaces.wsseNs);
|
||||
sec.SetAttribute("xmlns:wsu", Namespaces.wsuNs);
|
||||
sec.SetAttribute("soap:mustUnderstand", "1");
|
||||
head.AppendChild(sec);
|
||||
|
||||
XmlElement timestamp = xDoc.CreateElement("wsu", "Timestamp", Namespaces.wsuNs);
|
||||
timestamp.SetAttribute("Id", Namespaces.wsuNs, idTs);
|
||||
sec.AppendChild(timestamp);
|
||||
|
||||
XmlElement created = xDoc.CreateElement("wsu", "Created", Namespaces.wsuNs);
|
||||
var now = DateTime.Now;
|
||||
created.InnerText = now.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ");
|
||||
timestamp.AppendChild(created);
|
||||
XmlElement expires = xDoc.CreateElement("wsu", "Expires", Namespaces.wsuNs);
|
||||
expires.InnerText = now.ToUniversalTime().AddMinutes(5).ToString("yyyy-MM-ddTHH:mm:ssZ");
|
||||
timestamp.AppendChild(expires);
|
||||
|
||||
sec.InnerXml += "{saml}";
|
||||
|
||||
XmlElement body = xDoc.CreateElement("soap", "Body", Namespaces.soap11Ns);
|
||||
|
||||
var ns = new XmlSerializerNamespaces();
|
||||
ns.Add("v1", Namespaces.allomanyPublikaloServiceV1Ns);
|
||||
var serializer = new XmlSerializer(typeof(T));
|
||||
var sb = new StringBuilder();
|
||||
var writer = new StringWriter(sb);
|
||||
serializer.Serialize(writer, bo, ns);
|
||||
writer.Close();
|
||||
|
||||
XmlDocument b = new XmlDocument();
|
||||
b.LoadXml(sb.Replace(typeof(T).Name, $"v1:{typeof(T).Name}").ToString());
|
||||
|
||||
XmlElement boXml = (XmlElement)xDoc.ImportNode(b.DocumentElement, true);
|
||||
boXml.Attributes.RemoveNamedItem("xmlns:v1");
|
||||
body.AppendChild(boXml);
|
||||
|
||||
xDoc.DocumentElement.AppendChild(body);
|
||||
|
||||
return xDoc.DocumentElement.OuterXml.Replace("{saml}", samlContent);
|
||||
}
|
||||
|
||||
public static string CreateGetIntezmenyiAllomanyLista(string samlContent, GetIntezmenyiAllomanyLista bo)
|
||||
{
|
||||
return CreateSoapRequest(samlContent, bo);
|
||||
}
|
||||
|
||||
public static string CreateGetAllomanyresz(string samlContent, GetAllomanyResz bo)
|
||||
{
|
||||
return CreateSoapRequest(samlContent, bo);
|
||||
}
|
||||
|
||||
public static string CreateSikeresLetoltes(string samlContent, SikeresCimzettAllomanyLetoltes bo)
|
||||
{
|
||||
return CreateSoapRequest(samlContent, bo);
|
||||
}
|
||||
|
||||
private static BusinessMessageHeader GetBusinessMessageHeader(SamlAssertion samlAssertion, string clientUserId, string organizationId)
|
||||
{
|
||||
var applicationVersion = "1.0";
|
||||
var applicationName = "eKreta";
|
||||
return new BusinessMessageHeader
|
||||
{
|
||||
Initiator = new Initiator
|
||||
{
|
||||
UserId = samlAssertion.UserId,
|
||||
UserName = samlAssertion.UserName,
|
||||
ClientUserId = clientUserId,
|
||||
ApplicationName = applicationName,
|
||||
ApplicationId = $"{applicationName}:{applicationVersion}",
|
||||
ApplicationFunction = "teszt",
|
||||
OrganizationId = organizationId,
|
||||
},
|
||||
RepresentedUser = new RepresentedUser
|
||||
{
|
||||
ClientUserId = clientUserId,
|
||||
UserId = samlAssertion.UserId,
|
||||
UserName = samlAssertion.UserName,
|
||||
},
|
||||
Logging = new Logging
|
||||
{
|
||||
SubmittedAt = DateTime.Now,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public static GetIntezmenyiAllomanyLista GetIntezmenyiAllomanyListaBusinessObject(SamlAssertion samlAssertion, string clientUserId, string organizationId)
|
||||
{
|
||||
return new GetIntezmenyiAllomanyLista
|
||||
{
|
||||
IntezmenyiAllomanyListaRequest = new IntezmenyiAllomanyListaRequest
|
||||
{
|
||||
BusinessMessageHeader = GetBusinessMessageHeader(samlAssertion, clientUserId, organizationId),
|
||||
IntezmenyiAllomanyListaRequestBusinessContent = new IntezmenyiAllomanyListaRequestBusinessContent
|
||||
{
|
||||
CimzettId = organizationId,
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public static GetAllomanyResz GetAllomanyReszBusinessObject(SamlAssertion samlAssertion, string clientUserId, string organizationId, Guid publikusId, int sorszam)
|
||||
{
|
||||
return new GetAllomanyResz
|
||||
{
|
||||
AllomanyReszRequest = new AllomanyReszRequest
|
||||
{
|
||||
BusinessMessageHeader = GetBusinessMessageHeader(samlAssertion, clientUserId, organizationId),
|
||||
AllomanyReszRequestBusinessContent = new AllomanyReszRequestBusinessContent
|
||||
{
|
||||
AllomanyPublikusId = publikusId,
|
||||
AllomanyReszSorszam = sorszam,
|
||||
CimzettId = organizationId,
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public static SikeresCimzettAllomanyLetoltes GetSikeresCimzettAllomanyLetoltesBO(SamlAssertion samlAssertion, string clientUserId, string organizationId, Guid publikusId)
|
||||
{
|
||||
return new SikeresCimzettAllomanyLetoltes
|
||||
{
|
||||
SikeresAllomanyLetoltesRequest = new SikeresAllomanyLetoltesRequest
|
||||
{
|
||||
BusinessMessageHeader = GetBusinessMessageHeader(samlAssertion, clientUserId, organizationId),
|
||||
SikeresAllomanyLetoltesRequestBusinessContent = new SikeresAllomanyLetoltesRequestBusinessContent
|
||||
{
|
||||
AllomanyPublikusId = publikusId,
|
||||
CimzettId = organizationId,
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
187
Kreta.EESZTInterface/eFT/DoRequest.cs
Normal file
187
Kreta.EESZTInterface/eFT/DoRequest.cs
Normal file
|
@ -0,0 +1,187 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Security;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
using Kreta.EESZTInterface.STS;
|
||||
using Kreta.Resources;
|
||||
|
||||
namespace Kreta.EESZTInterface.eFT
|
||||
{
|
||||
public class DoRequest
|
||||
{
|
||||
public static (XmlDocument soapResponse, byte[] mTOMAttachment) GetSoapSamlResponse(string eftUri, X509Certificate2 sslAuthCert, string soapRequest, SamlAssertion samlAssertion)
|
||||
{
|
||||
try
|
||||
{
|
||||
HttpWebRequest request = GetHttpWebRequest(eftUri, sslAuthCert, samlAssertion);
|
||||
var (data, hasAttachment) = WriteToHttpStream(request, soapRequest);
|
||||
|
||||
var msResp = new MemoryStream(data);
|
||||
StreamReader sr = new StreamReader(msResp);
|
||||
var responseString = sr.ReadToEnd();
|
||||
|
||||
if (!hasAttachment)
|
||||
{
|
||||
var soapResponse = ThrowIfSoapFault(responseString);
|
||||
return (soapResponse, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var xmlEleje = responseString.IndexOf("<?xml");
|
||||
var xmlVege = responseString.IndexOf("\r\n--MIME_Boundary");
|
||||
responseString = responseString.Substring(xmlEleje, xmlVege - xmlEleje);
|
||||
var soapResponse = ThrowIfSoapFault(responseString);
|
||||
|
||||
byte[] boundary1 = Encoding.UTF8.GetBytes("org>" + "\r\n\r\n");
|
||||
byte[] boundary2 = Encoding.UTF8.GetBytes("\r\n--" + "MIME_Boundary" + "--\r\n");
|
||||
var attachment = GetAttachmentData(data, boundary1, boundary2);
|
||||
return (soapResponse, attachment);
|
||||
}
|
||||
}
|
||||
catch (WebException wex)
|
||||
{
|
||||
string exMessage = wex.Message;
|
||||
|
||||
if (wex.Response != null)
|
||||
{
|
||||
using (var responseReader = new StreamReader(wex.Response.GetResponseStream()))
|
||||
{
|
||||
exMessage = responseReader.ReadToEnd();
|
||||
ThrowIfSoapFault(exMessage);
|
||||
}
|
||||
}
|
||||
throw new Exception(exMessage, wex);
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
private static HttpWebRequest GetHttpWebRequest(string stsUri, X509Certificate2 sslAuthCert, SamlAssertion samlAssertion = null)
|
||||
{
|
||||
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(stsUri);
|
||||
request.Headers.Add("SOAPAction", "");
|
||||
request.ContentType = "application/soap+xml;charset=\"utf-8\"";
|
||||
request.Accept = "application/soap+xml";
|
||||
request.Method = "POST";
|
||||
request.ClientCertificates.Add(sslAuthCert);
|
||||
return request;
|
||||
}
|
||||
|
||||
private static (byte[] data, bool hasAttachment) WriteToHttpStream(HttpWebRequest request, string soapRequest)
|
||||
{
|
||||
using (Stream stream = request.GetRequestStream())
|
||||
{
|
||||
MemoryStream ms = new MemoryStream(Encoding.UTF8.GetBytes(soapRequest));
|
||||
ms.WriteTo(stream);
|
||||
}
|
||||
|
||||
WebResponse response = request.GetResponse();
|
||||
MemoryStream msResp = new MemoryStream();
|
||||
|
||||
int read;
|
||||
byte[] buffer = new byte[1024];
|
||||
while ((read = response.GetResponseStream().Read(buffer, 0, buffer.Length)) > 0)
|
||||
{
|
||||
msResp.Write(buffer, 0, read);
|
||||
}
|
||||
return (data: msResp.ToArray(), hasAttachment: response.ContentType.Contains("multipart"));
|
||||
}
|
||||
|
||||
private static byte[] GetAttachmentData(byte[] data, byte[] boundary1, byte[] boundary2)
|
||||
{
|
||||
if (data == null || boundary1 == null || boundary2 == null)
|
||||
return null;
|
||||
|
||||
if (boundary1.LongLength > data.LongLength)
|
||||
return null;
|
||||
|
||||
long i, j, startIndex;
|
||||
bool match;
|
||||
int boundary1Pos = 0;
|
||||
|
||||
for (i = 0; i < data.LongLength; i++)
|
||||
{
|
||||
startIndex = i;
|
||||
match = true;
|
||||
for (j = 0; j < boundary1.LongLength; j++)
|
||||
{
|
||||
if (data[startIndex] != boundary1[j])
|
||||
{
|
||||
match = false;
|
||||
break;
|
||||
}
|
||||
if (startIndex < data.LongLength)
|
||||
{
|
||||
startIndex++;
|
||||
}
|
||||
}
|
||||
|
||||
if (match)
|
||||
boundary1Pos = Convert.ToInt32(startIndex - boundary1.LongLength);
|
||||
}
|
||||
|
||||
int pos1 = boundary1Pos + boundary1.Length;
|
||||
int pos2 = data.Length - boundary2.Length;
|
||||
int length = pos2 - pos1;
|
||||
|
||||
try
|
||||
{
|
||||
byte[] output = new byte[length];
|
||||
Array.Copy(data, pos1, output, 0, length);
|
||||
return output;
|
||||
}
|
||||
catch { }
|
||||
return null;
|
||||
}
|
||||
|
||||
private static XmlDocument ThrowIfSoapFault(string response)
|
||||
{
|
||||
XmlDocument soapMessage;
|
||||
|
||||
try
|
||||
{
|
||||
soapMessage = ExtractDocumentFromResponse(response);
|
||||
|
||||
if (soapMessage == null)
|
||||
{
|
||||
throw new Exception();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new Exception(EESZTInterfaceResource.NemMegfeleloSOAPValaszFormatum, ex);
|
||||
}
|
||||
|
||||
XmlElement fault = XmlHelper.GetElement("Fault", Namespaces.soap11Ns, soapMessage.DocumentElement);
|
||||
if (fault == null)
|
||||
{
|
||||
return soapMessage;
|
||||
}
|
||||
|
||||
var faultCodeNodes = XmlHelper.GetElement("faultcode", "", fault);
|
||||
var faultReasonNodes = XmlHelper.GetElement("faultstring", "", fault);
|
||||
var exceptionDetailNodes = XmlHelper.GetElement("detail", "", fault);
|
||||
|
||||
throw new Exception("Hiba! Kód:" + faultCodeNodes.InnerText + " Részletek:" + faultReasonNodes.InnerText,
|
||||
new Exception((exceptionDetailNodes == null) ? "" : exceptionDetailNodes.InnerText));
|
||||
}
|
||||
|
||||
private static XmlDocument ExtractDocumentFromResponse(string response)
|
||||
{
|
||||
var soapResponse = new XmlDocument();
|
||||
soapResponse.PreserveWhitespace = true;
|
||||
soapResponse.LoadXml(response);
|
||||
return soapResponse;
|
||||
}
|
||||
|
||||
private bool ValidateServerCertificate(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
using System.Xml.Serialization;
|
||||
|
||||
namespace Kreta.EESZTInterface.eFT.Model.AllomanyResz.Request
|
||||
{
|
||||
public class AllomanyReszRequest : EftRequest
|
||||
{
|
||||
[XmlElement(ElementName = "allomanyReszRequestBusinessContent", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public AllomanyReszRequestBusinessContent AllomanyReszRequestBusinessContent { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
using System;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace Kreta.EESZTInterface.eFT.Model.AllomanyResz.Request
|
||||
{
|
||||
public class AllomanyReszRequestBusinessContent
|
||||
{
|
||||
[XmlElement(ElementName = "allomanyPublikusId", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public Guid AllomanyPublikusId { get; set; }
|
||||
[XmlElement(ElementName = "cimzettId", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string CimzettId { get; set; }
|
||||
[XmlElement(ElementName = "allomanyReszSorszam", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public int AllomanyReszSorszam { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
using System;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace Kreta.EESZTInterface.eFT.Model.AllomanyResz.Request
|
||||
{
|
||||
[Serializable]
|
||||
[XmlRoot(ElementName = "getAllomanyResz", Namespace = Namespaces.allomanyPublikaloServiceV1Ns)]
|
||||
public class GetAllomanyResz
|
||||
{
|
||||
[XmlElement(ElementName = "allomanyReszRequest", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public AllomanyReszRequest AllomanyReszRequest { get; set; }
|
||||
}
|
||||
}
|
10
Kreta.EESZTInterface/eFT/Model/AllomanyResz/Response/Adat.cs
Normal file
10
Kreta.EESZTInterface/eFT/Model/AllomanyResz/Response/Adat.cs
Normal file
|
@ -0,0 +1,10 @@
|
|||
using System.Xml.Serialization;
|
||||
|
||||
namespace Kreta.EESZTInterface.eFT.Model.AllomanyResz.Response
|
||||
{
|
||||
public class Adat
|
||||
{
|
||||
[XmlElement(ElementName = "Include", Namespace = Namespaces.xopNS)]
|
||||
public Include Include { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace Kreta.EESZTInterface.eFT.Model.AllomanyResz.Response
|
||||
{
|
||||
public class AllomanyResz
|
||||
{
|
||||
[XmlElement(ElementName = "publikusId", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public Guid PublikusId { get; set; }
|
||||
[XmlElement(ElementName = "sorszam", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public int Sorszam { get; set; }
|
||||
[XmlElement(ElementName = "adat", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public Adat Adat { get; set; }
|
||||
[XmlElement(ElementName = "hash", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string Hash { get; set; }
|
||||
[XmlElement(ElementName = "meretByte", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public int MeretByte { get; set; }
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
using System.Xml.Serialization;
|
||||
|
||||
namespace Kreta.EESZTInterface.eFT.Model.AllomanyResz.Response
|
||||
{
|
||||
public class AllomanyReszResponse : EftResponse
|
||||
{
|
||||
[XmlElement(ElementName = "allomanyReszResponseBusinessContent", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public AllomanyReszResponseBusinessContent AllomanyReszResponseBusinessContent { get; set; }
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
using System.Xml.Serialization;
|
||||
|
||||
namespace Kreta.EESZTInterface.eFT.Model.AllomanyResz.Response
|
||||
{
|
||||
public class AllomanyReszResponseBusinessContent
|
||||
{
|
||||
[XmlElement(ElementName = "allomanyResz", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public AllomanyResz AllomanyResz { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
using System;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace Kreta.EESZTInterface.eFT.Model.AllomanyResz.Response
|
||||
{
|
||||
[Serializable]
|
||||
[XmlRoot(ElementName = "getAllomanyReszResponse", Namespace = Namespaces.allomanyPublikaloServiceV1Ns)]
|
||||
public class GetAllomanyReszResponse
|
||||
{
|
||||
[XmlElement(ElementName = "allomanyReszResponse", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public AllomanyReszResponse AllomanyReszResponse { get; set; }
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
using System.Xml.Serialization;
|
||||
|
||||
namespace Kreta.EESZTInterface.eFT.Model.AllomanyResz.Response
|
||||
{
|
||||
[XmlType(TypeName = "Include", Namespace = Namespaces.xopNS)]
|
||||
public class Include
|
||||
{
|
||||
[XmlAttribute(AttributeName = "href", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string Href { get; set; }
|
||||
}
|
||||
|
||||
}
|
14
Kreta.EESZTInterface/eFT/Model/BusinessMessageHeader.cs
Normal file
14
Kreta.EESZTInterface/eFT/Model/BusinessMessageHeader.cs
Normal file
|
@ -0,0 +1,14 @@
|
|||
using System.Xml.Serialization;
|
||||
|
||||
namespace Kreta.EESZTInterface.eFT.Model
|
||||
{
|
||||
public class BusinessMessageHeader
|
||||
{
|
||||
[XmlElement(ElementName = "initiator", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public Initiator Initiator { get; set; }
|
||||
[XmlElement(ElementName = "representedUser", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public RepresentedUser RepresentedUser { get; set; }
|
||||
[XmlElement(ElementName = "logging", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public Logging Logging { get; set; }
|
||||
}
|
||||
}
|
10
Kreta.EESZTInterface/eFT/Model/EftRequest.cs
Normal file
10
Kreta.EESZTInterface/eFT/Model/EftRequest.cs
Normal file
|
@ -0,0 +1,10 @@
|
|||
using System.Xml.Serialization;
|
||||
|
||||
namespace Kreta.EESZTInterface.eFT.Model
|
||||
{
|
||||
public abstract class EftRequest
|
||||
{
|
||||
[XmlElement(ElementName = "businessMessageHeader", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public BusinessMessageHeader BusinessMessageHeader { get; set; }
|
||||
}
|
||||
}
|
12
Kreta.EESZTInterface/eFT/Model/EftResponse.cs
Normal file
12
Kreta.EESZTInterface/eFT/Model/EftResponse.cs
Normal file
|
@ -0,0 +1,12 @@
|
|||
using System.Xml.Serialization;
|
||||
|
||||
namespace Kreta.EESZTInterface.eFT.Model
|
||||
{
|
||||
public abstract class EftResponse
|
||||
{
|
||||
[XmlElement(ElementName = "businessMessageHeader", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public BusinessMessageHeader BusinessMessageHeader { get; set; }
|
||||
[XmlElement(ElementName = "status", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string Status { get; set; }
|
||||
}
|
||||
}
|
24
Kreta.EESZTInterface/eFT/Model/Initiator.cs
Normal file
24
Kreta.EESZTInterface/eFT/Model/Initiator.cs
Normal file
|
@ -0,0 +1,24 @@
|
|||
using System.Xml.Serialization;
|
||||
|
||||
namespace Kreta.EESZTInterface.eFT.Model
|
||||
{
|
||||
public class Initiator
|
||||
{
|
||||
[XmlElement(ElementName = "userId", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string UserId { get; set; }
|
||||
[XmlElement(ElementName = "userName", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string UserName { get; set; }
|
||||
[XmlElement(ElementName = "clientUserId", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string ClientUserId { get; set; }
|
||||
[XmlElement(ElementName = "applicationId", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string ApplicationId { get; set; }
|
||||
[XmlElement(ElementName = "applicationName", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string ApplicationName { get; set; }
|
||||
[XmlElement(ElementName = "applicationFunction", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string ApplicationFunction { get; set; }
|
||||
[XmlElement(ElementName = "organizationId", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string OrganizationId { get; set; }
|
||||
[XmlElement(ElementName = "organizationUnitId", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string OrganizationUnitId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
using System;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace Kreta.EESZTInterface.eFT.Model.IntezmenyiAllomanyLista.Request
|
||||
{
|
||||
[Serializable]
|
||||
[XmlRoot(ElementName = "getIntezmenyiAllomanyLista", Namespace = Namespaces.allomanyPublikaloServiceV1Ns)]
|
||||
public class GetIntezmenyiAllomanyLista
|
||||
{
|
||||
[XmlElement(ElementName = "intezmenyiAllomanyListaRequest", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public IntezmenyiAllomanyListaRequest IntezmenyiAllomanyListaRequest { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
using System.Xml.Serialization;
|
||||
|
||||
namespace Kreta.EESZTInterface.eFT.Model.IntezmenyiAllomanyLista.Request
|
||||
{
|
||||
public class IntezmenyiAllomanyListaRequest : EftRequest
|
||||
{
|
||||
[XmlElement(ElementName = "intezmenyiAllomanyListaRequestBusinessContent", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public IntezmenyiAllomanyListaRequestBusinessContent IntezmenyiAllomanyListaRequestBusinessContent { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
using System.Xml.Serialization;
|
||||
|
||||
namespace Kreta.EESZTInterface.eFT.Model.IntezmenyiAllomanyLista.Request
|
||||
{
|
||||
public class IntezmenyiAllomanyListaRequestBusinessContent
|
||||
{
|
||||
[XmlElement(ElementName = "cimzettId", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string CimzettId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace Kreta.EESZTInterface.eFT.Model.IntezmenyiAllomanyLista.Response
|
||||
{
|
||||
public class Allomany
|
||||
{
|
||||
[XmlElement(ElementName = "id", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public int Id { get; set; }
|
||||
[XmlElement(ElementName = "publikusId", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public Guid PublikusId { get; set; }
|
||||
[XmlElement(ElementName = "allomanyTipus", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public AllomanyTipus AllomanyTipus { get; set; }
|
||||
[XmlElement(ElementName = "nev", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string Nev { get; set; }
|
||||
[XmlElement(ElementName = "kiterjesztes", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string Kiterjesztes { get; set; }
|
||||
[XmlElement(ElementName = "bekuldoModulUser", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string BekuldoModulUser { get; set; }
|
||||
[XmlElement(ElementName = "datum", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public DateTime Datum { get; set; }
|
||||
[XmlElement(ElementName = "meretMb", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public int MeretMb { get; set; }
|
||||
[XmlElement(ElementName = "leiras", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string Leiras { get; set; }
|
||||
[XmlElement(ElementName = "tomoritett", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public bool Tomoritett { get; set; }
|
||||
[XmlElement(ElementName = "binaris", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public bool Binaris { get; set; }
|
||||
[XmlElement(ElementName = "statusz", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string Statusz { get; set; }
|
||||
[XmlElement(ElementName = "darabszam", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public int Darabszam { get; set; }
|
||||
[XmlElement(ElementName = "ervenyesseg", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public DateTime Ervenyesseg { get; set; }
|
||||
[XmlElement(ElementName = "hash", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string Hash { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
using System.Xml.Serialization;
|
||||
|
||||
namespace Kreta.EESZTInterface.eFT.Model.IntezmenyiAllomanyLista.Response
|
||||
{
|
||||
public class AllomanyTipus
|
||||
{
|
||||
[XmlElement(ElementName = "id", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public int Id { get; set; }
|
||||
[XmlElement(ElementName = "nev", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string Nev { get; set; }
|
||||
[XmlElement(ElementName = "leiras", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string Leiras { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
using System;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace Kreta.EESZTInterface.eFT.Model.IntezmenyiAllomanyLista.Response
|
||||
{
|
||||
[Serializable]
|
||||
[XmlRoot(ElementName = "getIntezmenyiAllomanyListaResponse", Namespace = Namespaces.allomanyPublikaloServiceV1Ns)]
|
||||
public class GetIntezmenyiAllomanyListaResponse
|
||||
{
|
||||
[XmlElement(ElementName = "intezmenyiAllomanyListaResponse", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public IntezmenyiAllomanyListaResponse IntezmenyiAllomanyListaResponse { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
using System.Xml.Serialization;
|
||||
|
||||
namespace Kreta.EESZTInterface.eFT.Model.IntezmenyiAllomanyLista.Response
|
||||
{
|
||||
public class IntezmenyiAllomanyListaResponse : EftResponse
|
||||
{
|
||||
[XmlElement(ElementName = "intezmenyiAllomanyListaResponseBusinessContent", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public IntezmenyiAllomanyListaResponseBusinessContent IntezmenyiAllomanyListaResponseBusinessContent { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace Kreta.EESZTInterface.eFT.Model.IntezmenyiAllomanyLista.Response
|
||||
{
|
||||
public class IntezmenyiAllomanyListaResponseBusinessContent
|
||||
{
|
||||
[XmlArray(ElementName = "allomanyok", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
[XmlArrayItem(ElementName = "allomany", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public List<Allomany> Allomanyok { get; set; }
|
||||
}
|
||||
}
|
24
Kreta.EESZTInterface/eFT/Model/Logging.cs
Normal file
24
Kreta.EESZTInterface/eFT/Model/Logging.cs
Normal file
|
@ -0,0 +1,24 @@
|
|||
using System;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace Kreta.EESZTInterface.eFT.Model
|
||||
{
|
||||
public class Logging
|
||||
{
|
||||
[XmlIgnore]
|
||||
public DateTime SubmittedAt { get; set; }
|
||||
|
||||
[XmlElement(ElementName = "submittedAt", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string SubmittedAtStr
|
||||
{
|
||||
get
|
||||
{
|
||||
return SubmittedAt.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ");
|
||||
}
|
||||
set
|
||||
{
|
||||
SubmittedAt = DateTime.Parse(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
14
Kreta.EESZTInterface/eFT/Model/RepresentedUser.cs
Normal file
14
Kreta.EESZTInterface/eFT/Model/RepresentedUser.cs
Normal file
|
@ -0,0 +1,14 @@
|
|||
using System.Xml.Serialization;
|
||||
|
||||
namespace Kreta.EESZTInterface.eFT.Model
|
||||
{
|
||||
public class RepresentedUser
|
||||
{
|
||||
[XmlElement(ElementName = "userId", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string UserId { get; set; }
|
||||
[XmlElement(ElementName = "userName", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string UserName { get; set; }
|
||||
[XmlElement(ElementName = "clientUserId", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string ClientUserId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
using System.Xml.Serialization;
|
||||
|
||||
namespace Kreta.EESZTInterface.eFT.Model.SikeresCimzettAllomanyLetoltes.Request
|
||||
{
|
||||
public class SikeresAllomanyLetoltesRequest : EftRequest
|
||||
{
|
||||
[XmlElement(ElementName = "sikeresAllomanyLetoltesRequestBusinessContent", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public SikeresAllomanyLetoltesRequestBusinessContent SikeresAllomanyLetoltesRequestBusinessContent { get; set; }
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
using System;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace Kreta.EESZTInterface.eFT.Model.SikeresCimzettAllomanyLetoltes.Request
|
||||
{
|
||||
public class SikeresAllomanyLetoltesRequestBusinessContent
|
||||
{
|
||||
[XmlElement(ElementName = "allomanyPublikusId", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public Guid AllomanyPublikusId { get; set; }
|
||||
[XmlElement(ElementName = "cimzettId", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string CimzettId { get; set; }
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
using System;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace Kreta.EESZTInterface.eFT.Model.SikeresCimzettAllomanyLetoltes.Request
|
||||
{
|
||||
[Serializable]
|
||||
[XmlRoot(ElementName = "sikeresCimzettAllomanyLetoltes", Namespace = Namespaces.allomanyPublikaloServiceV1Ns)]
|
||||
public class SikeresCimzettAllomanyLetoltes
|
||||
{
|
||||
[XmlElement(ElementName = "sikeresAllomanyLetoltesRequest", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public SikeresAllomanyLetoltesRequest SikeresAllomanyLetoltesRequest { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
using System.Xml.Serialization;
|
||||
|
||||
namespace Kreta.EESZTInterface.eFT.Model.SikeresCimzettAllomanyLetoltes.Response
|
||||
{
|
||||
public class SikeresAllomanyLetoltesResponse : EftResponse
|
||||
{
|
||||
[XmlElement(ElementName = "sikeresAllomanyLetoltesResponseBusinessContent", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string SikeresAllomanyLetoltesResponseBusinessContent { get; set; } = null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
using System;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace Kreta.EESZTInterface.eFT.Model.SikeresCimzettAllomanyLetoltes.Response
|
||||
{
|
||||
[Serializable]
|
||||
[XmlRoot(ElementName = "sikeresCimzettAllomanyLetoltesResponse", Namespace = Namespaces.allomanyPublikaloServiceV1Ns)]
|
||||
public class SikeresCimzettAllomanyLetoltesResponse
|
||||
{
|
||||
[XmlElement(ElementName = "sikeresAllomanyLetoltesResponse", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public SikeresAllomanyLetoltesResponse SikeresAllomanyLetoltesResponse { get; set; }
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue