NCTS_FREMD

This commit is contained in:
2024-12-12 13:29:28 +01:00
parent 8c0682ea8d
commit 9945a62385
14 changed files with 43735 additions and 148 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,107 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://ncts.dgtaxud.ec" xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" targetNamespace="http://ncts.dgtaxud.ec" elementFormDefault="unqualified" attributeFormDefault="unqualified" version="51.8.6" vc:minVersion="1.1">
<!--================================================================================-->
<!--===== IE015: E_DEC_DAT -->
<!--===== DECLARATION DATA -->
<!--===== NCTS P5 Phase Definition -->
<!--===== XSD Version 51.8.6 -->
<!--================================================================================-->
<!--================================================================================-->
<!--===== Includes -->
<!--================================================================================-->
<xs:include schemaLocation="ctypes.xsd" />
<xs:include schemaLocation="htypes.xsd" />
<!--================================================================================-->
<!--===== Root Element -->
<!--================================================================================-->
<xs:element name="CC015C" type="CC015CType" />
<!--================================================================================-->
<!--===== Root Element Content -->
<!--================================================================================-->
<xs:complexType name="CC015CType">
<xs:sequence>
<xs:group ref="MESSAGE" />
<xs:element name="TransitOperation" type="TransitOperationType06">
<xs:annotation>
<xs:documentation>
<description value="TRANSIT OPERATION" />
<optionality value="R" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Authorisation" minOccurs="0" maxOccurs="9" type="AuthorisationType03">
<xs:annotation>
<xs:documentation>
<description value="AUTHORISATION" />
<optionality value="D" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CustomsOfficeOfDeparture" type="CustomsOfficeOfDepartureType03">
<xs:annotation>
<xs:documentation>
<description value="CUSTOMS OFFICE OF DEPARTURE" />
<optionality value="R" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CustomsOfficeOfDestinationDeclared" type="CustomsOfficeOfDestinationDeclaredType01">
<xs:annotation>
<xs:documentation>
<description value="CUSTOMS OFFICE OF DESTINATION (DECLARED)" />
<optionality value="R" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CustomsOfficeOfTransitDeclared" minOccurs="0" maxOccurs="9" type="CustomsOfficeOfTransitDeclaredType04">
<xs:annotation>
<xs:documentation>
<description value="CUSTOMS OFFICE OF TRANSIT (DECLARED)" />
<optionality value="D" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CustomsOfficeOfExitForTransitDeclared" minOccurs="0" maxOccurs="9" type="CustomsOfficeOfExitForTransitDeclaredType02">
<xs:annotation>
<xs:documentation>
<description value="CUSTOMS OFFICE OF EXIT FOR TRANSIT (DECLARED)" />
<optionality value="D" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="HolderOfTheTransitProcedure" type="HolderOfTheTransitProcedureType14">
<xs:annotation>
<xs:documentation>
<description value="HOLDER OF THE TRANSIT PROCEDURE" />
<optionality value="R" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Representative" minOccurs="0" type="RepresentativeType05">
<xs:annotation>
<xs:documentation>
<description value="REPRESENTATIVE" />
<optionality value="O" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Guarantee" maxOccurs="9" type="GuaranteeType02">
<xs:annotation>
<xs:documentation>
<description value="GUARANTEE" />
<optionality value="R" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Consignment" type="ConsignmentType20">
<xs:annotation>
<xs:documentation>
<description value="CONSIGNMENT" />
<optionality value="R" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name="PhaseID" type="phaseIDtype" />
</xs:complexType>
</xs:schema>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://ncts.dgtaxud.ec" xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" elementFormDefault="qualified" version="51.8.6" targetNamespace="http://ncts.dgtaxud.ec" attributeFormDefault="unqualified" vc:minVersion="1.1">
<!--=========================================-->
<!-- DOCUMENTATION ELEMENTS -->
<!--=========================================-->
<xs:element name="description">
<xs:complexType>
<xs:attribute name="value" type="xs:token" use="required" />
</xs:complexType>
</xs:element>
<xs:element name="rule">
<xs:complexType>
<xs:attribute name="name" type="xs:token" use="required" />
</xs:complexType>
</xs:element>
<xs:element name="condition">
<xs:complexType>
<xs:attribute name="name" type="xs:token" use="required" />
</xs:complexType>
</xs:element>
<xs:element name="codeList">
<xs:complexType>
<xs:attribute name="name" type="xs:token" use="required" />
<xs:attribute name="type" type="xs:token" default="technical" />
</xs:complexType>
</xs:element>
</xs:schema>

View File

