diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/DangerousGoodsDetailControl.xaml.cs b/ENI-2/ENI2/ENI2/DetailViewControls/DangerousGoodsDetailControl.xaml.cs
index c1bdc90f..75c42189 100644
--- a/ENI-2/ENI2/ENI2/DetailViewControls/DangerousGoodsDetailControl.xaml.cs
+++ b/ENI-2/ENI2/ENI2/DetailViewControls/DangerousGoodsDetailControl.xaml.cs
@@ -319,13 +319,13 @@ namespace ENI2.DetailViewControls
if (theHAZ == this.haz)
{
if (!(this.checkBoxDangerousGoodsOnBoard.IsChecked ?? false)) this.checkBoxDangerousGoodsOnBoard.IsChecked = true;
- if (!(this.checkBoxDGManifestOnBoard.IsChecked ?? false)) this.checkBoxDGManifestOnBoard.IsChecked = true;
+ // if (!(this.checkBoxDGManifestOnBoard.IsChecked ?? false)) this.checkBoxDGManifestOnBoard.IsChecked = true;
if (this.checkBoxMoUBaltic.IsChecked ?? true) this.checkBoxMoUBaltic.IsChecked = false;
}
else
{
theHAZ.NoDPGOnBoardOnArrival = false;
- theHAZ.DPGManifestOnBoardOnArrival = true;
+ // theHAZ.DPGManifestOnBoardOnArrival = true;
theHAZ.MOUBaltic = false;
}
}
diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/PSC72hDetailControl.xaml b/ENI-2/ENI2/ENI2/DetailViewControls/PSC72hDetailControl.xaml
index 81203bda..16ff8e6b 100644
--- a/ENI-2/ENI2/ENI2/DetailViewControls/PSC72hDetailControl.xaml
+++ b/ENI-2/ENI2/ENI2/DetailViewControls/PSC72hDetailControl.xaml
@@ -38,13 +38,13 @@
-
+
-
+
-
+
diff --git a/Stundensheet.xlsx b/Stundensheet.xlsx
index f73486ac..9e98eff7 100644
Binary files a/Stundensheet.xlsx and b/Stundensheet.xlsx differ
diff --git a/nsw/Source/bsmd.database/HAZ.cs b/nsw/Source/bsmd.database/HAZ.cs
index c2a37c7e..bbfce00c 100644
--- a/nsw/Source/bsmd.database/HAZ.cs
+++ b/nsw/Source/bsmd.database/HAZ.cs
@@ -427,7 +427,7 @@ namespace bsmd.database
public override void Validate(List errors, List violations)
{
- if (this.NoDPGOnBoardOnArrival ?? false) // && this.MessageHeader.InternalStatus == Message.BSMDStatus.TOSEND)
+ if ((this.NoDPGOnBoardOnArrival ?? false) && this.MessageHeader.InternalStatus == Message.BSMDStatus.TOSEND)
{
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "No DPG on board set!", null, this.Title, null, this.Tablename));
}
diff --git a/nsw/Source/bsmd.database/PRE72H.cs b/nsw/Source/bsmd.database/PRE72H.cs
index 97d0f91b..e708490f 100644
--- a/nsw/Source/bsmd.database/PRE72H.cs
+++ b/nsw/Source/bsmd.database/PRE72H.cs
@@ -40,7 +40,7 @@ namespace bsmd.database
[ShowReport]
[LookupName("PRE72H.NaturOfCargo")]
- [MaxLength(100)]
+ [MaxLength(99)]
[ENI2Validation]
public string NatureOfCargo { get; set; }
@@ -52,7 +52,7 @@ namespace bsmd.database
[ShowReport]
[Validation(ValidationCode.NOT_NULL)]
[LookupName("PRE72H.PlannedOperations")]
- [MaxLength(100)]
+ [MaxLength(99)]
[ENI2Validation]
public string PlannedOperations { get; set; }
diff --git a/nsw/Source/bsmd.dbh.ResponseService/IResponseService.cs b/nsw/Source/bsmd.dbh.ResponseService/IResponseService.cs
index 45d79f8b..ebdd3897 100644
--- a/nsw/Source/bsmd.dbh.ResponseService/IResponseService.cs
+++ b/nsw/Source/bsmd.dbh.ResponseService/IResponseService.cs
@@ -15,12 +15,12 @@ namespace bsmd.dbh.ResponseService
///
[OperationContract(Action = "http://tempuri.org/IResponseService/NSWResponse")]
[XmlSerializerFormatAttribute()]
- void root(string Version, string MessageId, string VisitId, string TransitId, DateTime Timestamp,
+ void Root(string Version, string MessageId, string VisitId, string TransitId, DateTime Timestamp,
string SenderReference, bsmd.dbh.response.RootType Type,
- List ReportingClassesFull,
- List ReportingClassesPartial,
- List RootReportingClassesError,
- List ReportingClassesResetted,
+ bsmd.dbh.response.RootReportingClassesFull ReportingClassesFull,
+ bsmd.dbh.response.RootReportingClassesPartial ReportingClassesPartial,
+ bsmd.dbh.response.RootReportingClassesError RootReportingClassesError,
+ bsmd.dbh.response.RootReportingClassesResetted ReportingClassesResetted,
List Messages);
}
diff --git a/nsw/Source/bsmd.dbh.ResponseService/ResponseService.svc.cs b/nsw/Source/bsmd.dbh.ResponseService/ResponseService.svc.cs
index a86bbd24..1efa8638 100644
--- a/nsw/Source/bsmd.dbh.ResponseService/ResponseService.svc.cs
+++ b/nsw/Source/bsmd.dbh.ResponseService/ResponseService.svc.cs
@@ -1,10 +1,5 @@
using System;
using System.Collections.Generic;
-using System.Linq;
-using System.Runtime.Serialization;
-using System.ServiceModel;
-using System.ServiceModel.Web;
-using System.Text;
using log4net;
using bsmd.database;
@@ -17,19 +12,42 @@ namespace bsmd.dbh.ResponseService
{
private ILog _log = LogManager.GetLogger("dbh ResponseService");
- public void root(string Version, string MessageId, string VisitId, string TransitId, DateTime Timestamp,
+ public void Root(string Version, string MessageId, string VisitId, string TransitId, DateTime Timestamp,
string SenderReference, bsmd.dbh.response.RootType Type,
- List ReportingClassesFull,
- List ReportingClassesPartial,
- List RootReportingClassesError,
- List ReportingClassesResetted,
+ bsmd.dbh.response.RootReportingClassesFull ReportingClassesFull,
+ bsmd.dbh.response.RootReportingClassesPartial ReportingClassesPartial,
+ bsmd.dbh.response.RootReportingClassesError RootReportingClassesError,
+ bsmd.dbh.response.RootReportingClassesResetted ReportingClassesResetted,
List Messages)
{
-
+
+ // Der Fehler hier aktuell ist dass alles funktioniert, außer dass "Messages" nicht
+ // richtig deserialisiert wird und immer in eine leere Collection mündet. Die anderen
+ // Parameter sind richtig gesetzt. Per trial and error sowohl List als auch
+ // RootMessage[] Messages ausprobiert. Element ist immer da, aber leer! (müsste aber ein Element haben!)
+
+
+ _log.Info("dbh response received");
+ if (ReportingClassesFull == null) _log.InfoFormat("ReportingClassesFull null");
+ if (ReportingClassesPartial == null) _log.InfoFormat("ReportingClassesPartial null");
+ if (RootReportingClassesError == null) _log.InfoFormat("ReportingClassesError null");
+ if (ReportingClassesResetted == null) _log.InfoFormat("ReportingClassesResetted null");
+ if (Messages == null) { _log.InfoFormat("Messages null"); }
+ else
+ {
+ _log.InfoFormat(Messages.GetType().ToString());
+ _log.InfoFormat("{0} RootMessage elements received", (Messages.Count));
+ }
+
+
if (Version != null)
_log.InfoFormat("Version: {0}", Version);
+ else
+ _log.Warn("Version is null");
if (MessageId != null)
_log.InfoFormat("MessageId: {0}", MessageId);
+ else
+ _log.Warn("MessageId is null");
if (!VisitId.IsNullOrEmpty())
_log.InfoFormat("Visit-Id: {0}", VisitId);
if (!TransitId.IsNullOrEmpty())
@@ -38,8 +56,9 @@ namespace bsmd.dbh.ResponseService
_log.InfoFormat("Timestamp: {0}", Timestamp);
if (SenderReference != null)
_log.InfoFormat("Sender-Reference: {0}", SenderReference);
-
+
_log.InfoFormat("Type: {0}", Type);
+ /*
if (Messages != null)
{
foreach (bsmd.dbh.response.RootMessage rootMessage in Messages)
@@ -47,13 +66,12 @@ namespace bsmd.dbh.ResponseService
_log.InfoFormat("Message type {0}: {1}", rootMessage.Type, rootMessage.Text);
}
}
-
+ */
if (SenderReference.IsNullOrEmpty())
{
_log.ErrorFormat("No sender reference, cannot process message");
return;
}
-
_log.DebugFormat("processing {0}..", MessageId ?? "?");
Response.ProcessResponse(VisitId, TransitId, Timestamp, SenderReference, Type, Messages,
diff --git a/nsw/Source/bsmd.dbh.ResponseService/bsmd.dbh.ResponseService.csproj b/nsw/Source/bsmd.dbh.ResponseService/bsmd.dbh.ResponseService.csproj
index 17825631..bb72e175 100644
--- a/nsw/Source/bsmd.dbh.ResponseService/bsmd.dbh.ResponseService.csproj
+++ b/nsw/Source/bsmd.dbh.ResponseService/bsmd.dbh.ResponseService.csproj
@@ -124,6 +124,9 @@
bsmd.dbh
+
+
+
10.0
$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
diff --git a/nsw/Source/bsmd.dbh/NSWResponse.designer.cs b/nsw/Source/bsmd.dbh/NSWResponse.designer.cs
deleted file mode 100644
index 20c086a3..00000000
--- a/nsw/Source/bsmd.dbh/NSWResponse.designer.cs
+++ /dev/null
@@ -1,1608 +0,0 @@
-// ------------------------------------------------------------------------------
-//
-// Generated by Xsd2Code. Version 3.4.0.32989
-// bsmd.dbh.responseListCSharpFalseFalseFalseFalseFalseFalseFalseTrueFalseFalseFalseFalseNet40SerializeDeserializeSaveToFileLoadFromFileFalseFalseFalseFalseFalseFalseDefaultUTF8FalseTrue
-//
-// ------------------------------------------------------------------------------
-namespace bsmd.dbh.response
-{
- using System;
- using System.Diagnostics;
- using System.Xml.Serialization;
- using System.Collections;
- using System.Xml.Schema;
- using System.ComponentModel;
- using System.IO;
- using System.Text;
- using System.Collections.Generic;
-
-
- public partial class Root
- {
-
- private string versionField;
-
- private string messageIdField;
-
- private string visitIdField;
-
- private string transitIdField;
-
- private List sisNumbersField;
-
- private System.DateTime timestampField;
-
- private string senderReferenceField;
-
- private RootType typeField;
-
- private RootReportingClassesFull reportingClassesFullField;
-
- private RootReportingClassesPartial reportingClassesPartialField;
-
- private RootReportingClassesError reportingClassesErrorField;
-
- private RootReportingClassesResetted reportingClassesResettedField;
-
- private List messagesField;
-
- private static System.Xml.Serialization.XmlSerializer serializer;
-
- public Root()
- {
- this.messagesField = new List();
- this.reportingClassesResettedField = new RootReportingClassesResetted();
- this.reportingClassesErrorField = new RootReportingClassesError();
- this.reportingClassesPartialField = new RootReportingClassesPartial();
- this.reportingClassesFullField = new RootReportingClassesFull();
- this.sisNumbersField = new List();
- }
-
- public string Version
- {
- get
- {
- return this.versionField;
- }
- set
- {
- this.versionField = value;
- }
- }
-
- public string MessageId
- {
- get
- {
- return this.messageIdField;
- }
- set
- {
- this.messageIdField = value;
- }
- }
-
- public string VisitId
- {
- get
- {
- return this.visitIdField;
- }
- set
- {
- this.visitIdField = value;
- }
- }
-
- public string TransitId
- {
- get
- {
- return this.transitIdField;
- }
- set
- {
- this.transitIdField = value;
- }
- }
-
- [System.Xml.Serialization.XmlArrayItemAttribute("SisNumber", IsNullable = false)]
- public List SisNumbers
- {
- get
- {
- return this.sisNumbersField;
- }
- set
- {
- this.sisNumbersField = value;
- }
- }
-
- public System.DateTime Timestamp
- {
- get
- {
- return this.timestampField;
- }
- set
- {
- this.timestampField = value;
- }
- }
-
- public string SenderReference
- {
- get
- {
- return this.senderReferenceField;
- }
- set
- {
- this.senderReferenceField = value;
- }
- }
-
- public RootType Type
- {
- get
- {
- return this.typeField;
- }
- set
- {
- this.typeField = value;
- }
- }
-
- public RootReportingClassesFull ReportingClassesFull
- {
- get
- {
- return this.reportingClassesFullField;
- }
- set
- {
- this.reportingClassesFullField = value;
- }
- }
-
- public RootReportingClassesPartial ReportingClassesPartial
- {
- get
- {
- return this.reportingClassesPartialField;
- }
- set
- {
- this.reportingClassesPartialField = value;
- }
- }
-
- public RootReportingClassesError ReportingClassesError
- {
- get
- {
- return this.reportingClassesErrorField;
- }
- set
- {
- this.reportingClassesErrorField = value;
- }
- }
-
- public RootReportingClassesResetted ReportingClassesResetted
- {
- get
- {
- return this.reportingClassesResettedField;
- }
- set
- {
- this.reportingClassesResettedField = value;
- }
- }
-
- [System.Xml.Serialization.XmlArrayItemAttribute("Message", IsNullable = false)]
- public List Messages
- {
- get
- {
- return this.messagesField;
- }
- set
- {
- this.messagesField = value;
- }
- }
-
- private static System.Xml.Serialization.XmlSerializer Serializer
- {
- get
- {
- if ((serializer == null))
- {
- serializer = new System.Xml.Serialization.XmlSerializer(typeof(Root));
- }
- return serializer;
- }
- }
-
- #region Serialize/Deserialize
- ///
- /// Serializes current Root object into an XML document
- ///
- /// string XML value
- public virtual string Serialize()
- {
- System.IO.StreamReader streamReader = null;
- System.IO.MemoryStream memoryStream = null;
- try
- {
- memoryStream = new System.IO.MemoryStream();
- Serializer.Serialize(memoryStream, this);
- memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
- streamReader = new System.IO.StreamReader(memoryStream);
- return streamReader.ReadToEnd();
- }
- finally
- {
- if ((streamReader != null))
- {
- streamReader.Dispose();
- }
- if ((memoryStream != null))
- {
- memoryStream.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes workflow markup into an Root object
- ///
- /// string workflow markup to deserialize
- /// Output Root object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool Deserialize(string xml, out Root obj, out System.Exception exception)
- {
- exception = null;
- obj = default(Root);
- try
- {
- obj = Deserialize(xml);
- return true;
- }
- catch (System.Exception ex)
- {
- exception = ex;
- return false;
- }
- }
-
- public static bool Deserialize(string xml, out Root obj)
- {
- System.Exception exception = null;
- return Deserialize(xml, out obj, out exception);
- }
-
- public static Root Deserialize(string xml)
- {
- System.IO.StringReader stringReader = null;
- try
- {
- stringReader = new System.IO.StringReader(xml);
- return ((Root)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
- }
- finally
- {
- if ((stringReader != null))
- {
- stringReader.Dispose();
- }
- }
- }
-
- ///
- /// Serializes current Root object into file
- ///
- /// full path of outupt xml file
- /// output Exception value if failed
- /// true if can serialize and save into file; otherwise, false
- public virtual bool SaveToFile(string fileName, out System.Exception exception)
- {
- exception = null;
- try
- {
- SaveToFile(fileName);
- return true;
- }
- catch (System.Exception e)
- {
- exception = e;
- return false;
- }
- }
-
- public virtual void SaveToFile(string fileName)
- {
- System.IO.StreamWriter streamWriter = null;
- try
- {
- string xmlString = Serialize();
- System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
- streamWriter = xmlFile.CreateText();
- streamWriter.WriteLine(xmlString);
- streamWriter.Close();
- }
- finally
- {
- if ((streamWriter != null))
- {
- streamWriter.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes xml markup from file into an Root object
- ///
- /// string xml file to load and deserialize
- /// Output Root object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool LoadFromFile(string fileName, out Root obj, out System.Exception exception)
- {
- exception = null;
- obj = default(Root);
- try
- {
- obj = LoadFromFile(fileName);
- return true;
- }
- catch (System.Exception ex)
- {
- exception = ex;
- return false;
- }
- }
-
- public static bool LoadFromFile(string fileName, out Root obj)
- {
- System.Exception exception = null;
- return LoadFromFile(fileName, out obj, out exception);
- }
-
- public static Root LoadFromFile(string fileName)
- {
- System.IO.FileStream file = null;
- System.IO.StreamReader sr = null;
- try
- {
- file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
- sr = new System.IO.StreamReader(file);
- string xmlString = sr.ReadToEnd();
- sr.Close();
- file.Close();
- return Deserialize(xmlString);
- }
- finally
- {
- if ((file != null))
- {
- file.Dispose();
- }
- if ((sr != null))
- {
- sr.Dispose();
- }
- }
- }
- #endregion
- }
-
- public enum RootType
- {
-
- ///
- VISIT,
-
- ///
- TRANSIT,
-
- ///
- DATA,
-
- ///
- RESET,
-
- ///
- CANCEL,
- }
-
- public partial class RootReportingClassesFull
- {
-
- private List reportingClassField;
-
- private static System.Xml.Serialization.XmlSerializer serializer;
-
- public RootReportingClassesFull()
- {
- this.reportingClassField = new List();
- }
-
- public List ReportingClass
- {
- get
- {
- return this.reportingClassField;
- }
- set
- {
- this.reportingClassField = value;
- }
- }
-
- private static System.Xml.Serialization.XmlSerializer Serializer
- {
- get
- {
- if ((serializer == null))
- {
- serializer = new System.Xml.Serialization.XmlSerializer(typeof(RootReportingClassesFull));
- }
- return serializer;
- }
- }
-
- #region Serialize/Deserialize
- ///
- /// Serializes current RootReportingClassesFull object into an XML document
- ///
- /// string XML value
- public virtual string Serialize()
- {
- System.IO.StreamReader streamReader = null;
- System.IO.MemoryStream memoryStream = null;
- try
- {
- memoryStream = new System.IO.MemoryStream();
- Serializer.Serialize(memoryStream, this);
- memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
- streamReader = new System.IO.StreamReader(memoryStream);
- return streamReader.ReadToEnd();
- }
- finally
- {
- if ((streamReader != null))
- {
- streamReader.Dispose();
- }
- if ((memoryStream != null))
- {
- memoryStream.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes workflow markup into an RootReportingClassesFull object
- ///
- /// string workflow markup to deserialize
- /// Output RootReportingClassesFull object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool Deserialize(string xml, out RootReportingClassesFull obj, out System.Exception exception)
- {
- exception = null;
- obj = default(RootReportingClassesFull);
- try
- {
- obj = Deserialize(xml);
- return true;
- }
- catch (System.Exception ex)
- {
- exception = ex;
- return false;
- }
- }
-
- public static bool Deserialize(string xml, out RootReportingClassesFull obj)
- {
- System.Exception exception = null;
- return Deserialize(xml, out obj, out exception);
- }
-
- public static RootReportingClassesFull Deserialize(string xml)
- {
- System.IO.StringReader stringReader = null;
- try
- {
- stringReader = new System.IO.StringReader(xml);
- return ((RootReportingClassesFull)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
- }
- finally
- {
- if ((stringReader != null))
- {
- stringReader.Dispose();
- }
- }
- }
-
- ///
- /// Serializes current RootReportingClassesFull object into file
- ///
- /// full path of outupt xml file
- /// output Exception value if failed
- /// true if can serialize and save into file; otherwise, false
- public virtual bool SaveToFile(string fileName, out System.Exception exception)
- {
- exception = null;
- try
- {
- SaveToFile(fileName);
- return true;
- }
- catch (System.Exception e)
- {
- exception = e;
- return false;
- }
- }
-
- public virtual void SaveToFile(string fileName)
- {
- System.IO.StreamWriter streamWriter = null;
- try
- {
- string xmlString = Serialize();
- System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
- streamWriter = xmlFile.CreateText();
- streamWriter.WriteLine(xmlString);
- streamWriter.Close();
- }
- finally
- {
- if ((streamWriter != null))
- {
- streamWriter.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes xml markup from file into an RootReportingClassesFull object
- ///
- /// string xml file to load and deserialize
- /// Output RootReportingClassesFull object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool LoadFromFile(string fileName, out RootReportingClassesFull obj, out System.Exception exception)
- {
- exception = null;
- obj = default(RootReportingClassesFull);
- try
- {
- obj = LoadFromFile(fileName);
- return true;
- }
- catch (System.Exception ex)
- {
- exception = ex;
- return false;
- }
- }
-
- public static bool LoadFromFile(string fileName, out RootReportingClassesFull obj)
- {
- System.Exception exception = null;
- return LoadFromFile(fileName, out obj, out exception);
- }
-
- public static RootReportingClassesFull LoadFromFile(string fileName)
- {
- System.IO.FileStream file = null;
- System.IO.StreamReader sr = null;
- try
- {
- file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
- sr = new System.IO.StreamReader(file);
- string xmlString = sr.ReadToEnd();
- sr.Close();
- file.Close();
- return Deserialize(xmlString);
- }
- finally
- {
- if ((file != null))
- {
- file.Dispose();
- }
- if ((sr != null))
- {
- sr.Dispose();
- }
- }
- }
- #endregion
- }
-
- public enum ReportingClassCode
- {
-
- ///
- NOA_NOD,
-
- ///
- ATA,
-
- ///
- ATD,
-
- ///
- SEC,
-
- ///
- AGNT,
-
- ///
- POBA,
-
- ///
- POBD,
-
- ///
- NAME,
-
- ///
- TIEFA,
-
- ///
- TIEFD,
-
- ///
- BKRA,
-
- ///
- BKRD,
-
- ///
- STAT,
-
- ///
- LADG,
-
- ///
- INFO,
-
- ///
- SERV,
-
- ///
- PRE72H,
-
- ///
- MDH,
-
- ///
- WAS,
-
- ///
- CREW,
-
- ///
- PAS,
-
- ///
- BPOL,
-
- ///
- TOWA,
-
- ///
- TOWD,
-
- ///
- HAZA,
-
- ///
- HAZD,
- }
-
- public partial class RootReportingClassesPartial
- {
-
- private List reportingClassField;
-
- private static System.Xml.Serialization.XmlSerializer serializer;
-
- public RootReportingClassesPartial()
- {
- this.reportingClassField = new List();
- }
-
- public List ReportingClass
- {
- get
- {
- return this.reportingClassField;
- }
- set
- {
- this.reportingClassField = value;
- }
- }
-
- private static System.Xml.Serialization.XmlSerializer Serializer
- {
- get
- {
- if ((serializer == null))
- {
- serializer = new System.Xml.Serialization.XmlSerializer(typeof(RootReportingClassesPartial));
- }
- return serializer;
- }
- }
-
- #region Serialize/Deserialize
- ///
- /// Serializes current RootReportingClassesPartial object into an XML document
- ///
- /// string XML value
- public virtual string Serialize()
- {
- System.IO.StreamReader streamReader = null;
- System.IO.MemoryStream memoryStream = null;
- try
- {
- memoryStream = new System.IO.MemoryStream();
- Serializer.Serialize(memoryStream, this);
- memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
- streamReader = new System.IO.StreamReader(memoryStream);
- return streamReader.ReadToEnd();
- }
- finally
- {
- if ((streamReader != null))
- {
- streamReader.Dispose();
- }
- if ((memoryStream != null))
- {
- memoryStream.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes workflow markup into an RootReportingClassesPartial object
- ///
- /// string workflow markup to deserialize
- /// Output RootReportingClassesPartial object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool Deserialize(string xml, out RootReportingClassesPartial obj, out System.Exception exception)
- {
- exception = null;
- obj = default(RootReportingClassesPartial);
- try
- {
- obj = Deserialize(xml);
- return true;
- }
- catch (System.Exception ex)
- {
- exception = ex;
- return false;
- }
- }
-
- public static bool Deserialize(string xml, out RootReportingClassesPartial obj)
- {
- System.Exception exception = null;
- return Deserialize(xml, out obj, out exception);
- }
-
- public static RootReportingClassesPartial Deserialize(string xml)
- {
- System.IO.StringReader stringReader = null;
- try
- {
- stringReader = new System.IO.StringReader(xml);
- return ((RootReportingClassesPartial)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
- }
- finally
- {
- if ((stringReader != null))
- {
- stringReader.Dispose();
- }
- }
- }
-
- ///
- /// Serializes current RootReportingClassesPartial object into file
- ///
- /// full path of outupt xml file
- /// output Exception value if failed
- /// true if can serialize and save into file; otherwise, false
- public virtual bool SaveToFile(string fileName, out System.Exception exception)
- {
- exception = null;
- try
- {
- SaveToFile(fileName);
- return true;
- }
- catch (System.Exception e)
- {
- exception = e;
- return false;
- }
- }
-
- public virtual void SaveToFile(string fileName)
- {
- System.IO.StreamWriter streamWriter = null;
- try
- {
- string xmlString = Serialize();
- System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
- streamWriter = xmlFile.CreateText();
- streamWriter.WriteLine(xmlString);
- streamWriter.Close();
- }
- finally
- {
- if ((streamWriter != null))
- {
- streamWriter.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes xml markup from file into an RootReportingClassesPartial object
- ///
- /// string xml file to load and deserialize
- /// Output RootReportingClassesPartial object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool LoadFromFile(string fileName, out RootReportingClassesPartial obj, out System.Exception exception)
- {
- exception = null;
- obj = default(RootReportingClassesPartial);
- try
- {
- obj = LoadFromFile(fileName);
- return true;
- }
- catch (System.Exception ex)
- {
- exception = ex;
- return false;
- }
- }
-
- public static bool LoadFromFile(string fileName, out RootReportingClassesPartial obj)
- {
- System.Exception exception = null;
- return LoadFromFile(fileName, out obj, out exception);
- }
-
- public static RootReportingClassesPartial LoadFromFile(string fileName)
- {
- System.IO.FileStream file = null;
- System.IO.StreamReader sr = null;
- try
- {
- file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
- sr = new System.IO.StreamReader(file);
- string xmlString = sr.ReadToEnd();
- sr.Close();
- file.Close();
- return Deserialize(xmlString);
- }
- finally
- {
- if ((file != null))
- {
- file.Dispose();
- }
- if ((sr != null))
- {
- sr.Dispose();
- }
- }
- }
- #endregion
- }
-
- public partial class RootReportingClassesError
- {
-
- private List reportingClassField;
-
- private static System.Xml.Serialization.XmlSerializer serializer;
-
- public RootReportingClassesError()
- {
- this.reportingClassField = new List();
- }
-
- public List ReportingClass
- {
- get
- {
- return this.reportingClassField;
- }
- set
- {
- this.reportingClassField = value;
- }
- }
-
- private static System.Xml.Serialization.XmlSerializer Serializer
- {
- get
- {
- if ((serializer == null))
- {
- serializer = new System.Xml.Serialization.XmlSerializer(typeof(RootReportingClassesError));
- }
- return serializer;
- }
- }
-
- #region Serialize/Deserialize
- ///
- /// Serializes current RootReportingClassesError object into an XML document
- ///
- /// string XML value
- public virtual string Serialize()
- {
- System.IO.StreamReader streamReader = null;
- System.IO.MemoryStream memoryStream = null;
- try
- {
- memoryStream = new System.IO.MemoryStream();
- Serializer.Serialize(memoryStream, this);
- memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
- streamReader = new System.IO.StreamReader(memoryStream);
- return streamReader.ReadToEnd();
- }
- finally
- {
- if ((streamReader != null))
- {
- streamReader.Dispose();
- }
- if ((memoryStream != null))
- {
- memoryStream.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes workflow markup into an RootReportingClassesError object
- ///
- /// string workflow markup to deserialize
- /// Output RootReportingClassesError object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool Deserialize(string xml, out RootReportingClassesError obj, out System.Exception exception)
- {
- exception = null;
- obj = default(RootReportingClassesError);
- try
- {
- obj = Deserialize(xml);
- return true;
- }
- catch (System.Exception ex)
- {
- exception = ex;
- return false;
- }
- }
-
- public static bool Deserialize(string xml, out RootReportingClassesError obj)
- {
- System.Exception exception = null;
- return Deserialize(xml, out obj, out exception);
- }
-
- public static RootReportingClassesError Deserialize(string xml)
- {
- System.IO.StringReader stringReader = null;
- try
- {
- stringReader = new System.IO.StringReader(xml);
- return ((RootReportingClassesError)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
- }
- finally
- {
- if ((stringReader != null))
- {
- stringReader.Dispose();
- }
- }
- }
-
- ///
- /// Serializes current RootReportingClassesError object into file
- ///
- /// full path of outupt xml file
- /// output Exception value if failed
- /// true if can serialize and save into file; otherwise, false
- public virtual bool SaveToFile(string fileName, out System.Exception exception)
- {
- exception = null;
- try
- {
- SaveToFile(fileName);
- return true;
- }
- catch (System.Exception e)
- {
- exception = e;
- return false;
- }
- }
-
- public virtual void SaveToFile(string fileName)
- {
- System.IO.StreamWriter streamWriter = null;
- try
- {
- string xmlString = Serialize();
- System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
- streamWriter = xmlFile.CreateText();
- streamWriter.WriteLine(xmlString);
- streamWriter.Close();
- }
- finally
- {
- if ((streamWriter != null))
- {
- streamWriter.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes xml markup from file into an RootReportingClassesError object
- ///
- /// string xml file to load and deserialize
- /// Output RootReportingClassesError object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool LoadFromFile(string fileName, out RootReportingClassesError obj, out System.Exception exception)
- {
- exception = null;
- obj = default(RootReportingClassesError);
- try
- {
- obj = LoadFromFile(fileName);
- return true;
- }
- catch (System.Exception ex)
- {
- exception = ex;
- return false;
- }
- }
-
- public static bool LoadFromFile(string fileName, out RootReportingClassesError obj)
- {
- System.Exception exception = null;
- return LoadFromFile(fileName, out obj, out exception);
- }
-
- public static RootReportingClassesError LoadFromFile(string fileName)
- {
- System.IO.FileStream file = null;
- System.IO.StreamReader sr = null;
- try
- {
- file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
- sr = new System.IO.StreamReader(file);
- string xmlString = sr.ReadToEnd();
- sr.Close();
- file.Close();
- return Deserialize(xmlString);
- }
- finally
- {
- if ((file != null))
- {
- file.Dispose();
- }
- if ((sr != null))
- {
- sr.Dispose();
- }
- }
- }
- #endregion
- }
-
- public partial class RootReportingClassesResetted
- {
-
- private List reportingClassField;
-
- private static System.Xml.Serialization.XmlSerializer serializer;
-
- public RootReportingClassesResetted()
- {
- this.reportingClassField = new List();
- }
-
- public List ReportingClass
- {
- get
- {
- return this.reportingClassField;
- }
- set
- {
- this.reportingClassField = value;
- }
- }
-
- private static System.Xml.Serialization.XmlSerializer Serializer
- {
- get
- {
- if ((serializer == null))
- {
- serializer = new System.Xml.Serialization.XmlSerializer(typeof(RootReportingClassesResetted));
- }
- return serializer;
- }
- }
-
- #region Serialize/Deserialize
- ///
- /// Serializes current RootReportingClassesResetted object into an XML document
- ///
- /// string XML value
- public virtual string Serialize()
- {
- System.IO.StreamReader streamReader = null;
- System.IO.MemoryStream memoryStream = null;
- try
- {
- memoryStream = new System.IO.MemoryStream();
- Serializer.Serialize(memoryStream, this);
- memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
- streamReader = new System.IO.StreamReader(memoryStream);
- return streamReader.ReadToEnd();
- }
- finally
- {
- if ((streamReader != null))
- {
- streamReader.Dispose();
- }
- if ((memoryStream != null))
- {
- memoryStream.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes workflow markup into an RootReportingClassesResetted object
- ///
- /// string workflow markup to deserialize
- /// Output RootReportingClassesResetted object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool Deserialize(string xml, out RootReportingClassesResetted obj, out System.Exception exception)
- {
- exception = null;
- obj = default(RootReportingClassesResetted);
- try
- {
- obj = Deserialize(xml);
- return true;
- }
- catch (System.Exception ex)
- {
- exception = ex;
- return false;
- }
- }
-
- public static bool Deserialize(string xml, out RootReportingClassesResetted obj)
- {
- System.Exception exception = null;
- return Deserialize(xml, out obj, out exception);
- }
-
- public static RootReportingClassesResetted Deserialize(string xml)
- {
- System.IO.StringReader stringReader = null;
- try
- {
- stringReader = new System.IO.StringReader(xml);
- return ((RootReportingClassesResetted)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
- }
- finally
- {
- if ((stringReader != null))
- {
- stringReader.Dispose();
- }
- }
- }
-
- ///
- /// Serializes current RootReportingClassesResetted object into file
- ///
- /// full path of outupt xml file
- /// output Exception value if failed
- /// true if can serialize and save into file; otherwise, false
- public virtual bool SaveToFile(string fileName, out System.Exception exception)
- {
- exception = null;
- try
- {
- SaveToFile(fileName);
- return true;
- }
- catch (System.Exception e)
- {
- exception = e;
- return false;
- }
- }
-
- public virtual void SaveToFile(string fileName)
- {
- System.IO.StreamWriter streamWriter = null;
- try
- {
- string xmlString = Serialize();
- System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
- streamWriter = xmlFile.CreateText();
- streamWriter.WriteLine(xmlString);
- streamWriter.Close();
- }
- finally
- {
- if ((streamWriter != null))
- {
- streamWriter.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes xml markup from file into an RootReportingClassesResetted object
- ///
- /// string xml file to load and deserialize
- /// Output RootReportingClassesResetted object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool LoadFromFile(string fileName, out RootReportingClassesResetted obj, out System.Exception exception)
- {
- exception = null;
- obj = default(RootReportingClassesResetted);
- try
- {
- obj = LoadFromFile(fileName);
- return true;
- }
- catch (System.Exception ex)
- {
- exception = ex;
- return false;
- }
- }
-
- public static bool LoadFromFile(string fileName, out RootReportingClassesResetted obj)
- {
- System.Exception exception = null;
- return LoadFromFile(fileName, out obj, out exception);
- }
-
- public static RootReportingClassesResetted LoadFromFile(string fileName)
- {
- System.IO.FileStream file = null;
- System.IO.StreamReader sr = null;
- try
- {
- file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
- sr = new System.IO.StreamReader(file);
- string xmlString = sr.ReadToEnd();
- sr.Close();
- file.Close();
- return Deserialize(xmlString);
- }
- finally
- {
- if ((file != null))
- {
- file.Dispose();
- }
- if ((sr != null))
- {
- sr.Dispose();
- }
- }
- }
- #endregion
- }
-
- public partial class RootMessage
- {
-
- private string idField;
-
- private RootMessageType typeField;
-
- private string locationField;
-
- private string textField;
-
- private static System.Xml.Serialization.XmlSerializer serializer;
-
- public string ID
- {
- get
- {
- return this.idField;
- }
- set
- {
- this.idField = value;
- }
- }
-
- public RootMessageType Type
- {
- get
- {
- return this.typeField;
- }
- set
- {
- this.typeField = value;
- }
- }
-
- public string Location
- {
- get
- {
- return this.locationField;
- }
- set
- {
- this.locationField = value;
- }
- }
-
- public string Text
- {
- get
- {
- return this.textField;
- }
- set
- {
- this.textField = value;
- }
- }
-
- private static System.Xml.Serialization.XmlSerializer Serializer
- {
- get
- {
- if ((serializer == null))
- {
- serializer = new System.Xml.Serialization.XmlSerializer(typeof(RootMessage));
- }
- return serializer;
- }
- }
-
- #region Serialize/Deserialize
- ///
- /// Serializes current RootMessage object into an XML document
- ///
- /// string XML value
- public virtual string Serialize()
- {
- System.IO.StreamReader streamReader = null;
- System.IO.MemoryStream memoryStream = null;
- try
- {
- memoryStream = new System.IO.MemoryStream();
- Serializer.Serialize(memoryStream, this);
- memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
- streamReader = new System.IO.StreamReader(memoryStream);
- return streamReader.ReadToEnd();
- }
- finally
- {
- if ((streamReader != null))
- {
- streamReader.Dispose();
- }
- if ((memoryStream != null))
- {
- memoryStream.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes workflow markup into an RootMessage object
- ///
- /// string workflow markup to deserialize
- /// Output RootMessage object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool Deserialize(string xml, out RootMessage obj, out System.Exception exception)
- {
- exception = null;
- obj = default(RootMessage);
- try
- {
- obj = Deserialize(xml);
- return true;
- }
- catch (System.Exception ex)
- {
- exception = ex;
- return false;
- }
- }
-
- public static bool Deserialize(string xml, out RootMessage obj)
- {
- System.Exception exception = null;
- return Deserialize(xml, out obj, out exception);
- }
-
- public static RootMessage Deserialize(string xml)
- {
- System.IO.StringReader stringReader = null;
- try
- {
- stringReader = new System.IO.StringReader(xml);
- return ((RootMessage)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
- }
- finally
- {
- if ((stringReader != null))
- {
- stringReader.Dispose();
- }
- }
- }
-
- ///
- /// Serializes current RootMessage object into file
- ///
- /// full path of outupt xml file
- /// output Exception value if failed
- /// true if can serialize and save into file; otherwise, false
- public virtual bool SaveToFile(string fileName, out System.Exception exception)
- {
- exception = null;
- try
- {
- SaveToFile(fileName);
- return true;
- }
- catch (System.Exception e)
- {
- exception = e;
- return false;
- }
- }
-
- public virtual void SaveToFile(string fileName)
- {
- System.IO.StreamWriter streamWriter = null;
- try
- {
- string xmlString = Serialize();
- System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
- streamWriter = xmlFile.CreateText();
- streamWriter.WriteLine(xmlString);
- streamWriter.Close();
- }
- finally
- {
- if ((streamWriter != null))
- {
- streamWriter.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes xml markup from file into an RootMessage object
- ///
- /// string xml file to load and deserialize
- /// Output RootMessage object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool LoadFromFile(string fileName, out RootMessage obj, out System.Exception exception)
- {
- exception = null;
- obj = default(RootMessage);
- try
- {
- obj = LoadFromFile(fileName);
- return true;
- }
- catch (System.Exception ex)
- {
- exception = ex;
- return false;
- }
- }
-
- public static bool LoadFromFile(string fileName, out RootMessage obj)
- {
- System.Exception exception = null;
- return LoadFromFile(fileName, out obj, out exception);
- }
-
- public static RootMessage LoadFromFile(string fileName)
- {
- System.IO.FileStream file = null;
- System.IO.StreamReader sr = null;
- try
- {
- file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
- sr = new System.IO.StreamReader(file);
- string xmlString = sr.ReadToEnd();
- sr.Close();
- file.Close();
- return Deserialize(xmlString);
- }
- finally
- {
- if ((file != null))
- {
- file.Dispose();
- }
- if ((sr != null))
- {
- sr.Dispose();
- }
- }
- }
- #endregion
- }
-
- public enum RootMessageType
- {
-
- ///
- INFO,
-
- ///
- WARNING,
-
- ///
- VIOLATION,
-
- ///
- ERROR,
- }
-}
diff --git a/nsw/Source/bsmd.dbh/NSWResponse.xsd b/nsw/Source/bsmd.dbh/NSWResponse.xsd
deleted file mode 100644
index b9c3dd26..00000000
--- a/nsw/Source/bsmd.dbh/NSWResponse.xsd
+++ /dev/null
@@ -1,244 +0,0 @@
-
-
-
-
-
-
-
-
- Version number of schema
-
-
-
-
-
-
-
-
-
-
- Unique message identifier.
-
-
-
-
- Required when TransitId is missing and field "Type" is not "VISIT or "TRANSIT"
-
-
-
-
-
-
-
-
-
-
- Required when VisitId is missing and field "Type" is not "VISIT or "TRANSIT"
-
-
-
-
-
-
-
-
-
-
- A list of SIS numbers. An empty list means that all sent numbers will be deleted. Sending a new list overwrites existing ones completely.
-
-
-
-
-
- One SIS number
-
-
-
-
-
-
-
-
-
-
-
-
- Timestamp, when the message is sent
-
-
-
-
- A customer reference that can be freely filled and will be send back in the following response. No checks are made on this field. When a new Visit- or TransitId is obtained, it should be used as a reference to match the response to its corresponding request.
-
-
-
-
-
-
-
-
-
-
- The message type (should be the same as in the request message):
-- VISIT: Creates a new declaration with the application for a VisitId. It's allowed to send further data in one or more reporting classes
-- TRANSIT: same with TransitId
-- DATA: Only data for one or more reporting classes are included
-- RESET: The data of one or more reporting classes are deleted
-- CANCEL: The whole declaration is cancelled
-
-
-
-
-
-
-
-
-
-
-
-
-
- Reporting classes that are received with all necessary data.
-
-
-
-
-
- The code of a reporting class.
-
-
-
-
-
-
-
- Reporting classes that are received with some data missing (see Messages for errors/violations).
-
-
-
-
-
- The code of a reporting class.
-
-
-
-
-
-
-
- Reporting classes that are received with some data missing (see Messages for errors/violations).
-
-
-
-
-
- The code of a reporting class.
-
-
-
-
-
-
-
- Reporting classes that are resetted (due to a message with Type RESET).
-
-
-
-
-
- The code of a reporting class.
-
-
-
-
-
-
-
- Errors, Violations, etc.
-
-
-
-
-
-
-
-
- ID (given from NSW)
-
-
-
-
-
-
-
-
-
-
-
- Type of Message (functional error, process error in report, process error in message basket, process error during status request, or violation)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/nsw/Source/bsmd.dbh/Request.cs b/nsw/Source/bsmd.dbh/Request.cs
index c927d626..dacf173f 100644
--- a/nsw/Source/bsmd.dbh/Request.cs
+++ b/nsw/Source/bsmd.dbh/Request.cs
@@ -84,7 +84,7 @@ namespace bsmd.dbh
timestamp,
Properties.Settings.Default.Sender, // BSMD sender Kennung (festverdrahtet)
senderReference,
- rootType,
+ (bsmd.dbh.DBHWebReference.RootType) rootType,
item,
itemChoiceType2,
null, // sisnumbers (weglassen)
@@ -163,7 +163,7 @@ namespace bsmd.dbh
case Message.NotificationClass.VISIT:
{
DBHWebReference.RootVisit rootVisit = new DBHWebReference.RootVisit();
- rootType = DBHWebReference.RootType.VISIT;
+ rootType = RootType.VISIT;
if (!message.MessageCore.IMO.IsNullOrEmpty())
{
@@ -192,7 +192,7 @@ namespace bsmd.dbh
case Message.NotificationClass.TRANSIT:
{
DBHWebReference.RootTransit rootTransit = new DBHWebReference.RootTransit();
- rootType = DBHWebReference.RootType.TRANSIT;
+ rootType = RootType.TRANSIT;
itemChoiceType2 = DBHWebReference.ItemChoiceType2.Transit;
if (!message.MessageCore.IMO.IsNullOrEmpty())
@@ -206,8 +206,8 @@ namespace bsmd.dbh
rootTransit.Item = message.MessageCore.ENI;
}
- if (message.MessageCore.ETA.HasValue)
- rootTransit.ETAKielCanal = message.MessageCore.ETA.Value.ToDBHDateString();
+ if (message.MessageCore.ETAKielCanal.HasValue)
+ rootTransit.ETAKielCanal = message.MessageCore.ETAKielCanal.Value.ToDBHDateString();
else
rootTransit.ETAKielCanal = null;
item = rootTransit;
@@ -1634,7 +1634,7 @@ namespace bsmd.dbh
try
{
object[] items = null;
- if ((rootType == DBHWebReference.RootType.CANCEL) || (rootType == DBHWebReference.RootType.DATA) || (rootType == DBHWebReference.RootType.RESET))
+ if ((rootType == RootType.CANCEL) || (rootType == RootType.DATA) || (rootType == RootType.RESET))
{
items = new object[1];
items[0] = item;
@@ -1661,7 +1661,7 @@ namespace bsmd.dbh
timestamp,
Properties.Settings.Default.Sender, // BSMD sender Kennung (festverdrahtet)
senderReference,
- rootType,
+ (bsmd.dbh.DBHWebReference.RootType) rootType,
item,
itemChoiceType2,
null, // sisnumbers (weglassen)
diff --git a/nsw/Source/bsmd.dbh/Response.cs b/nsw/Source/bsmd.dbh/Response.cs
index 2b74145a..4651da80 100644
--- a/nsw/Source/bsmd.dbh/Response.cs
+++ b/nsw/Source/bsmd.dbh/Response.cs
@@ -22,11 +22,11 @@ namespace bsmd.dbh
private static ILog _log = LogManager.GetLogger("dbh Response");
public static void ProcessResponse(string VisitId, string TransitId, DateTime Timestamp,
- string SenderReference, response.RootType Type, List Messages,
- List ReportingClassesFull,
- List ReportingClassesPartial,
- List RootReportingClassesError,
- List ReportingClassesResetted,
+ string SenderReference, response.RootType Type, List Messages,
+ bsmd.dbh.response.RootReportingClassesFull ReportingClassesFull,
+ bsmd.dbh.response.RootReportingClassesPartial ReportingClassesPartial,
+ bsmd.dbh.response.RootReportingClassesError RootReportingClassesError,
+ bsmd.dbh.response.RootReportingClassesResetted ReportingClassesResetted,
string connectionString)
{
@@ -43,7 +43,7 @@ namespace bsmd.dbh
if (DBManager.Instance.Connect(connectionString))
{
-
+ _log.Debug("Start PROCESS");
Guid messageId;
if (!Guid.TryParseExact(SenderReference, "N", out messageId))
{
@@ -52,6 +52,9 @@ namespace bsmd.dbh
}
DatabaseEntity dbEntity = DBManager.Instance.GetMessageById(messageId);
+ if (dbEntity != null)
+ _log.InfoFormat("Message type {0} found for SenderReference {1}", ((Message)dbEntity).MessageNotificationClassDisplay, messageId);
+
MessageCore aCore = null;
if (dbEntity == null)
{
@@ -107,13 +110,17 @@ namespace bsmd.dbh
//}
break;
case dbh.response.RootType.DATA:
- if((ReportingClassesFull != null) && (ReportingClassesFull.Count > 0) &&
- (int) ReportingClassesFull[0].ReportingClass[0] == (int)aMessage.MessageNotificationClass)
+ if((ReportingClassesFull != null) && (ReportingClassesFull.ReportingClass.Length > 0))
{
// this was successful, save status to MessageHeader
aMessage.SendSuccess = true;
aMessage.InternalStatus = Message.BSMDStatus.CONFIRMED;
aMessage.Status = Message.MessageStatus.ACCEPTED;
+ _log.InfoFormat("CONFIRMED");
+ }
+ else
+ {
+ _log.InfoFormat("no match");
}
break;
}
diff --git a/nsw/Source/bsmd.dbh/bsmd.dbh.csproj b/nsw/Source/bsmd.dbh/bsmd.dbh.csproj
index c0239abe..31cbde11 100644
--- a/nsw/Source/bsmd.dbh/bsmd.dbh.csproj
+++ b/nsw/Source/bsmd.dbh/bsmd.dbh.csproj
@@ -63,7 +63,7 @@
Properties\AssemblyProjectKeyInfo.cs
-
+
True
@@ -87,9 +87,6 @@
-
- Designer
-
PublicSettingsSingleFileGenerator