MIC, etc.

This commit is contained in:
2026-09-28 08:56:33 +02:00
parent 16343e26cd
commit fb35deb084
14 changed files with 3190 additions and 127 deletions

View File

@@ -813,4 +813,50 @@ Public Class cGetMsgType
End Function
Shared Function isMIC_Import(doc As XmlDocument) As Boolean
If doc Is Nothing OrElse Not doc.HasChildNodes Then Return False
' 1) mic-BODY mit messageType="CUSTIMPORT" suchen (Präfix-unabhängig, LocalName)
For Each el As XmlElement In doc.SelectNodes("//*[local-name()='Body' and @messageType]")
If UCase(el.GetAttribute("messageType")) = "CUSTIMPORT" Then Return True
Next
' 2) Alternativ: CDATA-Inhalt auf Import-Schema prüfen
For Each el As XmlElement In doc.SelectNodes("//*[local-name()='Body']")
If el.InnerText <> "" AndAlso el.InnerText.Contains("MicCustImportMessage") Then
' Nur importieren, wenn kein Export-Schema im CDATA liegt
If Not el.InnerText.Contains("MicCustExportMessage") Then Return True
End If
Next
If doc.DocumentElement IsNot Nothing AndAlso doc.DocumentElement.LocalName = "MicCustImportMessage" Then
Return True
End If
Return False
End Function
Shared Function isMIC_Export(doc As XmlDocument) As Boolean
If Not doc.HasChildNodes Then Return False
If doc.DocumentElement IsNot Nothing AndAlso doc.DocumentElement.LocalName = "SendExportShipment" Then
Return True
End If
If doc.GetElementsByTagName("ExportShipmentMessage").Count > 0 OrElse doc.GetElementsByTagName("SendExportShipment").Count > 0 Then
Return True
End If
Return False
End Function
Shared Function isMIC_NCTS(doc As XmlDocument) As Boolean
If doc.HasChildNodes Then
Return False
End If
Return False
End Function
End Class