@@ -0,0 +1,99 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://ncts.dgtaxud.ec" xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" elementFormDefault="unqualified" attributeFormDefault="unqualified" version="51.8.6" vc:minVersion="1.1" targetNamespace="http://ncts.dgtaxud.ec">
<!--=======================================================-->
<!--============= Message Header Definition ==============-->
<!--=======================================================-->
<xs:include schemaLocation="doc.xsd" />
<xs:include schemaLocation="tcl.xsd" />
<xs:include schemaLocation="stypes.xsd" />
<xs:group name="MESSAGE">
<xs:annotation>
<xs:documentation>Used by all messages</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="messageSender" type="MessageSenderContentType">
<xs:annotation>
<xs:documentation>
<description value="Message sender" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="messageRecipient" type="MessageRecipientContentType">
<xs:annotation>
<xs:documentation>
<description value="Message recipient" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="preparationDateAndTime" type="PreparationDateAndTimeContentType">
<xs:annotation>
<xs:documentation>
<description value="Preparation date and time" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="messageIdentification" type="MessageIdentificationContentType">
<xs:annotation>
<xs:documentation>
<description value="Message identification" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="messageType" type="MessageTypes">
<xs:annotation>
<xs:documentation>
<description value="Message type" />
<codeList name="MessageTypes" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="correlationIdentifier" type="CorrelationIdentifierContentType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<description value="Correlation identifier" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:group>
<!--================================================================================-->
<!--===== MessageIdentification -->
<!--================================================================================-->
<xs:simpleType name="MessageIdentificationContentType">
<xs:restriction base="xs:token">
<xs:pattern value=".{1,35}" />
</xs:restriction>
</xs:simpleType>
<!--================================================================================-->
<!--===== MessageRecipient -->
<!--================================================================================-->
<xs:simpleType name="MessageRecipientContentType">
<xs:restriction base="xs:token">
<xs:pattern value=".{1,35}" />
</xs:restriction>
</xs:simpleType>
<!--================================================================================-->
<!--===== MessageSender -->
<!--================================================================================-->
<xs:simpleType name="MessageSenderContentType">
<xs:restriction base="xs:token">
<xs:pattern value=".{1,35}" />
</xs:restriction>
</xs:simpleType>
<!--================================================================================-->
<!--===== CorrelationIdentifier -->
<!--================================================================================-->
<xs:simpleType name="CorrelationIdentifierContentType">
<xs:restriction base="xs:token">
<xs:pattern value=".{1,35}" />
</xs:restriction>
</xs:simpleType>
<!--================================================================================-->
<!--===== PreparationDateAndTime -->
<!--================================================================================-->
<xs:simpleType name="PreparationDateAndTimeContentType">
<xs:restriction base="xs:dateTime">
<xs:pattern value="\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}" />
</xs:restriction>
</xs:simpleType>
</xs:schema>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,974 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://ncts.dgtaxud.ec" xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" targetNamespace="http://ncts.dgtaxud.ec" elementFormDefault="unqualified" attributeFormDefault="unqualified" version="51.8.6" vc:minVersion="1.1">
<!--================================================================================-->
<!--===== Modification Type -->
<!--===== Format: a1 -->
<!--===== CL024 -->
<!--================================================================================-->
<xs:simpleType name="ModificationType">
<xs:annotation>
<xs:documentation>The values of this codelist are also available and updated in CS/RD2.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="C">
<xs:annotation>
<xs:documentation>Create</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="D">
<xs:annotation>
<xs:documentation>Delete</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="U">
<xs:annotation>
<xs:documentation>Update</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<!--================================================================================-->
<!--===== Month of Year -->
<!--===== Format: an2 -->
<!--===== CL026 -->
<!--================================================================================-->
<xs:simpleType name="MonthOfYear">
<xs:annotation>
<xs:documentation />
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="01">
<xs:annotation>
<xs:documentation>January</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="02">
<xs:annotation>
<xs:documentation>February</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="03">
<xs:annotation>
<xs:documentation>March</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="04">
<xs:annotation>
<xs:documentation>April</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="05">
<xs:annotation>
<xs:documentation>May</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="06">
<xs:annotation>
<xs:documentation>June</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="07">
<xs:annotation>
<xs:documentation>July</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="08">
<xs:annotation>
<xs:documentation>August</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="09">
<xs:annotation>
<xs:documentation>September</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="10">
<xs:annotation>
<xs:documentation>October</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="11">
<xs:annotation>
<xs:documentation>November</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="12">
<xs:annotation>
<xs:documentation>December</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<!--================================================================================-->
<!--===== Flag -->
<!--===== Format: n1 -->
<!--===== CL027 -->
<!--================================================================================-->
<xs:simpleType name="Flag">
<xs:annotation>
<xs:documentation>Used for attributes that can have a positive or a negative value. The values of this codelist are also available and updated in CS/RD2.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="0">
<xs:annotation>
<xs:documentation>NO</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="1">
<xs:annotation>
<xs:documentation>YES</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<!--================================================================================-->
<!--===== XML Error Codes -->
<!--===== Format: n2 -->
<!--===== CL030 -->
<!--================================================================================-->
<xs:simpleType name="XmlErrorCodes">
<xs:annotation>
<xs:documentation>Defines the codes to be used for reporting errors on XML messages. The values of this codelist are also available and updated in CS/RD2.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="12">
<xs:annotation>
<xs:documentation>Incorrect enumeration</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="13">
<xs:annotation>
<xs:documentation>Missing</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="15">
<xs:annotation>
<xs:documentation>Not supported in this position</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="18">
<xs:annotation>
<xs:documentation>Unspecified Error / Other</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="35">
<xs:annotation>
<xs:documentation>Too many repetitions</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="39">
<xs:annotation>
<xs:documentation>Element too long (length constraint)</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="40">
<xs:annotation>
<xs:documentation>Element too short (length constraint)</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="50">
<xs:annotation>
<xs:documentation>Invalid Value for the specific type</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="51">
<xs:annotation>
<xs:documentation>Invalid value according to the pattern</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="52">
<xs:annotation>
<xs:documentation>Invalid XML format</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="53">
<xs:annotation>
<xs:documentation>Invalid character(s)</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="54">
<xs:annotation>
<xs:documentation>Value is lower than the allowed lowest limit (Minimum Inclusive)</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="55">
<xs:annotation>
<xs:documentation>Value is greater than the allowed upper limit (Maximum Inclusive)</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="56">
<xs:annotation>
<xs:documentation>Value is lower than or equal to the allowed lowest limit (Minimum Exlcusive)</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="57">
<xs:annotation>
<xs:documentation>Value is greater than or equal to the allowed upper limit (Maximum Exclusive)</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<!--================================================================================-->
<!--===== Message Types -->
<!--===== Format: an..6 -->
<!--===== CL060 -->
<!--================================================================================-->
<xs:simpleType name="MessageTypes">
<xs:annotation>
<xs:documentation>The list of codes used to identify the type of messages exchanged on the Common Domain and on the External Domain (e.g. CD001B, CD302A, CC515C, CD801A).The values of this codelist are also available and updated in CS/RD2.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="CC004C">
<xs:annotation>
<xs:documentation>Amendment Acceptance</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC007C">
<xs:annotation>
<xs:documentation>Arrival Notification</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC009C">
<xs:annotation>
<xs:documentation>Invalidation Decision</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC013C">
<xs:annotation>
<xs:documentation>DECLARATION AMENDMENT</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC014C">
<xs:annotation>
<xs:documentation>DECLARATION CANCELLATION REQUEST</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC015C">
<xs:annotation>
<xs:documentation>DECLARATION DATA</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC017C">
<xs:annotation>
<xs:documentation>DEPARTURE CONTROL RESULTS</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC019C">
<xs:annotation>
<xs:documentation>DISCREPANCIES</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC022C">
<xs:annotation>
<xs:documentation>NOTIFICATION TO AMEND DECLARATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC023C">
<xs:annotation>
<xs:documentation>GUARANTOR NOTIFICATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC025C">
<xs:annotation>
<xs:documentation>GOODS RELEASE NOTIFICATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC026C">
<xs:annotation>
<xs:documentation>GUARANTEE ACCESS CODES</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC028C">
<xs:annotation>
<xs:documentation>MRN ALLOCATED</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC029C">
<xs:annotation>
<xs:documentation>RELEASE FOR TRANSIT</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC034C">
<xs:annotation>
<xs:documentation>QUERY ON GUARANTEES</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC035C">
<xs:annotation>
<xs:documentation>RECOVERY NOTIFICATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC037C">
<xs:annotation>
<xs:documentation>RESPONSE QUERY ON GUARANTEES</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC040C">
<xs:annotation>
<xs:documentation>TRANSIT CANCELLATION NOTIFICATION TO AES</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC042C">
<xs:annotation>
<xs:documentation>DESTINATION CONTROL RESULTS TO AES</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC043C">
<xs:annotation>
<xs:documentation>UNLOADING PERMISSION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC044C">
<xs:annotation>
<xs:documentation>UNLOADING REMARKS</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC045C">
<xs:annotation>
<xs:documentation>WRITE-OFF NOTIFICATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC048C">
<xs:annotation>
<xs:documentation>RECOVERY COMMUNICATION TO AES</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC051C">
<xs:annotation>
<xs:documentation>NO RELEASE FOR TRANSIT</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC054C">
<xs:annotation>
<xs:documentation>REQUEST OF RELEASE</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC055C">
<xs:annotation>
<xs:documentation>GUARANTEE NOT VALID</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC056C">
<xs:annotation>
<xs:documentation>REJECTION FROM OFFICE OF DEPARTURE</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC057C">
<xs:annotation>
<xs:documentation>REJECTION FROM OFFICE OF DESTINATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC060C">
<xs:annotation>
<xs:documentation>CONTROL DECISION NOTIFICATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC140C">
<xs:annotation>
<xs:documentation>REQUEST ON NON-ARRIVED MOVEMENT</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC141C">
<xs:annotation>
<xs:documentation>INFORMATION ABOUT NON-ARRIVED MOVEMENT</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC170C">
<xs:annotation>
<xs:documentation>PRESENTATION NOTIFICATION FOR THE PRE-LODGED DECLARATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC182C">
<xs:annotation>
<xs:documentation>FORWARDED INCIDENT NOTIFICATION TO ED</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC190C">
<xs:annotation>
<xs:documentation>TRANSIT PRESENTATION NOTIFICATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC191C">
<xs:annotation>
<xs:documentation>TRANSIT PRESENTATION NOTIFICATION RESPONSE</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC224C">
<xs:annotation>
<xs:documentation>INDIVIDUAL GUARANTEE VOUCHER SOLD</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC225C">
<xs:annotation>
<xs:documentation>GUARANTEE UPDATE NOTIFICATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC228C">
<xs:annotation>
<xs:documentation>COMPREHENSIVE GUARANTEE CANCELLATION LIABILITY LIBERATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC229C">
<xs:annotation>
<xs:documentation>INDIVIDUAL GUARANTEE VOUCHER REVOCATION NOTIFICATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC231C">
<xs:annotation>
<xs:documentation>COMPREHENSIVE GUARANTEE INVALIDATION NOTIFICATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC906C">
<xs:annotation>
<xs:documentation>FUNCTIONAL NACK</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC917C">
<xs:annotation>
<xs:documentation>XML NACK</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC928C">
<xs:annotation>
<xs:documentation>POSITIVE ACKNOWLEDGE</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD001C">
<xs:annotation>
<xs:documentation>AAR</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD002C">
<xs:annotation>
<xs:documentation>AAR Request</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD003C">
<xs:annotation>
<xs:documentation>AAR Response</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD006C">
<xs:annotation>
<xs:documentation>ARRIVAL ADVICE</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD010C">
<xs:annotation>
<xs:documentation>CANCELLATION NOTIFICATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD012C">
<xs:annotation>
<xs:documentation>AAR-TIR-SPEED</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD018C">
<xs:annotation>
<xs:documentation>DESTINATION CONTROL RESULTS</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD024C">
<xs:annotation>
<xs:documentation>FORWARDED ARRIVAL ADVICE</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD027C">
<xs:annotation>
<xs:documentation>MOVEMENT QUERY</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD038C">
<xs:annotation>
<xs:documentation>RESPONSE TO MOVEMENT QUERY</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD049C">
<xs:annotation>
<xs:documentation>DISCREPANCIES SOLVED NOTIFICATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD050C">
<xs:annotation>
<xs:documentation>ANTICIPATED TRANSIT RECORD</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD059C">
<xs:annotation>
<xs:documentation>CANCEL ENQUIRY NOTIFICATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD063C">
<xs:annotation>
<xs:documentation>RECOVERY COMMUNICATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD070C">
<xs:annotation>
<xs:documentation>NOTIFICATION OF SYSTEM UNAVAILABILITY TO CD</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD071C">
<xs:annotation>
<xs:documentation>NOTIFICATION OF SYSTEM UNAVAILABILITY TO ND</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD078C">
<xs:annotation>
<xs:documentation>INTER-DOMAIN LINKING</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD094C">
<xs:annotation>
<xs:documentation>STATUS REQUEST</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD095C">
<xs:annotation>
<xs:documentation>STATUS RESPONSE</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD114C">
<xs:annotation>
<xs:documentation>ANTICIPATED TRANSIT RECORD REQUEST</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD115C">
<xs:annotation>
<xs:documentation>ANTICIPATED TRANSIT RECORD RESPONSE</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD118C">
<xs:annotation>
<xs:documentation>NOTIFICATION CROSSING FRONTIER</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD142C">
<xs:annotation>
<xs:documentation>ENQUIRY REQUEST</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD143C">
<xs:annotation>
<xs:documentation>ENQUIRY RESPONSE</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD144C">
<xs:annotation>
<xs:documentation>ENQUIRY INFORMATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD145C">
<xs:annotation>
<xs:documentation>ENQUIRY INFORMATION REQUEST</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD150C">
<xs:annotation>
<xs:documentation>RECOVERY REQUEST</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD151C">
<xs:annotation>
<xs:documentation>RECOVERY ACCEPTANCE NOTIFICATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD152C">
<xs:annotation>
<xs:documentation>RECOVERY DISPATCH NOTIFICATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD160C">
<xs:annotation>
<xs:documentation>ANTICIPATED EXIT FOR TRANSIT RECORD</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD164C">
<xs:annotation>
<xs:documentation>ANTICIPATED EXIT FOR TRANSIT RECORD REQUEST</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD165C">
<xs:annotation>
<xs:documentation>ANTICIPATED EXIT FOR TRANSIT RECORD RESPONSE</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD168C">
<xs:annotation>
<xs:documentation>NOTIFICATION LEAVING SECURITY AREA</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD180C">
<xs:annotation>
<xs:documentation>INCIDENT NOTIFICATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD181C">
<xs:annotation>
<xs:documentation>FORWARDED INCIDENT NOTIFICATION TO CD</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD200C">
<xs:annotation>
<xs:documentation>GUARANTEE CHECK</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD201C">
<xs:annotation>
<xs:documentation>GUARANTEE CHECK RESULT</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD203C">
<xs:annotation>
<xs:documentation>GUARANTEE USE</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD204C">
<xs:annotation>
<xs:documentation>GUARANTEE USE CANCELLATION</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD205C">
<xs:annotation>
<xs:documentation>GUARANTEE USE RESULT</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD209C">
<xs:annotation>
<xs:documentation>CREDIT REFERENCE AMOUNT</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD411D">
<xs:annotation>
<xs:documentation>SENDING OF STATISTICS DATA</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD903D">
<xs:annotation>
<xs:documentation>WARNING MESSAGE</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD906C">
<xs:annotation>
<xs:documentation>FUNCTIONAL NACK</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD917C">
<xs:annotation>
<xs:documentation>XML NACK</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD971C">
<xs:annotation>
<xs:documentation>FULL UNAVAILABILITY SCHEDULE</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD974C">
<xs:annotation>
<xs:documentation>NCA Availability request</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD975C">
<xs:annotation>
<xs:documentation>NCA Availability response</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<!--================================================================================-->
<!--===== Country Codes (Customs Office Lists) -->
<!--===== Format: a2 -->
<!--===== CL070 -->
<!--================================================================================-->
<xs:simpleType name="CountryCodesCustomsOfficeLists">
<xs:annotation>
<xs:documentation>This Codelist includes the countries who are maintaining their Customs Offices in CS/RD2. It lists the country codes used as the first two characters of the Customs Office Reference Number. It corresponds to the content of the code list CL009 excluding 'AX', 'GF', 'GG', 'GP', 'IM', 'JE', 'LI', 'MC', 'MF', 'MQ', 'RE', 'SJ', 'XS' and 'YT'. This codelist is used for the Customs Office List. The values of this codelist are also available and updated in CS/RD2.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="AD">
<xs:annotation>
<xs:documentation>Andorra</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="AT">
<xs:annotation>
<xs:documentation>Austria</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="BE">
<xs:annotation>
<xs:documentation>Belgium</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="BG">
<xs:annotation>
<xs:documentation>Bulgaria</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CH">
<xs:annotation>
<xs:documentation>Switzerland</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CY">
<xs:annotation>
<xs:documentation>Cyprus</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CZ">
<xs:annotation>
<xs:documentation>Czech Republic</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="DE">
<xs:annotation>
<xs:documentation>Germany</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="DK">
<xs:annotation>
<xs:documentation>Denmark</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="EE">
<xs:annotation>
<xs:documentation>Estonia</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="ES">
<xs:annotation>
<xs:documentation>Spain</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="FI">
<xs:annotation>
<xs:documentation>Finland</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="FR">
<xs:annotation>
<xs:documentation>France</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="GB">
<xs:annotation>
<xs:documentation>United Kingdom</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="GR">
<xs:annotation>
<xs:documentation>Greece</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="HR">
<xs:annotation>
<xs:documentation>Croatia</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="HU">
<xs:annotation>
<xs:documentation>Hungary</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="IE">
<xs:annotation>
<xs:documentation>Ireland</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="IS">
<xs:annotation>
<xs:documentation>Iceland</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="IT">
<xs:annotation>
<xs:documentation>Italy</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="LT">
<xs:annotation>
<xs:documentation>Lithuania</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="LU">
<xs:annotation>
<xs:documentation>Luxembourg</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="LV">
<xs:annotation>
<xs:documentation>Latvia</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="MK">
<xs:annotation>
<xs:documentation>North Macedonia</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="MT">
<xs:annotation>
<xs:documentation>Malta</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="NL">
<xs:annotation>
<xs:documentation>Netherlands</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="NO">
<xs:annotation>
<xs:documentation>Norway</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="PL">
<xs:annotation>
<xs:documentation>Poland</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="PT">
<xs:annotation>
<xs:documentation>Portugal</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="RO">
<xs:annotation>
<xs:documentation>Romania</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="RS">
<xs:annotation>
<xs:documentation>Serbia</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="SE">
<xs:annotation>
<xs:documentation>Sweden</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="SI">
<xs:annotation>
<xs:documentation>Slovenia</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="SK">
<xs:annotation>
<xs:documentation>Slovakia</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="SM">
<xs:annotation>
<xs:documentation>San Marino</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="TR">
<xs:annotation>
<xs:documentation>Turkey</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="UA">
<xs:annotation>
<xs:documentation>Ukraine</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="XI">
<xs:annotation>
<xs:documentation>United Kingdom (Northern Ireland)</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<!--================================================================================-->
<!--===== System Unavailability Type -->
<!--===== Format: a1 -->
<!--===== CL079 -->
<!--================================================================================-->
<xs:simpleType name="SystemUnavailabilityType">
<xs:annotation>
<xs:documentation>Used for the attribute SYSTEM UNAVAILABILITY.System Unavailability Type.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="N">
<xs:annotation>
<xs:documentation>Business service not implemented</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="S">
<xs:annotation>
<xs:documentation>Scheduled Unavailability</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="U">
<xs:annotation>
<xs:documentation>Unscheduled Unavailability</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<!--================================================================================-->
<!--===== AES/NCTS P5 Functional Error Codes -->
<!--===== Format: n2 -->
<!--===== CL180 -->
<!--================================================================================-->
<xs:simpleType name="AesNctsP5FunctionalErrorCodes">
<xs:annotation>
<xs:documentation>Set of generic error codes, specific for AES and NCTS P5. The values of this codelist are also available and updated in CS/RD2.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="12">
<xs:annotation>
<xs:documentation>Codelist violation</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="13">
<xs:annotation>
<xs:documentation>Condition violation (Missing)</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="14">
<xs:annotation>
<xs:documentation>Rule violation</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="15">
<xs:annotation>
<xs:documentation>Condition violation (Not allowed)</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="26">
<xs:annotation>
<xs:documentation>Duplicate Message ID</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="50">
<xs:annotation>
<xs:documentation>Transitional constraint violation</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="51">
<xs:annotation>
<xs:documentation>EDI violation post downgrade</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="52">
<xs:annotation>
<xs:documentation>Functional violation post downgrade</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="90">
<xs:annotation>
<xs:documentation>Unknown MRN</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="92">
<xs:annotation>
<xs:documentation>Message out of sequence</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="93">
<xs:annotation>
<xs:documentation>Invalid MRN</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:schema>

View File

@@ -1,62 +1,214 @@
Public Class cATEZ_ncts_api
Imports System.Globalization
Imports System.IO
Imports System.Xml
Imports com.sun.corba.se.spi.orb
Public Class cATEZ_ncts_api
Shared API_KEY = "2a6fe6bf-6547-4d56-b14a-8a18f94f9e94"
Public Shared Sub query_declarations(startDate As Date, endDate As Date)
' This example assumes the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.
Try
' This example assumes the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.
VERAG_PROG_ALLGEMEIN.cChilkat_Helper.UnlockCilkat()
Dim http As New Chilkat.Http
Dim success As Boolean
Dim http As New Chilkat.Http
Dim success As Boolean
Dim queryParams As New Chilkat.JsonObject
queryParams.UpdateString("startDate", startDate.ToString("yyyy-MM-ddTHH:mm:ss"))
queryParams.UpdateString("endDate", endDate.ToString("yyyy-MM-ddTHH:mm:ss"))
queryParams.UpdateInt("page", 0)
queryParams.UpdateInt("size", 10000)
Dim queryParams As New Chilkat.JsonObject
queryParams.UpdateString("startDate", startDate.ToString("yyyy-MM-ddTHH:mm:ss"))
queryParams.UpdateString("endDate", endDate.ToString("yyyy-MM-ddTHH:mm:ss"))
queryParams.UpdateInt("page", 0)
queryParams.UpdateInt("size", 10000)
http.SetRequestHeader("API-KEY", API_KEY)
http.SetRequestHeader("API-KEY", API_KEY)
Dim resp As Chilkat.HttpResponse = http.QuickRequestParams("GET", "https://transcode.singlewindow.io/api/tds/integrations/verag/declarations", queryParams)
If (http.LastMethodSuccess = False) Then
Debug.WriteLine(http.LastErrorText)
Exit Sub
End If
Dim resp As Chilkat.HttpResponse = http.QuickRequestParams("GET", "https://transcode.singlewindow.io/api/tds/integrations/verag/declarations", queryParams)
If (http.LastMethodSuccess = False) Then
Debug.WriteLine(http.LastErrorText)
Exit Sub
End If
Debug.WriteLine(resp.StatusCode)
Debug.WriteLine(resp.BodyStr)
Debug.WriteLine(resp.StatusCode)
Debug.WriteLine(resp.BodyStr)
'Dim SS = VERAG_PROG_ALLGEMEIN.cNCTS_ATEZ_query_declaration_response.root.LoadFromFile("")
'Dim SS = VERAG_PROG_ALLGEMEIN.cNCTS_ATEZ_query_declaration_response.root.LoadFromFile("")
'For Each c In SS.properties.content
'For Each c In SS.properties.content
'Next
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
'Next
End Sub
Public Shared Sub get_ie015_xml_by_mrn(MRN As String)
' This example assumes the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.
Public Shared Function get_ie015_xml_by_mrn(MRN As String) As Boolean
Try
Dim result = False
' This example assumes the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.
VERAG_PROG_ALLGEMEIN.cChilkat_Helper.UnlockCilkat()
Dim http As New Chilkat.Http
Dim success As Boolean
Dim http As New Chilkat.Http
Dim success As Boolean
'http.SetRequestHeader("API-KEY", "{{API-KEY}}")
http.SetRequestHeader("API-KEY", API_KEY)
'http.SetRequestHeader("API-KEY", "{{API-KEY}}")
http.SetRequestHeader("API-KEY", API_KEY)
Dim sbResponseBody As New Chilkat.StringBuilder
success = http.QuickGetSb("https://transcode.singlewindow.io/api/tds/integrations/verag/declarations/messages/ie015-by-mrn/" & MRN, sbResponseBody)
If (success = False) Then
Debug.WriteLine(http.LastErrorText)
Exit Sub
End If
Dim sbResponseBody As New Chilkat.StringBuilder
success = http.QuickGetSb("https://transcode.singlewindow.io/api/tds/integrations/verag/declarations/messages/ie015-by-mrn/" & MRN, sbResponseBody)
If (success = False) Then
Debug.WriteLine(http.LastErrorText)
Return False
End If
Debug.WriteLine("Response status code = " & http.LastStatus)
Debug.WriteLine(sbResponseBody.GetAsString())
End Sub
Debug.WriteLine("Response status code = " & http.LastStatus)
Dim responseString = (sbResponseBody.GetAsString())
If responseString <> "" Then
Dim tempFilePath = saveStringToTmpXML(responseString)
Dim NCTS_P5 = VERAG_PROG_ALLGEMEIN.NCTS_P5_CC015C.CC015CType.LoadFromFile(tempFilePath)
result = saveXMLtoNCTS_FREMD(NCTS_P5, MRN)
If File.Exists(tempFilePath) Then
File.Delete(tempFilePath)
Console.WriteLine("Temporäre Datei gelöscht.")
End If
End If
Return result
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Return False
End Function
Private Shared Function saveStringToTmpXML(xmlString) As String
' Beispiel-XML-String
' Dim xmlString As String = "<?xml version=""1.0"" encoding=""UTF-8""?><root><element>Wert</element></root>"
' Temporäre Datei erstellen
Dim tempFilePath As String = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString() & ".xml")
Try
' XML-String in die Datei schreiben
File.WriteAllText(tempFilePath, xmlString)
' Ausgabe des Pfads zur Kontrolle
Console.WriteLine("XML-Datei wurde gespeichert unter: " & tempFilePath)
' Optional: Datei laden und prüfen
Dim doc As New XmlDocument()
doc.Load(tempFilePath)
Return tempFilePath '"" doc.OuterXml
Catch ex As Exception
Console.WriteLine("Fehler: " & ex.Message)
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Return ""
End Function
Private Shared Function saveXMLtoNCTS_FREMD(NCTS_P5 As VERAG_PROG_ALLGEMEIN.NCTS_P5_CC015C.CC015CType, MRN As String) As Boolean
Try
Dim NCTS_FREMD = VERAG_PROG_ALLGEMEIN.cNCTS_FREMD.LOADByMRN(MRN, True)
If NCTS_FREMD Is Nothing Then NCTS_FREMD = New cNCTS_FREMD
NCTS_FREMD.ncts_Partnersystem = "ATEZ"
NCTS_FREMD.ncts_MRN = MRN
If NCTS_P5 IsNot Nothing Then
If NCTS_P5.TransitOperation IsNot Nothing Then
If NCTS_P5.TransitOperation.limitDate.ToString <> "01.01.0001" Then
Try
NCTS_FREMD.ncts_LimitDate = DateTime.ParseExact(DateString, "yyyy-MM-ddTHH:mm:ss", CultureInfo.InvariantCulture)
Catch ex As FormatException
Console.WriteLine("Invalid date format.")
End Try
End If
NCTS_FREMD.ncts_ObjectName = NCTS_P5.TransitOperation.LRN
NCTS_FREMD.ncts_Declarationtype = NCTS_P5.TransitOperation.declarationType
NCTS_FREMD.ncts_TransitDeclarationType = NCTS_P5.TransitOperation.declarationType
NCTS_FREMD.ncts_Security = NCTS_P5.TransitOperation.security
NCTS_FREMD.ncts_ReductedDatasetIndicator = NCTS_P5.TransitOperation.reducedDatasetIndicator
NCTS_FREMD.ncts_BindingItinerary = NCTS_P5.TransitOperation.bindingItinerary
End If
If NCTS_P5.CustomsOfficeOfDeparture IsNot Nothing Then NCTS_FREMD.ncts_CustomsOfficeOfDeparture = NCTS_P5.CustomsOfficeOfDeparture.referenceNumber
If NCTS_P5.CustomsOfficeOfDestinationDeclared IsNot Nothing Then NCTS_FREMD.ncts_CustomsOfficeOfDestinationDeclared = NCTS_P5.CustomsOfficeOfDestinationDeclared.referenceNumber
If NCTS_P5.HolderOfTheTransitProcedure IsNot Nothing Then
NCTS_FREMD.ncts_HolderOfTheTransitProcedure_IdentificationNumber = NCTS_P5.HolderOfTheTransitProcedure.identificationNumber
NCTS_FREMD.ncts_HolderOfTheTransitProcedure_Name = NCTS_P5.HolderOfTheTransitProcedure.name
If NCTS_P5.HolderOfTheTransitProcedure.Address IsNot Nothing Then
NCTS_FREMD.ncts_HolderOfTheTransitProcedure_City = NCTS_P5.HolderOfTheTransitProcedure.Address.city
NCTS_FREMD.ncts_HolderOfTheTransitProcedure_Postcode = NCTS_P5.HolderOfTheTransitProcedure.Address.postcode
NCTS_FREMD.ncts_HolderOfTheTransitProcedure_Country = NCTS_P5.HolderOfTheTransitProcedure.Address.country
NCTS_FREMD.ncts_HolderOfTheTransitProcedure_StreetNumber = NCTS_P5.HolderOfTheTransitProcedure.Address.streetAndNumber
End If
End If
If NCTS_P5.Guarantee IsNot Nothing AndAlso NCTS_P5.Guarantee.Count >= 0 AndAlso NCTS_P5.Guarantee(0).GuaranteeReference.Count > 0 Then
Dim GRT = New cNCTS_FREMD_Guarantee
GRT.nctsGRT_Type = NCTS_P5.Guarantee(0).guaranteeType
GRT.nctsGRT_AccessCode = NCTS_P5.Guarantee(0).GuaranteeReference(0).accessCode
GRT.nctsGRT_GRN = NCTS_P5.Guarantee(0).GuaranteeReference(0).GRN
GRT.nctsGRT_AmountToBeCoveredFremdWaehrung = NCTS_P5.Guarantee(0).GuaranteeReference(0).amountToBeCovered
GRT.nctsGRT_Currency = NCTS_P5.Guarantee(0).GuaranteeReference(0).currency
' MsgBox(If(GRT.nctsGRT_Currency, ""))
'--> EUR
If GRT.nctsGRT_AmountToBeCoveredFremdWaehrung IsNot Nothing Then
If If(GRT.nctsGRT_Currency, "") <> "EUR" Then
Dim betragEUR = VERAG_PROG_ALLGEMEIN.cEZB_Waehrungskurse.EXCHANGE(GRT.nctsGRT_AmountToBeCoveredFremdWaehrung, GRT.nctsGRT_Currency, NCTS_FREMD.ncts_Trans_DatumZeit.ToShortDateString)
GRT.nctsGRT_AmountToBeCovered = If(betragEUR > 0, betragEUR, GRT.nctsGRT_AmountToBeCoveredFremdWaehrung)
Else
GRT.nctsGRT_AmountToBeCovered = GRT.nctsGRT_AmountToBeCoveredFremdWaehrung
End If
End If
NCTS_FREMD.ncts_GUARANTEE.Clear()
NCTS_FREMD.ncts_GUARANTEE.Add(GRT)
End If
If NCTS_P5.Consignment IsNot Nothing AndAlso NCTS_P5.Consignment.HouseConsignment IsNot Nothing AndAlso NCTS_P5.Consignment.HouseConsignment.Count >= 0 Then
For Each NCTS_P5_HC In NCTS_P5.Consignment.HouseConsignment
Dim HC = New cNCTS_FREMD_HouseConsignment
HC.nctsHC_GrossMass = NCTS_P5_HC.grossMass
HC.nctsHC_ReferenceNumberUCR = NCTS_P5_HC.referenceNumberUCR
HC.nctsHC_CountryOfDestination = NCTS_P5_HC.countryOfDestination
Next
End If
Return NCTS_FREMD.SAVE_ALL 'Speichern
End If
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
Return False
End Try
End Function
End Class