This commit is contained in:
2025-02-21 08:51:05 +01:00
parent 973232f1f4
commit 96380df56a
25 changed files with 16824 additions and 381 deletions

View File

@@ -1509,42 +1509,48 @@ Public Class cHMRC
Shared Function getTOKEN(APPLICATION, Optional forceNewToken = False) As cHMRCToken
Dim TOKEN = New cHMRCToken(VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA, APPLICATION)
Dim appl = ""
Dim HMRC_APPLICATION = "AVISO"
Select Case APPLICATION
Case "HELLOWORLD" '"EORI_CHECK"
'appl = "write:import-control-system+read:import-control-system"
appl = "applicationRestricted"
HMRC_APPLICATION = "AVISO"
Case "GVMS"
appl = "write:goods-movement-system+read:pull-notifications"
HMRC_APPLICATION = "AVISO"
Case "VAT_CHECK" '"EORI_CHECK"
appl = "read:vat write:vat"
HMRC_APPLICATION = "AVISO"
Case "ENS" '"EORI_CHECK"
'appl = "write:import-control-system+read:import-control-system"
appl = "write:import-control-system"
HMRC_APPLICATION = "AVISO_ENS"
Case "ENS_HELLOWORLD" '"EORI_CHECK"
'appl = "write:import-control-system+read:import-control-system"
appl = "hello"
HMRC_APPLICATION = "AVISO_ENS"
End Select
Try
Dim appl = ""
Dim HMRC_APPLICATION = "AVISO"
Select Case APPLICATION
Case "HELLOWORLD" '"EORI_CHECK"
'appl = "write:import-control-system+read:import-control-system"
appl = "applicationRestricted"
HMRC_APPLICATION = "AVISO"
Case "GVMS"
appl = "write:goods-movement-system+read:pull-notifications"
HMRC_APPLICATION = "AVISO"
Case "VAT_CHECK" '"EORI_CHECK"
appl = "read:vat write:vat"
HMRC_APPLICATION = "AVISO"
Case "ENS" '"EORI_CHECK"
'appl = "write:import-control-system+read:import-control-system"
appl = "write:import-control-system"
HMRC_APPLICATION = "AVISO_ENS"
Case "ENS_HELLOWORLD" '"EORI_CHECK"
'appl = "write:import-control-system+read:import-control-system"
appl = "hello"
HMRC_APPLICATION = "AVISO_ENS"
End Select
If forceNewToken OrElse TOKEN.hasEntry = False OrElse TOKEN.token_BEARER_TOKEN Is Nothing OrElse TOKEN.token_BEARER_TOKEN = "" Then
Dim AccessToken = ""
grantAccess(AccessToken, appl, HMRC_APPLICATION)
TOKEN.token_Application = APPLICATION
TOKEN.token_BEARER_TOKEN = AccessToken
TOKEN.token_refresh_datetime = Now
TOKEN.SAVE()
Else
HMRC_RefreshToken(TOKEN, HMRC_APPLICATION)
End If
If forceNewToken OrElse TOKEN.hasEntry = False OrElse TOKEN.token_BEARER_TOKEN Is Nothing OrElse TOKEN.token_BEARER_TOKEN = "" Then
Dim AccessToken = ""
grantAccess(AccessToken, appl, HMRC_APPLICATION)
TOKEN.token_Application = APPLICATION
TOKEN.token_BEARER_TOKEN = AccessToken
TOKEN.token_refresh_datetime = Now
TOKEN.SAVE()
Else
HMRC_RefreshToken(TOKEN, HMRC_APPLICATION)
End If
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Return TOKEN
End Function

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,604 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ie="http://ics.dgtaxud.ec/CC304A" xmlns:complex_ics="http://ics.dgtaxud.ec/complex_ics" xmlns:simple_ics="http://ics.dgtaxud.ec/simple_ics" xmlns:tcl_ics="http://ics.dgtaxud.ec/tcl_ics" xmlns:simple="http://ics.dgtaxud.ec/simple" xmlns:tcl="http://ics.dgtaxud.ec/tcl" xmlns:doc="http://ics.dgtaxud.ec/doc" targetNamespace="http://ics.dgtaxud.ec/CC304A" attributeFormDefault="unqualified" elementFormDefault="unqualified" version="36.00">
<!--=========================================-->
<!--===== IE304:E_ENS_AAC -->
<!--===== ENTRY SUMMARY DECLARATION AMENDMENT ACCEPTED -->
<!--===== ICS P1 Phase Definition -->
<!--===== DDNIA 11.00 -->
<!--===== XSD version v36.00 -->
<!--=========================================-->
<!--===== Imports =====-->
<xs:import namespace="http://ics.dgtaxud.ec/doc" schemaLocation="doc-v10-0.xsd" />
<xs:import namespace="http://ics.dgtaxud.ec/complex_ics" schemaLocation="complex_types_ics-v10-0.xsd" />
<xs:import namespace="http://ics.dgtaxud.ec/simple_ics" schemaLocation="simple_types_ics-v10-0.xsd" />
<xs:import namespace="http://ics.dgtaxud.ec/tcl_ics" schemaLocation="tcl_ics-v10-0.xsd" />
<xs:import namespace="http://ics.dgtaxud.ec/simple" schemaLocation="simple_types-v10-0.xsd" />
<xs:import namespace="http://ics.dgtaxud.ec/tcl" schemaLocation="tcl-v10-0.xsd" />
<!--===== Root Element =====-->
<xs:element name="CC304A" type="ie:CC304AType" />
<!--===== Root Element Content =====-->
<xs:complexType name="CC304AType">
<xs:sequence>
<xs:group ref="ie:MESSAGE" />
<xs:element name="HEAHEA" type="ie:HEAHEAType">
<xs:annotation>
<xs:documentation>
<doc:description value="HEADER" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="GOOITEGDS" type="ie:GOOITEGDSType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>
<doc:description value="GOODS ITEM" />
<doc:rule name="R134" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TRAREP" type="ie:TRAREPType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="(REPRESENTATIVE) TRADER" />
<doc:condition name="C552" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PERLODSUMDEC" type="ie:PERLODSUMDECType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="(LODGING SUMMARY DECLARATION) PERSON" />
<doc:condition name="C552" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CUSOFFFENT730" type="ie:CUSOFFFENT730Type">
<xs:annotation>
<xs:documentation>
<doc:description value="(FIRST ENTRY) CUSTOMS OFFICE" />
<doc:rule name="R814" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TRACARENT601" type="ie:TRACARENT601Type" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="(ENTRY CARRIER) TRADER" />
<doc:rule name="R134" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--===== MESSAGE Content =====-->
<xs:group name="MESSAGE">
<xs:sequence>
<xs:element name="MesSenMES3" type="simple:Alphanumeric_Max35">
<xs:annotation>
<xs:documentation>
<doc:description value="Message sender" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="MesRecMES6" type="simple:Alphanumeric_Max35">
<xs:annotation>
<xs:documentation>
<doc:description value="Message recipient" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DatOfPreMES9" type="simple:DatePrepType">
<xs:annotation>
<xs:documentation>
<doc:description value="Date of preparation" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TimOfPreMES10" type="simple:TimeType">
<xs:annotation>
<xs:documentation>
<doc:description value="Time of preparation" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PriMES15" type="simple:Alpha_1" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Priority" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TesIndMES18" type="tcl:Flag" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Test indicator" />
<doc:rule name="TR9085" />
<doc:codeList name="Flag" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="MesIdeMES19" type="simple:Alphanumeric_Max14">
<xs:annotation>
<xs:documentation>
<doc:description value="Message identification" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="MesTypMES20" type="tcl:MessageTypes">
<xs:annotation>
<xs:documentation>
<doc:description value="Message type" />
<doc:codeList name="MessageTypes" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CorIdeMES25" type="simple:Alphanumeric_Max14" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Correlation identifier" />
<doc:rule name="TR9181" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:group>
<!--===== HEADER =====-->
<xs:complexType name="HEAHEAType">
<xs:annotation>
<xs:documentation>
<doc:description value="HEADER" />
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="DocNumHEA5" type="simple:MRNType">
<xs:annotation>
<xs:documentation>
<doc:description value="Document/reference number" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TraModAtBorHEA76" type="simple:Numeric_Max2" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Transport mode at border" />
<doc:rule name="R134" />
<doc:rule name="R826" />
<doc:codeList name="TransportMode" type="business" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="IdeOfMeaOfTraCroHEA85" type="simple:Alphanumeric_Max27" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Identity of means of transport crossing border" />
<doc:rule name="R134" />
<doc:condition name="C017" />
<doc:condition name="C514" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="IdeOfMeaOfTraCroHEA85LNG" type="simple:LanguageCodeType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Identity of means of transport crossing border LNG" />
<doc:rule name="TR0099" />
<doc:codeList name="LanguageCodes" type="business" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="NatOfMeaOfTraCroHEA87" type="simple:CountryCodeType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Nationality of means of transport crossing border" />
<doc:rule name="R134" />
<doc:condition name="C024" />
<doc:codeList name="CountryCodesFullList" type="business" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ComRefNumHEA" type="simple:Alphanumeric_Max70" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Commercial Reference Number" />
<doc:rule name="R134" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ConRefNumHEA" type="simple:Alphanumeric_Max35" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Conveyance reference number" />
<doc:rule name="R134" />
<doc:rule name="R843" />
<doc:condition name="C518" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="AmeAccDatTimHEA111" type="simple:DateTimeType">
<xs:annotation>
<xs:documentation>
<doc:description value="Amendment acceptance date and time" />
<doc:rule name="R660" />
<doc:rule name="R662" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DatTimAmeHEA113" type="simple:DateTimeType">
<xs:annotation>
<xs:documentation>
<doc:description value="Date and Time of amendment" />
<doc:rule name="R660" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--===== GOODS ITEM =====-->
<xs:complexType name="GOOITEGDSType">
<xs:annotation>
<xs:documentation>
<doc:description value="GOODS ITEM" />
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="IteNumGDS7" type="simple:Numeric_Max5">
<xs:annotation>
<xs:documentation>
<doc:description value="Item number" />
<doc:rule name="R005" />
<doc:rule name="R007" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ComRefNumGIM1" type="simple:Alphanumeric_Max70" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Commercial Reference Number" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PRODOCDC2" type="ie:PRODOCDC2Type" minOccurs="0" maxOccurs="99">
<xs:annotation>
<xs:documentation>
<doc:description value="PRODUCED DOCUMENTS/CERTIFICATES" />
<doc:rule name="R147" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CONNR2" type="ie:CONNR2Type" minOccurs="0" maxOccurs="99">
<xs:annotation>
<xs:documentation>
<doc:description value="CONTAINERS" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="IDEMEATRAGI970" type="ie:IDEMEATRAGI970Type" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>
<doc:description value="(MEANS OF TRANSPORT AT BORDER) IDENTITY" />
<doc:condition name="C019" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--===== PRODUCED DOCUMENTS/CERTIFICATES =====-->
<xs:complexType name="PRODOCDC2Type">
<xs:annotation>
<xs:documentation>
<doc:description value="PRODUCED DOCUMENTS/CERTIFICATES" />
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="DocTypDC21" type="simple:Alphanumeric_Max4">
<xs:annotation>
<xs:documentation>
<doc:description value="Document type" />
<doc:rule name="R136" />
<doc:codeList name="DocumentTypeCommon" type="business" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DocRefDC23" type="simple:Alphanumeric_Max35">
<xs:annotation>
<xs:documentation>
<doc:description value="Document reference" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DocRefDCLNG" type="simple:LanguageCodeType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Document reference LNG" />
<doc:rule name="TR0099" />
<doc:codeList name="LanguageCodes" type="business" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--===== CONTAINERS =====-->
<xs:complexType name="CONNR2Type">
<xs:annotation>
<xs:documentation>
<doc:description value="CONTAINERS" />
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="ConNumNR21" type="simple:Alphanumeric_Max17">
<xs:annotation>
<xs:documentation>
<doc:description value="Container number" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--===== (MEANS OF TRANSPORT AT BORDER) IDENTITY =====-->
<xs:complexType name="IDEMEATRAGI970Type">
<xs:annotation>
<xs:documentation>
<doc:description value="(MEANS OF TRANSPORT AT BORDER) IDENTITY" />
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="NatIDEMEATRAGI973" type="simple:CountryCodeType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Nationality" />
<doc:condition name="C020" />
<doc:codeList name="CountryCodesFullList" type="business" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="IdeMeaTraGIMEATRA971" type="simple:Alphanumeric_Max27">
<xs:annotation>
<xs:documentation>
<doc:description value="Identity of means of transport crossing border" />
<doc:condition name="C514" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="IdeMeaTraGIMEATRA972LNG" type="simple:LanguageCodeType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Identity of means of transport crossing border LNG" />
<doc:rule name="TR0099" />
<doc:codeList name="LanguageCodes" type="business" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--===== (REPRESENTATIVE) TRADER =====-->
<xs:complexType name="TRAREPType">
<xs:annotation>
<xs:documentation>
<doc:description value="(REPRESENTATIVE) TRADER" />
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="NamTRE1" type="simple:TradNameType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Name" />
<doc:condition name="C501" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="StrAndNumTRE1" type="simple:StreetNumType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Street and number" />
<doc:condition name="C501" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PosCodTRE1" type="simple:PostalCodeType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Postal code" />
<doc:condition name="C501" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CitTRE1" type="simple:CityType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="City" />
<doc:condition name="C501" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CouCodTRE1" type="simple:CountryCodeType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Country code" />
<doc:condition name="C501" />
<doc:codeList name="CountryCodesFullList" type="business" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TRAREPLNG" type="simple:LanguageCodeType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="NAD LNG" />
<doc:rule name="TR0099" />
<doc:codeList name="LanguageCodes" type="business" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TINTRE1" type="simple:TINType">
<xs:annotation>
<xs:documentation>
<doc:description value="TIN" />
<doc:rule name="R837" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--===== (LODGING SUMMARY DECLARATION) PERSON =====-->
<xs:complexType name="PERLODSUMDECType">
<xs:annotation>
<xs:documentation>
<doc:description value="(LODGING SUMMARY DECLARATION) PERSON" />
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="NamPLD1" type="simple:TradNameType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Name" />
<doc:condition name="C501" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="StrAndNumPLD1" type="simple:StreetNumType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Street and number" />
<doc:condition name="C501" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PosCodPLD1" type="simple:PostalCodeType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Postal code" />
<doc:condition name="C501" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CitPLD1" type="simple:CityType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="City" />
<doc:condition name="C501" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CouCodPLD1" type="simple:CountryCodeType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Country code" />
<doc:condition name="C501" />
<doc:codeList name="CountryCodesFullList" type="business" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PERLODSUMDECLNG" type="simple:LanguageCodeType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="NAD LNG" />
<doc:rule name="TR0099" />
<doc:codeList name="LanguageCodes" type="business" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TINPLD1" type="simple:TINType">
<xs:annotation>
<xs:documentation>
<doc:description value="TIN" />
<doc:rule name="R837" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--===== (FIRST ENTRY) CUSTOMS OFFICE =====-->
<xs:complexType name="CUSOFFFENT730Type">
<xs:annotation>
<xs:documentation>
<doc:description value="(FIRST ENTRY) CUSTOMS OFFICE" />
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="RefNumCUSOFFFENT731" type="simple:CORefNumType">
<xs:annotation>
<xs:documentation>
<doc:description value="Reference number" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ExpDatOfArrFIRENT733" type="simple:DateTimeType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Expected date and time of arrival" />
<doc:rule name="R134" />
<doc:rule name="R660" />
<doc:rule name="R666" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--===== (ENTRY CARRIER) TRADER =====-->
<xs:complexType name="TRACARENT601Type">
<xs:annotation>
<xs:documentation>
<doc:description value="(ENTRY CARRIER) TRADER" />
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="NamTRACARENT604" type="simple:TradNameType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Name" />
<doc:condition name="C501" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="StrNumTRACARENT607" type="simple:StreetNumType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Street and number" />
<doc:condition name="C501" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PstCodTRACARENT606" type="simple:PostalCodeType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Postal code" />
<doc:condition name="C501" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CtyTRACARENT603" type="simple:CityType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="City" />
<doc:condition name="C501" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CouCodTRACARENT605" type="simple:CountryCodeType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Country code" />
<doc:condition name="C501" />
<doc:codeList name="CountryCodesFullList" type="business" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TRACARENT601LNG" type="simple:LanguageCodeType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="NAD LNG" />
<doc:rule name="TR0099" />
<doc:codeList name="LanguageCodes" type="business" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TINTRACARENT602" type="simple:TINType">
<xs:annotation>
<xs:documentation>
<doc:description value="TIN" />
<doc:rule name="R837" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,391 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ie="http://ics.dgtaxud.ec/CC305A" xmlns:complex_ics="http://ics.dgtaxud.ec/complex_ics" xmlns:simple_ics="http://ics.dgtaxud.ec/simple_ics" xmlns:tcl_ics="http://ics.dgtaxud.ec/tcl_ics" xmlns:simple="http://ics.dgtaxud.ec/simple" xmlns:tcl="http://ics.dgtaxud.ec/tcl" xmlns:doc="http://ics.dgtaxud.ec/doc" targetNamespace="http://ics.dgtaxud.ec/CC305A" attributeFormDefault="unqualified" elementFormDefault="unqualified" version="36.00">
<!--=========================================-->
<!--===== IE305:E_ENS_ARJ -->
<!--===== ENTRY SUMMARY DECLARATION AMENDMENT REJECTION -->
<!--===== ICS P1 Phase Definition -->
<!--===== DDNIA 11.00 -->
<!--===== XSD version v36.00 -->
<!--=========================================-->
<!--===== Imports =====-->
<xs:import namespace="http://ics.dgtaxud.ec/doc" schemaLocation="doc-v10-0.xsd" />
<xs:import namespace="http://ics.dgtaxud.ec/complex_ics" schemaLocation="complex_types_ics-v10-0.xsd" />
<xs:import namespace="http://ics.dgtaxud.ec/simple_ics" schemaLocation="simple_types_ics-v10-0.xsd" />
<xs:import namespace="http://ics.dgtaxud.ec/tcl_ics" schemaLocation="tcl_ics-v10-0.xsd" />
<xs:import namespace="http://ics.dgtaxud.ec/simple" schemaLocation="simple_types-v10-0.xsd" />
<xs:import namespace="http://ics.dgtaxud.ec/tcl" schemaLocation="tcl-v10-0.xsd" />
<!--===== Root Element =====-->
<xs:element name="CC305A" type="ie:CC305AType" />
<!--===== Root Element Content =====-->
<xs:complexType name="CC305AType">
<xs:sequence>
<xs:group ref="ie:MESSAGE" />
<xs:element name="HEAHEA" type="ie:HEAHEAType">
<xs:annotation>
<xs:documentation>
<doc:description value="HEADER" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="FUNERRER1" type="ie:FUNERRER1Type" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>
<doc:description value="FUNCTIONAL ERROR" />
<doc:rule name="R123" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TRAREP" type="ie:TRAREPType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="(REPRESENTATIVE) TRADER" />
<doc:condition name="C552" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PERLODSUMDEC" type="ie:PERLODSUMDECType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="(LODGING SUMMARY DECLARATION) PERSON" />
<doc:condition name="C552" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CUSOFFFENT730" type="ie:CUSOFFFENT730Type">
<xs:annotation>
<xs:documentation>
<doc:description value="(FIRST ENTRY) CUSTOMS OFFICE" />
<doc:rule name="R814" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--===== MESSAGE Content =====-->
<xs:group name="MESSAGE">
<xs:sequence>
<xs:element name="MesSenMES3" type="simple:Alphanumeric_Max35">
<xs:annotation>
<xs:documentation>
<doc:description value="Message sender" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="MesRecMES6" type="simple:Alphanumeric_Max35">
<xs:annotation>
<xs:documentation>
<doc:description value="Message recipient" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DatOfPreMES9" type="simple:DatePrepType">
<xs:annotation>
<xs:documentation>
<doc:description value="Date of preparation" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TimOfPreMES10" type="simple:TimeType">
<xs:annotation>
<xs:documentation>
<doc:description value="Time of preparation" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PriMES15" type="simple:Alpha_1" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Priority" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TesIndMES18" type="tcl:Flag" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Test indicator" />
<doc:rule name="TR9085" />
<doc:codeList name="Flag" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="MesIdeMES19" type="simple:Alphanumeric_Max14">
<xs:annotation>
<xs:documentation>
<doc:description value="Message identification" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="MesTypMES20" type="tcl:MessageTypes">
<xs:annotation>
<xs:documentation>
<doc:description value="Message type" />
<doc:codeList name="MessageTypes" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CorIdeMES25" type="simple:Alphanumeric_Max14" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Correlation identifier" />
<doc:rule name="TR9181" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:group>
<!--===== HEADER =====-->
<xs:complexType name="HEAHEAType">
<xs:annotation>
<xs:documentation>
<doc:description value="HEADER" />
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="DocNumHEA5" type="simple:MRNType">
<xs:annotation>
<xs:documentation>
<doc:description value="Document/reference number" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="AmeRejMotCodHEA604" type="simple:Numeric_1" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Amendment rejection motivation code" />
<doc:codeList name="AmendmentRejectionMotivationCode" type="business" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="AmeRejMotTexHEA605" type="simple:Alphanumeric_Max350" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Amendment rejection motivation text" />
<doc:condition name="C310" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="AmeRejMotTexHEA605LNG" type="simple:LanguageCodeType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Amendment rejection motivation text LNG" />
<doc:rule name="TR0099" />
<doc:codeList name="LanguageCodes" type="business" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DatTimAmeHEA113" type="simple:DateTimeType">
<xs:annotation>
<xs:documentation>
<doc:description value="Date and Time of amendment" />
<doc:rule name="R660" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="AmeRejDatTimHEA112" type="simple:DateTimeType">
<xs:annotation>
<xs:documentation>
<doc:description value="Amendment rejection date and time" />
<doc:rule name="R660" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--===== FUNCTIONAL ERROR =====-->
<xs:complexType name="FUNERRER1Type">
<xs:annotation>
<xs:documentation>
<doc:description value="FUNCTIONAL ERROR" />
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="ErrTypER11" type="tcl:FunctionalErrorCodes">
<xs:annotation>
<xs:documentation>
<doc:description value="Error type" />
<doc:rule name="R098" />
<doc:codeList name="FunctionalErrorCodes" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ErrPoiER12" type="simple:Alphanumeric_Max210">
<xs:annotation>
<xs:documentation>
<doc:description value="Error pointer" />
<doc:rule name="R098" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ErrReaER13" type="simple:Alphanumeric_Max6" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Error reason" />
<doc:rule name="R098" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="OriAttValER14" type="simple:Alphanumeric_Max140" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Original attribute value" />
<doc:rule name="R098" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--===== (REPRESENTATIVE) TRADER =====-->
<xs:complexType name="TRAREPType">
<xs:annotation>
<xs:documentation>
<doc:description value="(REPRESENTATIVE) TRADER" />
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="NamTRE1" type="simple:TradNameType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Name" />
<doc:condition name="C501" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="StrAndNumTRE1" type="simple:StreetNumType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Street and number" />
<doc:condition name="C501" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PosCodTRE1" type="simple:PostalCodeType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Postal code" />
<doc:condition name="C501" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CitTRE1" type="simple:CityType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="City" />
<doc:condition name="C501" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CouCodTRE1" type="simple:CountryCodeType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Country code" />
<doc:condition name="C501" />
<doc:codeList name="CountryCodesFullList" type="business" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TRAREPLNG" type="simple:LanguageCodeType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="NAD LNG" />
<doc:rule name="TR0099" />
<doc:codeList name="LanguageCodes" type="business" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TINTRE1" type="simple:TINType">
<xs:annotation>
<xs:documentation>
<doc:description value="TIN" />
<doc:rule name="R837" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--===== (LODGING SUMMARY DECLARATION) PERSON =====-->
<xs:complexType name="PERLODSUMDECType">
<xs:annotation>
<xs:documentation>
<doc:description value="(LODGING SUMMARY DECLARATION) PERSON" />
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="NamPLD1" type="simple:TradNameType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Name" />
<doc:condition name="C501" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="StrAndNumPLD1" type="simple:StreetNumType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Street and number" />
<doc:condition name="C501" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PosCodPLD1" type="simple:PostalCodeType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Postal code" />
<doc:condition name="C501" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CitPLD1" type="simple:CityType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="City" />
<doc:condition name="C501" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CouCodPLD1" type="simple:CountryCodeType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Country code" />
<doc:condition name="C501" />
<doc:codeList name="CountryCodesFullList" type="business" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PERLODSUMDECLNG" type="simple:LanguageCodeType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="NAD LNG" />
<doc:rule name="TR0099" />
<doc:codeList name="LanguageCodes" type="business" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TINPLD1" type="simple:TINType">
<xs:annotation>
<xs:documentation>
<doc:description value="TIN" />
<doc:rule name="R837" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--===== (FIRST ENTRY) CUSTOMS OFFICE =====-->
<xs:complexType name="CUSOFFFENT730Type">
<xs:annotation>
<xs:documentation>
<doc:description value="(FIRST ENTRY) CUSTOMS OFFICE" />
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="RefNumCUSOFFFENT731" type="simple:CORefNumType">
<xs:annotation>
<xs:documentation>
<doc:description value="Reference number" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>

View File

@@ -0,0 +1,884 @@
'' ------------------------------------------------------------------------------
'' <auto-generated>
'' Generated by Xsd2Code++. Version 6.0.0.0. www.xsd2code.com
'' {"TargetFramework":"Net48","NameSpace":"CC316A_v10_0","Language":"VisualBasic","Properties":{},"XmlAttribute":{"Enabled":true},"ClassParams":{},"Serialization":{"ShouldSerialize":{},"AdditionalSerializers":{},"XmlSerializerEvent":{},"XmlOutput":{"Formating":true},"JsonOutput":{},"Enabled":true},"Miscellaneous":{}}
'' </auto-generated>
'' ------------------------------------------------------------------------------
#Disable Warning
Imports System
Imports System.Diagnostics
Imports System.Xml.Serialization
Imports System.Runtime.Serialization
Imports System.Collections
Imports System.Xml.Schema
Imports System.ComponentModel
Imports System.Xml
Imports System.IO
Imports System.Text
Imports System.Collections.Generic
Namespace CC316A_v10_0
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
System.Serializable,
DebuggerStepThrough,
DesignerCategoryAttribute("code"),
XmlType([Namespace]:="http://ics.dgtaxud.ec/CC316A"),
XmlRoot("CC316A", [Namespace]:="http://ics.dgtaxud.ec/CC316A", IsNullable:=False)>
Partial Public Class CC316AType
#Region "Private fields"
Private _mesSenMES3 As String
Private _mesRecMES6 As String
Private _datOfPreMES9 As String
Private _timOfPreMES10 As String
Private _priMES15 As String
Private _tesIndMES18 As Flag
Private _mesIdeMES19 As String
Private _mesTypMES20 As MessageTypes
Private _corIdeMES25 As String
Private _hEAHEA As HEAHEAType
Private _fUNERRER1 As List(Of FUNERRER1Type)
Private Shared _serializerXml As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._fUNERRER1 = New List(Of FUNERRER1Type)()
Me._hEAHEA = New HEAHEAType()
End Sub
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="token")>
Public Property MesSenMES3() As String
Get
Return Me._mesSenMES3
End Get
Set
Me._mesSenMES3 = Value
End Set
End Property
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="token")>
Public Property MesRecMES6() As String
Get
Return Me._mesRecMES6
End Get
Set
Me._mesRecMES6 = Value
End Set
End Property
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="token")>
Public Property DatOfPreMES9() As String
Get
Return Me._datOfPreMES9
End Get
Set
Me._datOfPreMES9 = Value
End Set
End Property
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="token")>
Public Property TimOfPreMES10() As String
Get
Return Me._timOfPreMES10
End Get
Set
Me._timOfPreMES10 = Value
End Set
End Property
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="token")>
Public Property PriMES15() As String
Get
Return Me._priMES15
End Get
Set
Me._priMES15 = Value
End Set
End Property
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
Public Property TesIndMES18() As Flag
Get
Return Me._tesIndMES18
End Get
Set
Me._tesIndMES18 = Value
End Set
End Property
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="token")>
Public Property MesIdeMES19() As String
Get
Return Me._mesIdeMES19
End Get
Set
Me._mesIdeMES19 = Value
End Set
End Property
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
Public Property MesTypMES20() As MessageTypes
Get
Return Me._mesTypMES20
End Get
Set
Me._mesTypMES20 = Value
End Set
End Property
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="token")>
Public Property CorIdeMES25() As String
Get
Return Me._corIdeMES25
End Get
Set
Me._corIdeMES25 = Value
End Set
End Property
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
Public Property HEAHEA() As HEAHEAType
Get
Return Me._hEAHEA
End Get
Set
Me._hEAHEA = Value
End Set
End Property
<XmlElement("FUNERRER1", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
Public Property FUNERRER1() As List(Of FUNERRER1Type)
Get
Return Me._fUNERRER1
End Get
Set
Me._fUNERRER1 = Value
End Set
End Property
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
Get
If (_serializerXml Is Nothing) Then
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(CC316AType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
''' <summary>
''' Serialize CC316AType object
''' </summary>
''' <returns>XML value</returns>
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
xmlWriterSettings.Indent = True
xmlWriterSettings.IndentChars = " "
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
''' <summary>
''' Deserializes CC316AType object
''' </summary>
''' <param name="input">string to deserialize</param>
''' <param name="obj">Output CC316AType object</param>
''' <param name="exception">output Exception value if deserialize failed</param>
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CC316AType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, CC316AType)
Try
obj = Deserialize(input)
Return True
Catch ex As System.Exception
exception = ex
Return False
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CC316AType) As Boolean
Dim exception As System.Exception = Nothing
Return Deserialize(input, obj, exception)
End Function
Public Overloads Shared Function Deserialize(ByVal input As String) As CC316AType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), CC316AType)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As Stream) As CC316AType
Return CType(SerializerXml.Deserialize(s), CC316AType)
End Function
#End Region
''' <summary>
''' Serializes current CC316AType object into file
''' </summary>
''' <param name="fileName">full path of outupt xml file</param>
''' <param name="exception">output Exception value if failed</param>
''' <returns>true if can serialize and save into file; otherwise, false</returns>
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
exception = Nothing
Try
SaveToFile(fileName)
Return True
Catch e As System.Exception
exception = e
Return False
End Try
End Function
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
Dim streamWriter As StreamWriter = Nothing
Try
Dim dataString As String = Serialize()
Dim outputFile As FileInfo = New FileInfo(fileName)
streamWriter = outputFile.CreateText
streamWriter.WriteLine(dataString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
''' <summary>
''' Deserializes xml markup from file into an CC316AType object
''' </summary>
''' <param name="fileName">File to load and deserialize</param>
''' <param name="obj">Output CC316AType object</param>
''' <param name="exception">output Exception value if deserialize failed</param>
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CC316AType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, CC316AType)
Try
obj = LoadFromFile(fileName)
Return True
Catch ex As System.Exception
exception = ex
Return False
End Try
End Function
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CC316AType) As Boolean
Dim exception As System.Exception = Nothing
Return LoadFromFile(fileName, obj, exception)
End Function
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As CC316AType
Dim file As FileStream = Nothing
Dim sr As StreamReader = Nothing
Try
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New StreamReader(file)
Dim dataString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(dataString)
Finally
If (Not (file) Is Nothing) Then
file.Dispose()
End If
If (Not (sr) Is Nothing) Then
sr.Dispose()
End If
End Try
End Function
End Class
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
System.Serializable,
XmlType([Namespace]:="http://ics.dgtaxud.ec/tcl")>
Public Enum Flag
<XmlEnum("0")>
Item0
<XmlEnum("1")>
Item1
End Enum
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
System.Serializable,
XmlType([Namespace]:="http://ics.dgtaxud.ec/tcl")>
Public Enum MessageTypes
CC304A
CC305A
CC313A
CC315A
CC316A
CC323A
CC324A
CC325A
CC328A
CC351A
CD030C
CD031C
CD032C
CD070B
CD071B
CD301A
CD302A
CD303A
CD319A
CD411C
CD412C
CD906B
CD912B
CD913B
CD914B
CD916B
CD917B
CD931C
CD932C
CD971B
End Enum
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
System.Serializable,
DebuggerStepThrough,
DesignerCategoryAttribute("code"),
XmlType([Namespace]:="http://ics.dgtaxud.ec/CC316A")>
Partial Public Class HEAHEAType
#Region "Private fields"
Private _refNumHEA4 As String
Private _decRejReaHEA252 As String
Private _decRejReaHEA252LNG As String
Private _decRejDatTimHEA116 As String
Private Shared _serializerXml As XmlSerializer
#End Region
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="token")>
Public Property RefNumHEA4() As String
Get
Return Me._refNumHEA4
End Get
Set
Me._refNumHEA4 = Value
End Set
End Property
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="token")>
Public Property DecRejReaHEA252() As String
Get
Return Me._decRejReaHEA252
End Get
Set
Me._decRejReaHEA252 = Value
End Set
End Property
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="token")>
Public Property DecRejReaHEA252LNG() As String
Get
Return Me._decRejReaHEA252LNG
End Get
Set
Me._decRejReaHEA252LNG = Value
End Set
End Property
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="token")>
Public Property DecRejDatTimHEA116() As String
Get
Return Me._decRejDatTimHEA116
End Get
Set
Me._decRejDatTimHEA116 = Value
End Set
End Property
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
Get
If (_serializerXml Is Nothing) Then
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(HEAHEAType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
''' <summary>
''' Serialize HEAHEAType object
''' </summary>
''' <returns>XML value</returns>
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
xmlWriterSettings.Indent = True
xmlWriterSettings.IndentChars = " "
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
''' <summary>
''' Deserializes HEAHEAType object
''' </summary>
''' <param name="input">string to deserialize</param>
''' <param name="obj">Output HEAHEAType object</param>
''' <param name="exception">output Exception value if deserialize failed</param>
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As HEAHEAType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, HEAHEAType)
Try
obj = Deserialize(input)
Return True
Catch ex As System.Exception
exception = ex
Return False
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As HEAHEAType) As Boolean
Dim exception As System.Exception = Nothing
Return Deserialize(input, obj, exception)
End Function
Public Overloads Shared Function Deserialize(ByVal input As String) As HEAHEAType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), HEAHEAType)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As Stream) As HEAHEAType
Return CType(SerializerXml.Deserialize(s), HEAHEAType)
End Function
#End Region
''' <summary>
''' Serializes current HEAHEAType object into file
''' </summary>
''' <param name="fileName">full path of outupt xml file</param>
''' <param name="exception">output Exception value if failed</param>
''' <returns>true if can serialize and save into file; otherwise, false</returns>
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
exception = Nothing
Try
SaveToFile(fileName)
Return True
Catch e As System.Exception
exception = e
Return False
End Try
End Function
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
Dim streamWriter As StreamWriter = Nothing
Try
Dim dataString As String = Serialize()
Dim outputFile As FileInfo = New FileInfo(fileName)
streamWriter = outputFile.CreateText
streamWriter.WriteLine(dataString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
''' <summary>
''' Deserializes xml markup from file into an HEAHEAType object
''' </summary>
''' <param name="fileName">File to load and deserialize</param>
''' <param name="obj">Output HEAHEAType object</param>
''' <param name="exception">output Exception value if deserialize failed</param>
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As HEAHEAType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, HEAHEAType)
Try
obj = LoadFromFile(fileName)
Return True
Catch ex As System.Exception
exception = ex
Return False
End Try
End Function
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As HEAHEAType) As Boolean
Dim exception As System.Exception = Nothing
Return LoadFromFile(fileName, obj, exception)
End Function
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As HEAHEAType
Dim file As FileStream = Nothing
Dim sr As StreamReader = Nothing
Try
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New StreamReader(file)
Dim dataString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(dataString)
Finally
If (Not (file) Is Nothing) Then
file.Dispose()
End If
If (Not (sr) Is Nothing) Then
sr.Dispose()
End If
End Try
End Function
End Class
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
System.Serializable,
DebuggerStepThrough,
DesignerCategoryAttribute("code"),
XmlType([Namespace]:="http://ics.dgtaxud.ec/CC316A")>
Partial Public Class FUNERRER1Type
#Region "Private fields"
Private _errTypER11 As FunctionalErrorCodes
Private _errPoiER12 As String
Private _errReaER13 As String
Private _oriAttValER14 As String
Private Shared _serializerXml As XmlSerializer
#End Region
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
Public Property ErrTypER11() As FunctionalErrorCodes
Get
Return Me._errTypER11
End Get
Set
Me._errTypER11 = Value
End Set
End Property
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="token")>
Public Property ErrPoiER12() As String
Get
Return Me._errPoiER12
End Get
Set
Me._errPoiER12 = Value
End Set
End Property
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="token")>
Public Property ErrReaER13() As String
Get
Return Me._errReaER13
End Get
Set
Me._errReaER13 = Value
End Set
End Property
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="token")>
Public Property OriAttValER14() As String
Get
Return Me._oriAttValER14
End Get
Set
Me._oriAttValER14 = Value
End Set
End Property
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
Get
If (_serializerXml Is Nothing) Then
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FUNERRER1Type))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
''' <summary>
''' Serialize FUNERRER1Type object
''' </summary>
''' <returns>XML value</returns>
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
xmlWriterSettings.Indent = True
xmlWriterSettings.IndentChars = " "
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
''' <summary>
''' Deserializes FUNERRER1Type object
''' </summary>
''' <param name="input">string to deserialize</param>
''' <param name="obj">Output FUNERRER1Type object</param>
''' <param name="exception">output Exception value if deserialize failed</param>
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As FUNERRER1Type, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FUNERRER1Type)
Try
obj = Deserialize(input)
Return True
Catch ex As System.Exception
exception = ex
Return False
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As FUNERRER1Type) As Boolean
Dim exception As System.Exception = Nothing
Return Deserialize(input, obj, exception)
End Function
Public Overloads Shared Function Deserialize(ByVal input As String) As FUNERRER1Type
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FUNERRER1Type)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As Stream) As FUNERRER1Type
Return CType(SerializerXml.Deserialize(s), FUNERRER1Type)
End Function
#End Region
''' <summary>
''' Serializes current FUNERRER1Type object into file
''' </summary>
''' <param name="fileName">full path of outupt xml file</param>
''' <param name="exception">output Exception value if failed</param>
''' <returns>true if can serialize and save into file; otherwise, false</returns>
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
exception = Nothing
Try
SaveToFile(fileName)
Return True
Catch e As System.Exception
exception = e
Return False
End Try
End Function
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
Dim streamWriter As StreamWriter = Nothing
Try
Dim dataString As String = Serialize()
Dim outputFile As FileInfo = New FileInfo(fileName)
streamWriter = outputFile.CreateText
streamWriter.WriteLine(dataString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
''' <summary>
''' Deserializes xml markup from file into an FUNERRER1Type object
''' </summary>
''' <param name="fileName">File to load and deserialize</param>
''' <param name="obj">Output FUNERRER1Type object</param>
''' <param name="exception">output Exception value if deserialize failed</param>
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FUNERRER1Type, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, FUNERRER1Type)
Try
obj = LoadFromFile(fileName)
Return True
Catch ex As System.Exception
exception = ex
Return False
End Try
End Function
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FUNERRER1Type) As Boolean
Dim exception As System.Exception = Nothing
Return LoadFromFile(fileName, obj, exception)
End Function
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FUNERRER1Type
Dim file As FileStream = Nothing
Dim sr As StreamReader = Nothing
Try
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New StreamReader(file)
Dim dataString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(dataString)
Finally
If (Not (file) Is Nothing) Then
file.Dispose()
End If
If (Not (sr) Is Nothing) Then
sr.Dispose()
End If
End Try
End Function
End Class
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
System.Serializable,
XmlType([Namespace]:="http://ics.dgtaxud.ec/tcl")>
Public Enum FunctionalErrorCodes
<XmlEnum("12")>
Item12
<XmlEnum("13")>
Item13
<XmlEnum("14")>
Item14
<XmlEnum("15")>
Item15
<XmlEnum("19")>
Item19
<XmlEnum("26")>
Item26
<XmlEnum("35")>
Item35
<XmlEnum("37")>
Item37
<XmlEnum("38")>
Item38
<XmlEnum("39")>
Item39
<XmlEnum("40")>
Item40
<XmlEnum("90")>
Item90
<XmlEnum("91")>
Item91
<XmlEnum("92")>
Item92
<XmlEnum("93")>
Item93
End Enum
End Namespace
#Enable Warning

View File

@@ -0,0 +1,198 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ie="http://ics.dgtaxud.ec/CC316A" xmlns:complex_ics="http://ics.dgtaxud.ec/complex_ics" xmlns:simple_ics="http://ics.dgtaxud.ec/simple_ics" xmlns:tcl_ics="http://ics.dgtaxud.ec/tcl_ics" xmlns:simple="http://ics.dgtaxud.ec/simple" xmlns:tcl="http://ics.dgtaxud.ec/tcl" xmlns:doc="http://ics.dgtaxud.ec/doc" targetNamespace="http://ics.dgtaxud.ec/CC316A" attributeFormDefault="unqualified" elementFormDefault="unqualified" version="36.00">
<!--=========================================-->
<!--===== IE316:E_ENS_REJ -->
<!--===== ENTRY SUMMARY DECLARATION REJECTED -->
<!--===== ICS P1 Phase Definition -->
<!--===== DDNIA 11.00 -->
<!--===== XSD version v36.00 -->
<!--=========================================-->
<!--===== Imports =====-->
<xs:import namespace="http://ics.dgtaxud.ec/doc" schemaLocation="doc-v10-0.xsd" />
<xs:import namespace="http://ics.dgtaxud.ec/complex_ics" schemaLocation="complex_types_ics-v10-0.xsd" />
<xs:import namespace="http://ics.dgtaxud.ec/simple_ics" schemaLocation="simple_types_ics-v10-0.xsd" />
<xs:import namespace="http://ics.dgtaxud.ec/tcl_ics" schemaLocation="tcl_ics-v10-0.xsd" />
<xs:import namespace="http://ics.dgtaxud.ec/simple" schemaLocation="simple_types-v10-0.xsd" />
<xs:import namespace="http://ics.dgtaxud.ec/tcl" schemaLocation="tcl-v10-0.xsd" />
<!--===== Root Element =====-->
<xs:element name="CC316A" type="ie:CC316AType" />
<!--===== Root Element Content =====-->
<xs:complexType name="CC316AType">
<xs:sequence>
<xs:group ref="ie:MESSAGE" />
<xs:element name="HEAHEA" type="ie:HEAHEAType">
<xs:annotation>
<xs:documentation>
<doc:description value="HEADER" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="FUNERRER1" type="ie:FUNERRER1Type" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>
<doc:description value="FUNCTIONAL ERROR" />
<doc:rule name="R123" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--===== MESSAGE Content =====-->
<xs:group name="MESSAGE">
<xs:sequence>
<xs:element name="MesSenMES3" type="simple:Alphanumeric_Max35">
<xs:annotation>
<xs:documentation>
<doc:description value="Message sender" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="MesRecMES6" type="simple:Alphanumeric_Max35">
<xs:annotation>
<xs:documentation>
<doc:description value="Message recipient" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DatOfPreMES9" type="simple:DatePrepType">
<xs:annotation>
<xs:documentation>
<doc:description value="Date of preparation" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TimOfPreMES10" type="simple:TimeType">
<xs:annotation>
<xs:documentation>
<doc:description value="Time of preparation" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PriMES15" type="simple:Alpha_1" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Priority" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TesIndMES18" type="tcl:Flag" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Test indicator" />
<doc:rule name="TR9085" />
<doc:codeList name="Flag" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="MesIdeMES19" type="simple:Alphanumeric_Max14">
<xs:annotation>
<xs:documentation>
<doc:description value="Message identification" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="MesTypMES20" type="tcl:MessageTypes">
<xs:annotation>
<xs:documentation>
<doc:description value="Message type" />
<doc:codeList name="MessageTypes" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CorIdeMES25" type="simple:Alphanumeric_Max14" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Correlation identifier" />
<doc:rule name="TR9181" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:group>
<!--===== HEADER =====-->
<xs:complexType name="HEAHEAType">
<xs:annotation>
<xs:documentation>
<doc:description value="HEADER" />
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="RefNumHEA4" type="simple:Alphanumeric_Max22">
<xs:annotation>
<xs:documentation>
<doc:description value="Reference number" />
<doc:rule name="R891" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DecRejReaHEA252" type="simple:Alphanumeric_Max350" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Declaration rejection reason" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DecRejReaHEA252LNG" type="simple:LanguageCodeType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Declaration rejection reason LNG" />
<doc:rule name="TR0099" />
<doc:codeList name="LanguageCodes" type="business" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DecRejDatTimHEA116" type="simple:DateTimeType">
<xs:annotation>
<xs:documentation>
<doc:description value="Declaration rejection date and time" />
<doc:rule name="R660" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--===== FUNCTIONAL ERROR =====-->
<xs:complexType name="FUNERRER1Type">
<xs:annotation>
<xs:documentation>
<doc:description value="FUNCTIONAL ERROR" />
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="ErrTypER11" type="tcl:FunctionalErrorCodes">
<xs:annotation>
<xs:documentation>
<doc:description value="Error type" />
<doc:rule name="R098" />
<doc:codeList name="FunctionalErrorCodes" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ErrPoiER12" type="simple:Alphanumeric_Max210">
<xs:annotation>
<xs:documentation>
<doc:description value="Error pointer" />
<doc:rule name="R098" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ErrReaER13" type="simple:Alphanumeric_Max6" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Error reason" />
<doc:rule name="R098" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="OriAttValER14" type="simple:Alphanumeric_Max140" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Original attribute value" />
<doc:rule name="R098" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,550 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ie="http://ics.dgtaxud.ec/CC328A" xmlns:complex_ics="http://ics.dgtaxud.ec/complex_ics" xmlns:simple_ics="http://ics.dgtaxud.ec/simple_ics" xmlns:tcl_ics="http://ics.dgtaxud.ec/tcl_ics" xmlns:simple="http://ics.dgtaxud.ec/simple" xmlns:tcl="http://ics.dgtaxud.ec/tcl" xmlns:doc="http://ics.dgtaxud.ec/doc" targetNamespace="http://ics.dgtaxud.ec/CC328A" attributeFormDefault="unqualified" elementFormDefault="unqualified" version="36.00">
<!--=========================================-->
<!--===== IE328:E_ENS_ACK -->
<!--===== ENTRY SUMMARY DECLARATION ACKNOWLEDGEMENT -->
<!--===== ICS P1 Phase Definition -->
<!--===== DDNIA 11.00 -->
<!--===== XSD version v36.00 -->
<!--=========================================-->
<!--===== Imports =====-->
<xs:import namespace="http://ics.dgtaxud.ec/doc" schemaLocation="doc-v10-0.xsd" />
<xs:import namespace="http://ics.dgtaxud.ec/complex_ics" schemaLocation="complex_types_ics-v10-0.xsd" />
<xs:import namespace="http://ics.dgtaxud.ec/simple_ics" schemaLocation="simple_types_ics-v10-0.xsd" />
<xs:import namespace="http://ics.dgtaxud.ec/tcl_ics" schemaLocation="tcl_ics-v10-0.xsd" />
<xs:import namespace="http://ics.dgtaxud.ec/simple" schemaLocation="simple_types-v10-0.xsd" />
<xs:import namespace="http://ics.dgtaxud.ec/tcl" schemaLocation="tcl-v10-0.xsd" />
<!--===== Root Element =====-->
<xs:element name="CC328A" type="ie:CC328AType" />
<!--===== Root Element Content =====-->
<xs:complexType name="CC328AType">
<xs:sequence>
<xs:group ref="ie:MESSAGE" />
<xs:element name="HEAHEA" type="ie:HEAHEAType">
<xs:annotation>
<xs:documentation>
<doc:description value="HEADER" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="GOOITEGDS" type="ie:GOOITEGDSType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>
<doc:description value="GOODS ITEM" />
<doc:rule name="R134" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CUSOFFLON" type="ie:CUSOFFLONType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="(LODGEMENT) CUSTOMS OFFICE" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PERLODSUMDEC" type="ie:PERLODSUMDECType">
<xs:annotation>
<xs:documentation>
<doc:description value="(LODGING SUMMARY DECLARATION) PERSON" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CUSOFFFENT730" type="ie:CUSOFFFENT730Type">
<xs:annotation>
<xs:documentation>
<doc:description value="(FIRST ENTRY) CUSTOMS OFFICE" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TRACARENT601" type="ie:TRACARENT601Type" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="(ENTRY CARRIER) TRADER" />
<doc:rule name="R134" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--===== MESSAGE Content =====-->
<xs:group name="MESSAGE">
<xs:sequence>
<xs:element name="MesSenMES3" type="simple:Alphanumeric_Max35">
<xs:annotation>
<xs:documentation>
<doc:description value="Message sender" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="MesRecMES6" type="simple:Alphanumeric_Max35">
<xs:annotation>
<xs:documentation>
<doc:description value="Message recipient" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DatOfPreMES9" type="simple:DatePrepType">
<xs:annotation>
<xs:documentation>
<doc:description value="Date of preparation" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TimOfPreMES10" type="simple:TimeType">
<xs:annotation>
<xs:documentation>
<doc:description value="Time of preparation" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PriMES15" type="simple:Alpha_1" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Priority" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TesIndMES18" type="tcl:Flag" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Test indicator" />
<doc:rule name="TR9085" />
<doc:codeList name="Flag" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="MesIdeMES19" type="simple:Alphanumeric_Max14">
<xs:annotation>
<xs:documentation>
<doc:description value="Message identification" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="MesTypMES20" type="tcl:MessageTypes">
<xs:annotation>
<xs:documentation>
<doc:description value="Message type" />
<doc:codeList name="MessageTypes" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CorIdeMES25" type="simple:Alphanumeric_Max14" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Correlation identifier" />
<doc:rule name="TR9181" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:group>
<!--===== HEADER =====-->
<xs:complexType name="HEAHEAType">
<xs:annotation>
<xs:documentation>
<doc:description value="HEADER" />
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="RefNumHEA4" type="simple:Alphanumeric_Max22">
<xs:annotation>
<xs:documentation>
<doc:description value="Reference number" />
<doc:rule name="R891" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DocNumHEA5" type="simple:MRNType">
<xs:annotation>
<xs:documentation>
<doc:description value="Document/reference number" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TraModAtBorHEA76" type="simple:Numeric_Max2" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Transport mode at border" />
<doc:rule name="R134" />
<doc:rule name="R826" />
<doc:codeList name="TransportMode" type="business" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="NatHEA001" type="simple:CountryCodeType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Nationality" />
<doc:rule name="R134" />
<doc:condition name="C024" />
<doc:codeList name="CountryCodesFullList" type="business" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="IdeOfMeaOfTraCroHEA85" type="simple:Alphanumeric_Max27" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Identity of means of transport crossing border" />
<doc:rule name="R134" />
<doc:condition name="C017" />
<doc:condition name="C514" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="IdeOfMeaOfTraCroHEA85LNG" type="simple:LanguageCodeType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Identity of means of transport crossing border LNG" />
<doc:rule name="TR0099" />
<doc:codeList name="LanguageCodes" type="business" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ComRefNumHEA" type="simple:Alphanumeric_Max70" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Commercial Reference Number" />
<doc:rule name="R134" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ConRefNumHEA" type="simple:Alphanumeric_Max35" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Conveyance reference number" />
<doc:rule name="R134" />
<doc:rule name="R843" />
<doc:condition name="C518" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DecRegDatTimHEA115" type="simple:DateTimeType">
<xs:annotation>
<xs:documentation>
<doc:description value="Declaration registration date and time" />
<doc:rule name="R660" />
<doc:rule name="R661" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--===== GOODS ITEM =====-->
<xs:complexType name="GOOITEGDSType">
<xs:annotation>
<xs:documentation>
<doc:description value="GOODS ITEM" />
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="IteNumGDS7" type="simple:Numeric_Max5">
<xs:annotation>
<xs:documentation>
<doc:description value="Item number" />
<doc:rule name="R005" />
<doc:rule name="R007" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ComRefNumGIM1" type="simple:Alphanumeric_Max70" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Commercial Reference Number" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PRODOCDC2" type="ie:PRODOCDC2Type" minOccurs="0" maxOccurs="99">
<xs:annotation>
<xs:documentation>
<doc:description value="PRODUCED DOCUMENTS/CERTIFICATES" />
<doc:rule name="R147" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CONNR2" type="ie:CONNR2Type" minOccurs="0" maxOccurs="99">
<xs:annotation>
<xs:documentation>
<doc:description value="CONTAINERS" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="IDEMEATRAGI970" type="ie:IDEMEATRAGI970Type" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>
<doc:description value="(MEANS OF TRANSPORT AT BORDER) IDENTITY" />
<doc:condition name="C019" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--===== PRODUCED DOCUMENTS/CERTIFICATES =====-->
<xs:complexType name="PRODOCDC2Type">
<xs:annotation>
<xs:documentation>
<doc:description value="PRODUCED DOCUMENTS/CERTIFICATES" />
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="DocTypDC21" type="simple:Alphanumeric_Max4">
<xs:annotation>
<xs:documentation>
<doc:description value="Document type" />
<doc:rule name="R136" />
<doc:codeList name="DocumentTypeCommon" type="business" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DocRefDC23" type="simple:Alphanumeric_Max35">
<xs:annotation>
<xs:documentation>
<doc:description value="Document reference" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DocRefDCLNG" type="simple:LanguageCodeType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Document reference LNG" />
<doc:rule name="TR0099" />
<doc:codeList name="LanguageCodes" type="business" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--===== CONTAINERS =====-->
<xs:complexType name="CONNR2Type">
<xs:annotation>
<xs:documentation>
<doc:description value="CONTAINERS" />
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="ConNumNR21" type="simple:Alphanumeric_Max17">
<xs:annotation>
<xs:documentation>
<doc:description value="Container number" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--===== (MEANS OF TRANSPORT AT BORDER) IDENTITY =====-->
<xs:complexType name="IDEMEATRAGI970Type">
<xs:annotation>
<xs:documentation>
<doc:description value="(MEANS OF TRANSPORT AT BORDER) IDENTITY" />
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="NatIDEMEATRAGI973" type="simple:CountryCodeType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Nationality" />
<doc:condition name="C020" />
<doc:codeList name="CountryCodesFullList" type="business" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="IdeMeaTraGIMEATRA971" type="simple:Alphanumeric_Max27">
<xs:annotation>
<xs:documentation>
<doc:description value="Identity of means of transport crossing border" />
<doc:condition name="C514" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="IdeMeaTraGIMEATRA972LNG" type="simple:LanguageCodeType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Identity of means of transport crossing border LNG" />
<doc:rule name="TR0099" />
<doc:codeList name="LanguageCodes" type="business" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--===== (LODGEMENT) CUSTOMS OFFICE =====-->
<xs:complexType name="CUSOFFLONType">
<xs:annotation>
<xs:documentation>
<doc:description value="(LODGEMENT) CUSTOMS OFFICE" />
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="RefNumCOL1" type="simple:CORefNumType">
<xs:annotation>
<xs:documentation>
<doc:description value="Reference number" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--===== (LODGING SUMMARY DECLARATION) PERSON =====-->
<xs:complexType name="PERLODSUMDECType">
<xs:annotation>
<xs:documentation>
<doc:description value="(LODGING SUMMARY DECLARATION) PERSON" />
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="NamPLD1" type="simple:TradNameType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Name" />
<doc:condition name="C501" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="StrAndNumPLD1" type="simple:StreetNumType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Street and number" />
<doc:condition name="C501" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PosCodPLD1" type="simple:PostalCodeType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Postal code" />
<doc:condition name="C501" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CitPLD1" type="simple:CityType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="City" />
<doc:condition name="C501" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CouCodPLD1" type="simple:CountryCodeType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Country code" />
<doc:condition name="C501" />
<doc:codeList name="CountryCodesFullList" type="business" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PERLODSUMDECLNG" type="simple:LanguageCodeType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="NAD LNG" />
<doc:rule name="TR0099" />
<doc:codeList name="LanguageCodes" type="business" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TINPLD1" type="simple:TINType">
<xs:annotation>
<xs:documentation>
<doc:description value="TIN" />
<doc:rule name="R837" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--===== (FIRST ENTRY) CUSTOMS OFFICE =====-->
<xs:complexType name="CUSOFFFENT730Type">
<xs:annotation>
<xs:documentation>
<doc:description value="(FIRST ENTRY) CUSTOMS OFFICE" />
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="RefNumCUSOFFFENT731" type="simple:CORefNumType">
<xs:annotation>
<xs:documentation>
<doc:description value="Reference number" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ExpDatOfArrFIRENT733" type="simple:DateTimeType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Expected date and time of arrival" />
<doc:rule name="R134" />
<doc:rule name="R660" />
<doc:rule name="R666" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<!--===== (ENTRY CARRIER) TRADER =====-->
<xs:complexType name="TRACARENT601Type">
<xs:annotation>
<xs:documentation>
<doc:description value="(ENTRY CARRIER) TRADER" />
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="NamTRACARENT604" type="simple:TradNameType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Name" />
<doc:condition name="C501" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="StrNumTRACARENT607" type="simple:StreetNumType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Street and number" />
<doc:condition name="C501" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PstCodTRACARENT606" type="simple:PostalCodeType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Postal code" />
<doc:condition name="C501" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CtyTRACARENT603" type="simple:CityType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="City" />
<doc:condition name="C501" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CouCodTRACARENT605" type="simple:CountryCodeType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="Country code" />
<doc:condition name="C501" />
<doc:codeList name="CountryCodesFullList" type="business" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TRACARENT601LNG" type="simple:LanguageCodeType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<doc:description value="NAD LNG" />
<doc:rule name="TR0099" />
<doc:codeList name="LanguageCodes" type="business" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TINTRACARENT602" type="simple:TINType">
<xs:annotation>
<xs:documentation>
<doc:description value="TIN" />
<doc:rule name="R837" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:doc="http://ics.dgtaxud.ec/doc" targetNamespace="http://ics.dgtaxud.ec/doc" version="10.0" id="doc" elementFormDefault="unqualified" attributeFormDefault="unqualified">
<xs:element name="description">
<xs:complexType>
<xs:attribute use="required" name="value" type="xs:token"/>
</xs:complexType>
</xs:element>
<xs:element name="rule">
<xs:complexType>
<xs:attribute use="required" name="name" type="xs:token"/>
</xs:complexType>
</xs:element>
<xs:element name="condition">
<xs:complexType>
<xs:attribute use="required" name="name" type="xs:token"/>
</xs:complexType>
</xs:element>
<xs:element name="codeList">
<xs:complexType>
<xs:attribute use="required" name="name" type="xs:token"/>
<xs:attribute default="technical" name="type" type="xs:token"/>
</xs:complexType>
</xs:element>
</xs:schema>

View File

@@ -0,0 +1,662 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:simple="http://ics.dgtaxud.ec/simple" targetNamespace="http://ics.dgtaxud.ec/simple" version="10.0" id="simple_types" elementFormDefault="unqualified" attributeFormDefault="unqualified">
<xs:simpleType name="AlphaCapital1Type">
<xs:restriction base="simple:AlphaCapitalType">
<xs:length value="1"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="AlphaCapital2Type">
<xs:restriction base="simple:AlphaCapitalType">
<xs:length value="2"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="AlphaCapital3Type">
<xs:restriction base="simple:AlphaCapitalType">
<xs:length value="3"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="AlphaCapital4Type">
<xs:restriction base="simple:AlphaCapitalType">
<xs:length value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="AlphaCapitalMax3Type">
<xs:restriction base="simple:AlphaCapitalType">
<xs:maxLength value="3"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="AlphaCapitalType">
<xs:restriction base="simple:AlphaType">
<xs:pattern value="[A-Z]*"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="AlphaNumType">
<xs:annotation>
<xs:documentation>Base class for all anN and an..N types</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token"/>
</xs:simpleType>
<xs:simpleType name="AlphaType">
<xs:annotation>
<xs:documentation>Base class for all aN and a..N
types</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token"/>
</xs:simpleType>
<xs:simpleType name="Alpha_1">
<xs:restriction base="simple:AlphaType">
<xs:length value="1"/>
<xs:pattern value="[a-zA-Z]"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Alpha_2">
<xs:restriction base="simple:AlphaType">
<xs:length value="2"/>
<xs:pattern value="[a-zA-Z]{2}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Alpha_3">
<xs:restriction base="simple:AlphaType">
<xs:length value="3"/>
<xs:pattern value="[a-zA-Z]{3}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Alpha_4">
<xs:restriction base="simple:AlphaType">
<xs:length value="4"/>
<xs:pattern value="[a-zA-Z]{4}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Alpha_Max8">
<xs:restriction base="simple:AlphaType">
<xs:maxLength value="8"/>
<xs:pattern value="[a-zA-Z]{1,8}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="AlphanumericCapital1Type">
<xs:restriction base="simple:AlphanumericCapitalType">
<xs:length value="1"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="AlphanumericCapital2Type">
<xs:restriction base="simple:AlphanumericCapitalType">
<xs:length value="2"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="AlphanumericCapital3Type">
<xs:restriction base="simple:AlphanumericCapitalType">
<xs:length value="3"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="AlphanumericCapital5Type">
<xs:restriction base="simple:AlphanumericCapitalType">
<xs:length value="5"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="AlphanumericCapitalMax2Type">
<xs:restriction base="simple:AlphanumericCapitalType">
<xs:maxLength value="2"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="AlphanumericCapitalMax3Type">
<xs:restriction base="simple:AlphanumericCapitalType">
<xs:maxLength value="3"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="AlphanumericCapitalMax4Type">
<xs:restriction base="simple:AlphanumericCapitalType">
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="AlphanumericCapitalMax5Type">
<xs:restriction base="simple:AlphanumericCapitalType">
<xs:maxLength value="5"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="AlphanumericCapitalMax6Type">
<xs:restriction base="simple:AlphanumericCapitalType">
<xs:maxLength value="6"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="AlphanumericCapitalMax9Type">
<xs:restriction base="simple:AlphanumericCapitalType">
<xs:maxLength value="9"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="AlphanumericCapitalType">
<xs:restriction base="simple:AlphaNumType">
<xs:pattern value="[A-Z0-9]*"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="AlphanumericCapitalTypeOfDeclaration">
<xs:restriction base="simple:AlphanumericCapitalMax9Type">
<xs:pattern value="[A-Z0-9]*"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="AlphanumericSpecMax35Type">
<xs:restriction base="simple:AlphaNumType">
<xs:maxLength value="35"/>
<xs:pattern value="[a-zA-Z]{2}.{1,33}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Alphanumeric_1">
<xs:restriction base="simple:AlphaNumType">
<xs:length value="1"/>
<xs:pattern value=".{1}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Alphanumeric_2">
<xs:restriction base="simple:AlphaNumType">
<xs:length value="2"/>
<xs:pattern value=".{2}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Alphanumeric_3">
<xs:restriction base="simple:AlphaNumType">
<xs:length value="3"/>
<xs:pattern value=".{3}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Alphanumeric_4">
<xs:restriction base="simple:AlphaNumType">
<xs:length value="4"/>
<xs:pattern value=".{4}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Alphanumeric_5">
<xs:restriction base="simple:AlphaNumType">
<xs:length value="5"/>
<xs:pattern value=".{5}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Alphanumeric_8">
<xs:restriction base="simple:AlphaNumType">
<xs:length value="8"/>
<xs:pattern value=".{8}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Alphanumeric_Capital_5">
<xs:restriction base="simple:AlphanumericCapitalType">
<xs:length value="5"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Alphanumeric_Max14">
<xs:restriction base="simple:AlphaNumType">
<xs:maxLength value="14"/>
<xs:pattern value=".{1,14}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Alphanumeric_Max140">
<xs:restriction base="simple:AlphaNumType">
<xs:maxLength value="140"/>
<xs:pattern value=".{1,140}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Alphanumeric_Max15">
<xs:restriction base="simple:AlphaNumType">
<xs:maxLength value="15"/>
<xs:pattern value=".{1,15}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Alphanumeric_Max17">
<xs:restriction base="simple:AlphaNumType">
<xs:maxLength value="17"/>
<xs:pattern value=".{1,17}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Alphanumeric_Max175">
<xs:restriction base="simple:AlphaNumType">
<xs:maxLength value="175"/>
<xs:pattern value=".{1,175}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Alphanumeric_Max2">
<xs:restriction base="simple:AlphaNumType">
<xs:maxLength value="2"/>
<xs:pattern value=".{1,2}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Alphanumeric_Max20">
<xs:restriction base="simple:AlphaNumType">
<xs:maxLength value="20"/>
<xs:pattern value=".{1,20}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Alphanumeric_Max21">
<xs:restriction base="simple:AlphaNumType">
<xs:maxLength value="21"/>
<xs:pattern value=".{1,21}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Alphanumeric_Max210">
<xs:restriction base="simple:AlphaNumType">
<xs:maxLength value="210"/>
<xs:pattern value=".{1,210}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Alphanumeric_Max22">
<xs:restriction base="simple:AlphaNumType">
<xs:maxLength value="22"/>
<xs:pattern value=".{1,22}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Alphanumeric_Max27">
<xs:restriction base="simple:AlphaNumType">
<xs:maxLength value="27"/>
<xs:pattern value=".{1,27}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Alphanumeric_Max280">
<xs:restriction base="simple:AlphaNumType">
<xs:maxLength value="280"/>
<xs:pattern value=".{1,280}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Alphanumeric_Max29">
<xs:restriction base="simple:AlphaNumType">
<xs:maxLength value="29"/>
<xs:pattern value=".{1,29}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Alphanumeric_Max3">
<xs:restriction base="simple:AlphaNumType">
<xs:maxLength value="3"/>
<xs:pattern value=".{1,3}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Alphanumeric_Max35">
<xs:restriction base="simple:AlphaNumType">
<xs:maxLength value="35"/>
<xs:pattern value=".{1,35}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Alphanumeric_Max350">
<xs:restriction base="simple:AlphaNumType">
<xs:maxLength value="350"/>
<xs:pattern value=".{1,350}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Alphanumeric_Max4">
<xs:restriction base="simple:AlphaNumType">
<xs:maxLength value="4"/>
<xs:pattern value=".{1,4}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Alphanumeric_Max42">
<xs:restriction base="simple:AlphaNumType">
<xs:maxLength value="42"/>
<xs:pattern value=".{1,42}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Alphanumeric_Max5">
<xs:restriction base="simple:AlphaNumType">
<xs:maxLength value="5"/>
<xs:pattern value=".{1,5}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Alphanumeric_Max6">
<xs:restriction base="simple:AlphaNumType">
<xs:maxLength value="6"/>
<xs:pattern value=".{1,6}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Alphanumeric_Max70">
<xs:restriction base="simple:AlphaNumType">
<xs:maxLength value="70"/>
<xs:pattern value=".{1,70}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Alphanumeric_Max8">
<xs:restriction base="simple:AlphaNumType">
<xs:maxLength value="8"/>
<xs:pattern value=".{1,8}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="CORefNumType">
<xs:annotation>
<xs:documentation>Customs Office Reference Number
(format:an8)</xs:documentation>
</xs:annotation>
<xs:restriction base="simple:AlphaNumType">
<xs:length value="8"/>
<xs:pattern value="[a-zA-Z]{2}[a-zA-Z0-9]{6}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="CityType">
<xs:annotation>
<xs:documentation>Trader City (format:
an..35)</xs:documentation>
</xs:annotation>
<xs:restriction base="simple:AlphaNumType">
<xs:maxLength value="35"/>
<xs:pattern value=".{1,35}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="CommodityCodeType">
<xs:restriction base="simple:AlphaNumType">
<xs:pattern value="[0-9]{1,8}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="CountryCodeType">
<xs:annotation>
<xs:documentation>Country Code (format:a2)</xs:documentation>
</xs:annotation>
<xs:restriction base="simple:AlphaType">
<xs:length value="2"/>
<xs:pattern value="[A-Z]{2}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="DatePrepType">
<xs:annotation>
<xs:documentation>Date type (format
YYMMDD)</xs:documentation>
</xs:annotation>
<xs:restriction base="simple:NumType">
<xs:length value="6"/>
<xs:pattern value="[0-9]{2}(([0][1|3|5|7|8])([0][1-9]|[1-2][0-9]|[3][0-1])|([0][4|6|9])([0][1-9]|[1-2][0-9]|[3][0])|([0][2])([0][1-9]|[1-2][0-9])|([1][0|2])([0][1-9]|[1-2][0-9]|[3][0-1])|([1][1])([0][1-9]|[1-2][0-9]|[3][0]))"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="DateTimeType">
<xs:annotation>
<xs:documentation>Date and Time with precision of minute
(format
YYYYMMDDHHMM)</xs:documentation>
</xs:annotation>
<xs:restriction base="simple:AlphaNumType">
<xs:length value="12"/>
<xs:pattern value="[1-9][0-9][0-9][0-9](([0][1|3|5|7|8])([0][1-9]|[1-2][0-9]|[3][0-1])|([0][4|6|9])([0][1-9]|[1-2][0-9]|[3][0])|([0][2])([0][1-9]|[1-2][0-9])|([1][0|2])([0][1-9]|[1-2][0-9]|[3][0-1])|([1][1])([0][1-9]|[1-2][0-9]|[3][0]))(([2][0-3]|[0][0-9]|[1][0-9])([0-5][0-9]))"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="DateType">
<xs:annotation>
<xs:documentation>Date type (format
YYYYMMDD)</xs:documentation>
</xs:annotation>
<xs:restriction base="simple:NumType">
<xs:length value="8"/>
<xs:pattern value="[1-9][0-9]{3}(([0][1|3|5|7|8])([0][1-9]|[1-2][0-9]|[3][0-1])|([0][4|6|9])([0][1-9]|[1-2][0-9]|[3][0])|([0][2])([0][1-9]|[1-2][0-9])|([1][0|2])([0][1-9]|[1-2][0-9]|[3][0-1])|([1][1])([0][1-9]|[1-2][0-9]|[3][0]))"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="DateTypeExtended">
<xs:annotation>
<xs:documentation>Date type (format
YYYYMMDDHHMNSS)</xs:documentation>
</xs:annotation>
<xs:restriction base="simple:AlphaNumType">
<xs:length value="14"/>
<xs:pattern value="[1-9][0-9][0-9]{2}(([0][1|3|5|7|8])([0][1-9]|[1-2][0-9]|[3][0-1])|([0][4|6|9])([0][1-9]|[1-2][0-9]|[3][0])|([0][2])([0][1-9]|[1-2][0-9])|([1][0|2])([0][1-9]|[1-2][0-9]|[3][0-1])|([1][1])([0][1-9]|[1-2][0-9]|[3][0]))([2][0-3]|[0][0-9]|[1][0-9])([0-5][0-9])(0-5)(0-9)(0-5)(0-9)"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="DayInTheMonthType">
<xs:annotation>
<xs:documentation>Day in the Month (format:
DD)</xs:documentation>
</xs:annotation>
<xs:restriction base="simple:NumType">
<xs:length value="2"/>
<xs:pattern value="[0][1-9]|[1-2][0-9]|[3][0-1]"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="DecType">
<xs:annotation>
<xs:documentation>Base class for all n..N,M
types</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:decimal"/>
</xs:simpleType>
<xs:simpleType name="Decimal_11_3">
<xs:restriction base="simple:DecType">
<xs:totalDigits value="11"/>
<xs:fractionDigits value="3"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Decimal_15_2">
<xs:restriction base="simple:DecType">
<xs:totalDigits value="15"/>
<xs:fractionDigits value="2"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Decimal_6_5">
<xs:restriction base="simple:DecType">
<xs:totalDigits value="6"/>
<xs:fractionDigits value="5"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Decimal_8_6">
<xs:restriction base="simple:DecType">
<xs:totalDigits value="8"/>
<xs:fractionDigits value="6"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="DeclarationRequestNumberType">
<xs:annotation>
<xs:documentation>Declaration request number (format:
an..22)</xs:documentation>
</xs:annotation>
<xs:restriction base="simple:AlphaNumType">
<xs:maxLength value="22"/>
<xs:pattern value="[a-zA-Z]{2}.{1,20}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="GRNType">
<xs:annotation>
<xs:documentation>GRN (format: an..24), (alias:GuaRefNumGRNREF21)</xs:documentation>
</xs:annotation>
<xs:restriction base="simple:AlphanumericCapitalType">
<xs:pattern value="[0-9]{2}[A-Z]{2}[A-Z0-9]{12}.{1,8}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="LanguageCodeType">
<xs:annotation>
<xs:documentation>Language Code (format: a2)</xs:documentation>
</xs:annotation>
<xs:restriction base="simple:AlphaType">
<xs:length value="2"/>
<xs:pattern value="[a-zA-Z]{2}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="MRNType">
<xs:annotation>
<xs:documentation>MRN (format: an..21), (alias: DocNumHEA5Type)</xs:documentation>
</xs:annotation>
<xs:restriction base="simple:AlphaNumType">
<xs:pattern value="[0-9]{2}[A-Z]{2}[A-Z0-9]{13}[0-9]"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="NumType">
<xs:annotation>
<xs:documentation>Base class for all nN and n..N
types</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token"/>
</xs:simpleType>
<xs:simpleType name="Numeric2">
<xs:restriction base="simple:NumType">
<xs:length value="2"/>
<xs:pattern value="[0-9]{2}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Numeric2Max">
<xs:restriction base="simple:NumType">
<xs:maxLength value="8"/>
<xs:pattern value="[0-9]{1,2}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Numeric3">
<xs:restriction base="simple:NumType">
<xs:length value="3"/>
<xs:pattern value="[0-9]{3}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Numeric4">
<xs:restriction base="simple:NumType">
<xs:length value="4"/>
<xs:pattern value="[0-9]{4}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Numeric6Max">
<xs:restriction base="simple:NumType">
<xs:maxLength value="8"/>
<xs:pattern value="[0-9]{1,6}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Numeric8Max">
<xs:restriction base="simple:NumType">
<xs:maxLength value="8"/>
<xs:pattern value="[0-9]{1,8}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="NumericMin4Max8">
<xs:restriction base="simple:NumType">
<xs:pattern value="[0-9]{4,8}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="NumericMin4Max8Type">
<xs:restriction base="simple:NumType">
<xs:pattern value="[0-9]{4,8}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Numeric_1">
<xs:restriction base="simple:NumType">
<xs:length value="1"/>
<xs:pattern value="[0-9]"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Numeric_2">
<xs:restriction base="simple:NumType">
<xs:length value="2"/>
<xs:pattern value="[0-9]{2}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Numeric_3">
<xs:restriction base="simple:NumType">
<xs:length value="3"/>
<xs:pattern value="[0-9]{3}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Numeric_4">
<xs:restriction base="simple:NumType">
<xs:length value="4"/>
<xs:pattern value="[0-9]{4}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Numeric_Max11">
<xs:restriction base="simple:NumType">
<xs:maxLength value="11"/>
<xs:pattern value="[0-9]{1,11}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Numeric_Max2">
<xs:restriction base="simple:NumType">
<xs:maxLength value="2"/>
<xs:pattern value="[0-9]{1,2}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Numeric_Max3">
<xs:restriction base="simple:NumType">
<xs:maxLength value="3"/>
<xs:pattern value="[0-9]{1,3}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Numeric_Max4">
<xs:restriction base="simple:NumType">
<xs:maxLength value="4"/>
<xs:pattern value="[0-9]{1,4}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Numeric_Max5">
<xs:restriction base="simple:NumType">
<xs:maxLength value="5"/>
<xs:pattern value="[0-9]{1,5}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Numeric_Max6">
<xs:restriction base="simple:NumType">
<xs:maxLength value="6"/>
<xs:pattern value="[0-9]{1,6}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Numeric_Max7">
<xs:restriction base="simple:NumType">
<xs:maxLength value="7"/>
<xs:pattern value="[0-9]{1,7}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Numeric_Max9">
<xs:restriction base="simple:NumType">
<xs:maxLength value="9"/>
<xs:pattern value="[0-9]{1,9}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="PostalCodeType">
<xs:annotation>
<xs:documentation>Trader Postal Code (format:
n..9)</xs:documentation>
</xs:annotation>
<xs:restriction base="simple:AlphaNumType">
<xs:maxLength value="9"/>
<xs:pattern value=".{1,9}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="StreetNumType">
<xs:annotation>
<xs:documentation>Trader Street and Number (format:
an..35)</xs:documentation>
</xs:annotation>
<xs:restriction base="simple:AlphaNumType">
<xs:maxLength value="35"/>
<xs:pattern value=".{1,35}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="StringLatin1">
<xs:restriction base="xs:string">
<xs:pattern value="\p{IsBasicLatin}+"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="TINType">
<xs:annotation>
<xs:documentation>Trader Identification Number (format:
an..17)</xs:documentation>
</xs:annotation>
<xs:restriction base="simple:StringLatin1">
<xs:minLength value="3"/>
<xs:maxLength value="17"/>
<xs:pattern value="[A-Z]{2}[^\n\r]*"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="TaricCodeType">
<xs:annotation>
<xs:documentation>Taric Code (format:
an..6)</xs:documentation>
</xs:annotation>
<xs:restriction base="simple:AlphaNumType">
<xs:pattern value="[0-9]{1,6}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="TimeType">
<xs:annotation>
<xs:documentation>Time with precision of minute (format
HHMM)</xs:documentation>
</xs:annotation>
<xs:restriction base="simple:NumType">
<xs:length value="4"/>
<xs:pattern value="([2][0-3]|[0][0-9]|[1][0-9])([0-5][0-9])"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="TradNameType">
<xs:annotation>
<xs:documentation>Trader Name (format:
an..35)</xs:documentation>
</xs:annotation>
<xs:restriction base="simple:AlphaNumType">
<xs:maxLength value="35"/>
<xs:pattern value=".{1,35}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="emailAddressType">
<xs:restriction base="simple:StringLatin1">
<xs:maxLength value="70"/>
<xs:pattern value="[^@]+@[^\.]+\..+"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:simple="http://ics.dgtaxud.ec/simple_ics" targetNamespace="http://ics.dgtaxud.ec/simple_ics" version="10.0" id="simple_types_ics" elementFormDefault="unqualified" attributeFormDefault="unqualified"/>

View File

@@ -0,0 +1,769 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tcl="http://ics.dgtaxud.ec/tcl" targetNamespace="http://ics.dgtaxud.ec/tcl" version="10.0" id="tcl" elementFormDefault="unqualified" attributeFormDefault="unqualified">
<xs:simpleType name="BusinessFunctionalityCode">
<xs:annotation>
<xs:documentation>[Format: a1]</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="H">
<xs:annotation>
<xs:documentation>Reference Data</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="U">
<xs:annotation>
<xs:documentation>Entry Processing</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="V">
<xs:annotation>
<xs:documentation>Lodgement</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="W">
<xs:annotation>
<xs:documentation>ALL FUNCTIONALITY</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="CountryCodesCustomsOfficeLists">
<xs:annotation>
<xs:documentation>All the countries included in code list 9 excluding AX, GF, GP, LI, MC, MQ, RE, SJ and YT. The same codelist values are used for all Domains (ECS/NCTS/ICS) in order to support the COL. Values are shown for illustration only. [Format: a2]</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="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="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:restriction>
</xs:simpleType>
<xs:simpleType name="DayInTheWeek">
<xs:annotation>
<xs:documentation>[Format: n1]</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="1">
<xs:annotation>
<xs:documentation>Monday</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="2">
<xs:annotation>
<xs:documentation>Tuesday</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="3">
<xs:annotation>
<xs:documentation>Wednesday</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="4">
<xs:annotation>
<xs:documentation>Thursday</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="5">
<xs:annotation>
<xs:documentation>Friday</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="6">
<xs:annotation>
<xs:documentation>Saturday</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="7">
<xs:annotation>
<xs:documentation>Sunday</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="EoriAeoErrorCode">
<xs:annotation>
<xs:documentation>It is an alphanumerical up to 50 characters string (i.e. an..50) that is used to define in an acknowledgement notification message the error code(s). [Format: an..50]</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="GEN-CORR">
<xs:annotation>
<xs:documentation>Non XML message received</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="GEN-INVALID-BYTE-SEQUENCE">
<xs:annotation>
<xs:documentation>Invalid byte sequence: a byte sequence does not represent a valid character in the character encoding scheme (UTF-8).</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="GEN-WRONG-ENVID">
<xs:annotation>
<xs:documentation>Envelope Id and/or Originator Reference are missing</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="FunctionalErrorCodes">
<xs:annotation>
<xs:documentation>- Subset of the UN/EDIFACT generic error table. - For remarks on the codes : see DDNTA Sec. VII. [Format: n2]</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="12">
<xs:annotation>
<xs:documentation>Incorrect (code) value</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="13">
<xs:annotation>
<xs:documentation>Missing</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="14">
<xs:annotation>
<xs:documentation>Value not supported in this position (code value constraint)</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="19">
<xs:annotation>
<xs:documentation>Invalid decimal notation</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="26">
<xs:annotation>
<xs:documentation>Duplicate detected</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="37">
<xs:annotation>
<xs:documentation>Invalid type characters</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="38">
<xs:annotation>
<xs:documentation>Missing digit in front of decimal sign</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="90">
<xs:annotation>
<xs:documentation>Unknown MRN</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="91">
<xs:annotation>
<xs:documentation>Duplicate 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:simpleType name="XmlErrorCodes">
<xs:annotation>
<xs:documentation>Defines the codes to be used for reporting errors on XML messages. [Format: n2]</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="19">
<xs:annotation>
<xs:documentation>Invalid decimal notation</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>
<xs:simpleType name="PrefixSuffixLevel">
<xs:annotation>
<xs:documentation>Used for CUSTOMS OFFICE LSD. [Format: an1]</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="A">
<xs:annotation>
<xs:documentation>Simple office (see box A in Customs Office List)</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="E">
<xs:annotation>
<xs:documentation>Higher authority (see box E in Customs Office List)</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="SystemUnavailabilityType">
<xs:annotation>
<xs:documentation>Used for the attribute SYSTEM UNAVAILABILITY.System Unavailability Type. [Format: a1]</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>
<xs:simpleType name="Flag">
<xs:annotation>
<xs:documentation>Used for attributes that can have a positive or a negative value. [Format: n1]</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>
<xs:simpleType name="MonthOfYear">
<xs:annotation>
<xs:documentation>[Format: an2]</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>
<xs:simpleType name="MessageTypes">
<xs:annotation>
<xs:documentation>Used for attribute MESSAGE ERRORS.Association assigned code and MESSAGE.Message Type. The usage of each code in one of the UNSM templates is defined in the Remarks column. CC should in all cases be instantiated to the value of the particular domain in which the message is created. [Format: an..6] [Format: an..6]</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="CC304A">
<xs:annotation>
<xs:documentation>Entry Summary Declaration Amendment Accepted</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC305A">
<xs:annotation>
<xs:documentation>Entry Summary Declaration Amendment Rejection</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC313A">
<xs:annotation>
<xs:documentation>Entry Summary Declaration Amendment</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC315A">
<xs:annotation>
<xs:documentation>Entry Summary Declaration</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC316A">
<xs:annotation>
<xs:documentation>Entry Summary Declaration Rejected</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC323A">
<xs:annotation>
<xs:documentation>Diversion Request Import</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC324A">
<xs:annotation>
<xs:documentation>Diversion Request Rejected</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC325A">
<xs:annotation>
<xs:documentation>Diversion Request Acknowledgement</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC328A">
<xs:annotation>
<xs:documentation>Entry Summary Request Acknowledgement</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CC351A">
<xs:annotation>
<xs:documentation>Advanced Intervention Notification</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD030C">
<xs:annotation>
<xs:documentation>Notification of customs offices modification to common domain</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD031C">
<xs:annotation>
<xs:documentation>Notification of customs offices modification to national domain</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD032C">
<xs:annotation>
<xs:documentation>Notification of common reference data modification to ND</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD070B">
<xs:annotation>
<xs:documentation>Notification of System Unavailability to CD</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD071B">
<xs:annotation>
<xs:documentation>Notification of System Unavailability to ND</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD301A">
<xs:annotation>
<xs:documentation>ENS</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD302A">
<xs:annotation>
<xs:documentation>Declaration Request Import</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD303A">
<xs:annotation>
<xs:documentation>Entry Summary Declaration Response</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD319A">
<xs:annotation>
<xs:documentation>Transmission to subsequent Office of Entry</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD411C">
<xs:annotation>
<xs:documentation>Sending of statistics data</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD412C">
<xs:annotation>
<xs:documentation>Statistics generated sent to national domain</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD906B">
<xs:annotation>
<xs:documentation>Functional NACK</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD912B">
<xs:annotation>
<xs:documentation>Availability Matrix</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD913B">
<xs:annotation>
<xs:documentation>Upload parsing response</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD914B">
<xs:annotation>
<xs:documentation>COL request</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD916B">
<xs:annotation>
<xs:documentation>Common RD Request</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD917B">
<xs:annotation>
<xs:documentation>XML NACK</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD931C">
<xs:annotation>
<xs:documentation>COL DATA</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD932C">
<xs:annotation>
<xs:documentation>Common RD Data</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="CD971B">
<xs:annotation>
<xs:documentation>Full Unavailability Schedule</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ModificationType">
<xs:annotation>
<xs:documentation>Used for (multiple) attribute Operation. [Format: a1]</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>
<xs:simpleType name="CustomSystem">
<xs:annotation>
<xs:documentation>Custom System applicable domain [Format: n..2]</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="1">
<xs:annotation>
<xs:documentation>NCTS</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="2">
<xs:annotation>
<xs:documentation>ECS</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="3">
<xs:annotation>
<xs:documentation>ICS</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="4">
<xs:annotation>
<xs:documentation>EOS</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:schema>

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tcl="http://ics.dgtaxud.ec/tcl_ics" targetNamespace="http://ics.dgtaxud.ec/tcl_ics" version="10.0" id="tcl_ics" elementFormDefault="unqualified" attributeFormDefault="unqualified"/>

View File

@@ -0,0 +1,430 @@
'' ------------------------------------------------------------------------------
'' <auto-generated>
'' Generated by Xsd2Code++. Version 6.0.0.0. www.xsd2code.com
'' {"TargetFramework":"Net48","NameSpace":"SuccessResponse_v2_0","Language":"VisualBasic","Properties":{},"XmlAttribute":{"Enabled":true},"ClassParams":{},"Serialization":{"ShouldSerialize":{},"AdditionalSerializers":{},"XmlSerializerEvent":{},"XmlOutput":{"Formating":true},"JsonOutput":{},"Enabled":true},"Miscellaneous":{}}
'' </auto-generated>
'' ------------------------------------------------------------------------------
#Disable Warning
Imports System
Imports System.Diagnostics
Imports System.Xml.Serialization
Imports System.Runtime.Serialization
Imports System.Collections
Imports System.Xml.Schema
Imports System.ComponentModel
Imports System.Xml
Imports System.IO
Imports System.Text
Imports System.Collections.Generic
Namespace SuccessResponse_v2_0
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
System.Serializable,
DebuggerStepThrough,
DesignerCategoryAttribute("code"),
XmlType(AnonymousType:=True, [Namespace]:="http://www.hmrc.gov.uk/successresponse/2"),
XmlRoot([Namespace]:="http://www.hmrc.gov.uk/successresponse/2", IsNullable:=False)>
Partial Public Class SuccessResponse
#Region "Private fields"
Private _message As List(Of MessageType)
Private _acceptedTime As Date
Private _responseData As System.Xml.XmlElement
Private Shared _serializerXml As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._message = New List(Of MessageType)()
End Sub
<XmlElement("Message")>
Public Property Message() As List(Of MessageType)
Get
Return Me._message
End Get
Set
Me._message = Value
End Set
End Property
Public Property AcceptedTime() As Date
Get
Return Me._acceptedTime
End Get
Set
Me._acceptedTime = Value
End Set
End Property
Public Property ResponseData() As System.Xml.XmlElement
Get
Return Me._responseData
End Get
Set
Me._responseData = Value
End Set
End Property
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
Get
If (_serializerXml Is Nothing) Then
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(SuccessResponse))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
''' <summary>
''' Serialize SuccessResponse object
''' </summary>
''' <returns>XML value</returns>
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
xmlWriterSettings.Indent = True
xmlWriterSettings.IndentChars = " "
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
''' <summary>
''' Deserializes SuccessResponse object
''' </summary>
''' <param name="input">string to deserialize</param>
''' <param name="obj">Output SuccessResponse object</param>
''' <param name="exception">output Exception value if deserialize failed</param>
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SuccessResponse, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, SuccessResponse)
Try
obj = Deserialize(input)
Return True
Catch ex As System.Exception
exception = ex
Return False
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SuccessResponse) As Boolean
Dim exception As System.Exception = Nothing
Return Deserialize(input, obj, exception)
End Function
Public Overloads Shared Function Deserialize(ByVal input As String) As SuccessResponse
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), SuccessResponse)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As Stream) As SuccessResponse
Return CType(SerializerXml.Deserialize(s), SuccessResponse)
End Function
#End Region
''' <summary>
''' Serializes current SuccessResponse object into file
''' </summary>
''' <param name="fileName">full path of outupt xml file</param>
''' <param name="exception">output Exception value if failed</param>
''' <returns>true if can serialize and save into file; otherwise, false</returns>
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
exception = Nothing
Try
SaveToFile(fileName)
Return True
Catch e As System.Exception
exception = e
Return False
End Try
End Function
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
Dim streamWriter As StreamWriter = Nothing
Try
Dim dataString As String = Serialize()
Dim outputFile As FileInfo = New FileInfo(fileName)
streamWriter = outputFile.CreateText
streamWriter.WriteLine(dataString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
''' <summary>
''' Deserializes xml markup from file into an SuccessResponse object
''' </summary>
''' <param name="fileName">File to load and deserialize</param>
''' <param name="obj">Output SuccessResponse object</param>
''' <param name="exception">output Exception value if deserialize failed</param>
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SuccessResponse, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, SuccessResponse)
Try
obj = LoadFromFile(fileName)
Return True
Catch ex As System.Exception
exception = ex
Return False
End Try
End Function
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SuccessResponse) As Boolean
Dim exception As System.Exception = Nothing
Return LoadFromFile(fileName, obj, exception)
End Function
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As SuccessResponse
Dim file As FileStream = Nothing
Dim sr As StreamReader = Nothing
Try
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New StreamReader(file)
Dim dataString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(dataString)
Finally
If (Not (file) Is Nothing) Then
file.Dispose()
End If
If (Not (sr) Is Nothing) Then
sr.Dispose()
End If
End Try
End Function
End Class
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
System.Serializable,
DebuggerStepThrough,
DesignerCategoryAttribute("code"),
XmlType([Namespace]:="http://www.hmrc.gov.uk/successresponse/2")>
Partial Public Class MessageType
#Region "Private fields"
Private _code As String
Private _lang As String
Private _value As String
Private Shared _serializerXml As XmlSerializer
#End Region
<XmlAttribute(DataType:="integer")>
Public Property code() As String
Get
Return Me._code
End Get
Set
Me._code = Value
End Set
End Property
<XmlAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, [Namespace]:="http://www.w3.org/XML/1998/namespace")>
Public Property lang() As String
Get
Return Me._lang
End Get
Set
Me._lang = Value
End Set
End Property
<XmlText>
Public Property Value() As String
Get
Return Me._value
End Get
Set
Me._value = Value
End Set
End Property
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
Get
If (_serializerXml Is Nothing) Then
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(MessageType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
''' <summary>
''' Serialize MessageType object
''' </summary>
''' <returns>XML value</returns>
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
xmlWriterSettings.Indent = True
xmlWriterSettings.IndentChars = " "
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
''' <summary>
''' Deserializes MessageType object
''' </summary>
''' <param name="input">string to deserialize</param>
''' <param name="obj">Output MessageType object</param>
''' <param name="exception">output Exception value if deserialize failed</param>
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As MessageType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, MessageType)
Try
obj = Deserialize(input)
Return True
Catch ex As System.Exception
exception = ex
Return False
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As MessageType) As Boolean
Dim exception As System.Exception = Nothing
Return Deserialize(input, obj, exception)
End Function
Public Overloads Shared Function Deserialize(ByVal input As String) As MessageType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), MessageType)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As Stream) As MessageType
Return CType(SerializerXml.Deserialize(s), MessageType)
End Function
#End Region
''' <summary>
''' Serializes current MessageType object into file
''' </summary>
''' <param name="fileName">full path of outupt xml file</param>
''' <param name="exception">output Exception value if failed</param>
''' <returns>true if can serialize and save into file; otherwise, false</returns>
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
exception = Nothing
Try
SaveToFile(fileName)
Return True
Catch e As System.Exception
exception = e
Return False
End Try
End Function
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
Dim streamWriter As StreamWriter = Nothing
Try
Dim dataString As String = Serialize()
Dim outputFile As FileInfo = New FileInfo(fileName)
streamWriter = outputFile.CreateText
streamWriter.WriteLine(dataString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
''' <summary>
''' Deserializes xml markup from file into an MessageType object
''' </summary>
''' <param name="fileName">File to load and deserialize</param>
''' <param name="obj">Output MessageType object</param>
''' <param name="exception">output Exception value if deserialize failed</param>
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As MessageType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, MessageType)
Try
obj = LoadFromFile(fileName)
Return True
Catch ex As System.Exception
exception = ex
Return False
End Try
End Function
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As MessageType) As Boolean
Dim exception As System.Exception = Nothing
Return LoadFromFile(fileName, obj, exception)
End Function
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As MessageType
Dim file As FileStream = Nothing
Dim sr As StreamReader = Nothing
Try
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New StreamReader(file)
Dim dataString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(dataString)
Finally
If (Not (file) Is Nothing) Then
file.Dispose()
End If
If (Not (sr) Is Nothing) Then
sr.Dispose()
End If
End Try
End Function
End Class
End Namespace
#Enable Warning

View File

@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema attributeFormDefault="unqualified"
elementFormDefault="qualified" id="SuccessResponse"
targetNamespace="http://www.hmrc.gov.uk/successresponse/2"
version="2.0" xmlns="http://www.hmrc.gov.uk/successresponse/2"
xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema.xsd"/>
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
<xsd:element name="SuccessResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="0"
name="Message" type="MessageType">
<xsd:annotation>
<xsd:documentation>
Service-specific advisory text messages (if
any). It is possible for more than one
message to be returned per response. Each
message must be presented to the user.
Service-specific message codes are carried
in the &quot;code&quot; attribute (see
Service-specific documentation for details). </xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element minOccurs="0" name="AcceptedTime" type="xsd:dateTime">
<xsd:annotation>
<xsd:documentation>Placeholder for future use. </xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element minOccurs="0" name="ResponseData">
<xsd:annotation>
<xsd:documentation> Container for
service-specific response data if any (e.g.
MSD returned payment reference). See
additional service-specific response data
Schema (if any) and documentation for
details. </xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:any namespace="##other" processContents="lax"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="MessageType">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="code" type="xsd:integer" use="required"/>
<xsd:attribute default="en-GB" ref="xml:lang" use="optional"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:schema>

View File

@@ -0,0 +1,667 @@
'' ------------------------------------------------------------------------------
'' <auto-generated>
'' Generated by Xsd2Code++. Version 6.0.0.0. www.xsd2code.com
'' {"TargetFramework":"Net48","NameSpace":"errorresponse_v2_0","Language":"VisualBasic","Properties":{},"XmlAttribute":{"Enabled":true},"ClassParams":{},"Serialization":{"ShouldSerialize":{},"AdditionalSerializers":{},"XmlSerializerEvent":{},"XmlOutput":{"Formating":true},"JsonOutput":{},"Enabled":true},"Miscellaneous":{}}
'' </auto-generated>
'' ------------------------------------------------------------------------------
#Disable Warning
Imports System
Imports System.Diagnostics
Imports System.Xml.Serialization
Imports System.Runtime.Serialization
Imports System.Collections
Imports System.Xml.Schema
Imports System.ComponentModel
Imports System.Xml
Imports System.IO
Imports System.Text
Imports System.Collections.Generic
Namespace errorresponse_v2_0
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
System.Serializable,
DebuggerStepThrough,
DesignerCategoryAttribute("code"),
XmlType(AnonymousType:=True, [Namespace]:="http://www.govtalk.gov.uk/CM/errorresponse"),
XmlRoot([Namespace]:="http://www.govtalk.gov.uk/CM/errorresponse", IsNullable:=False)>
Partial Public Class ErrorResponse
#Region "Private fields"
Private _application As Application
Private _error As List(Of ErrorResponseError)
Private _schemaVersion As String
Private Shared _serializerXml As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._error = New List(Of ErrorResponseError)()
Me._application = New Application()
End Sub
Public Property Application() As Application
Get
Return Me._application
End Get
Set
Me._application = Value
End Set
End Property
<XmlElement("Error")>
Public Property [Error]() As List(Of ErrorResponseError)
Get
Return Me._error
End Get
Set
Me._error = Value
End Set
End Property
<XmlAttribute>
Public Property SchemaVersion() As String
Get
Return Me._schemaVersion
End Get
Set
Me._schemaVersion = Value
End Set
End Property
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
Get
If (_serializerXml Is Nothing) Then
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ErrorResponse))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
''' <summary>
''' Serialize ErrorResponse object
''' </summary>
''' <returns>XML value</returns>
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
xmlWriterSettings.Indent = True
xmlWriterSettings.IndentChars = " "
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
''' <summary>
''' Deserializes ErrorResponse object
''' </summary>
''' <param name="input">string to deserialize</param>
''' <param name="obj">Output ErrorResponse object</param>
''' <param name="exception">output Exception value if deserialize failed</param>
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ErrorResponse, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, ErrorResponse)
Try
obj = Deserialize(input)
Return True
Catch ex As System.Exception
exception = ex
Return False
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ErrorResponse) As Boolean
Dim exception As System.Exception = Nothing
Return Deserialize(input, obj, exception)
End Function
Public Overloads Shared Function Deserialize(ByVal input As String) As ErrorResponse
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ErrorResponse)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As Stream) As ErrorResponse
Return CType(SerializerXml.Deserialize(s), ErrorResponse)
End Function
#End Region
''' <summary>
''' Serializes current ErrorResponse object into file
''' </summary>
''' <param name="fileName">full path of outupt xml file</param>
''' <param name="exception">output Exception value if failed</param>
''' <returns>true if can serialize and save into file; otherwise, false</returns>
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
exception = Nothing
Try
SaveToFile(fileName)
Return True
Catch e As System.Exception
exception = e
Return False
End Try
End Function
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
Dim streamWriter As StreamWriter = Nothing
Try
Dim dataString As String = Serialize()
Dim outputFile As FileInfo = New FileInfo(fileName)
streamWriter = outputFile.CreateText
streamWriter.WriteLine(dataString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
''' <summary>
''' Deserializes xml markup from file into an ErrorResponse object
''' </summary>
''' <param name="fileName">File to load and deserialize</param>
''' <param name="obj">Output ErrorResponse object</param>
''' <param name="exception">output Exception value if deserialize failed</param>
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ErrorResponse, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, ErrorResponse)
Try
obj = LoadFromFile(fileName)
Return True
Catch ex As System.Exception
exception = ex
Return False
End Try
End Function
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ErrorResponse) As Boolean
Dim exception As System.Exception = Nothing
Return LoadFromFile(fileName, obj, exception)
End Function
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ErrorResponse
Dim file As FileStream = Nothing
Dim sr As StreamReader = Nothing
Try
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New StreamReader(file)
Dim dataString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(dataString)
Finally
If (Not (file) Is Nothing) Then
file.Dispose()
End If
If (Not (sr) Is Nothing) Then
sr.Dispose()
End If
End Try
End Function
End Class
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
System.Serializable,
DebuggerStepThrough,
DesignerCategoryAttribute("code"),
XmlType(AnonymousType:=True, [Namespace]:="http://www.govtalk.gov.uk/CM/errorresponse"),
XmlRoot([Namespace]:="http://www.govtalk.gov.uk/CM/errorresponse", IsNullable:=False)>
Partial Public Class Application
#Region "Private fields"
Private _any As List(Of System.Xml.XmlElement)
Private _anyAttr As List(Of System.Xml.XmlAttribute)
Private Shared _serializerXml As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._anyAttr = New List(Of System.Xml.XmlAttribute)()
Me._any = New List(Of System.Xml.XmlElement)()
End Sub
<XmlAnyElementAttribute()>
Public Property Any() As List(Of System.Xml.XmlElement)
Get
Return Me._any
End Get
Set
Me._any = Value
End Set
End Property
<XmlAnyAttributeAttribute()>
Public Property AnyAttr() As List(Of System.Xml.XmlAttribute)
Get
Return Me._anyAttr
End Get
Set
Me._anyAttr = Value
End Set
End Property
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
Get
If (_serializerXml Is Nothing) Then
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(Application))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
''' <summary>
''' Serialize Application object
''' </summary>
''' <returns>XML value</returns>
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
xmlWriterSettings.Indent = True
xmlWriterSettings.IndentChars = " "
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
''' <summary>
''' Deserializes Application object
''' </summary>
''' <param name="input">string to deserialize</param>
''' <param name="obj">Output Application object</param>
''' <param name="exception">output Exception value if deserialize failed</param>
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As Application, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, Application)
Try
obj = Deserialize(input)
Return True
Catch ex As System.Exception
exception = ex
Return False
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As Application) As Boolean
Dim exception As System.Exception = Nothing
Return Deserialize(input, obj, exception)
End Function
Public Overloads Shared Function Deserialize(ByVal input As String) As Application
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), Application)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As Stream) As Application
Return CType(SerializerXml.Deserialize(s), Application)
End Function
#End Region
''' <summary>
''' Serializes current Application object into file
''' </summary>
''' <param name="fileName">full path of outupt xml file</param>
''' <param name="exception">output Exception value if failed</param>
''' <returns>true if can serialize and save into file; otherwise, false</returns>
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
exception = Nothing
Try
SaveToFile(fileName)
Return True
Catch e As System.Exception
exception = e
Return False
End Try
End Function
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
Dim streamWriter As StreamWriter = Nothing
Try
Dim dataString As String = Serialize()
Dim outputFile As FileInfo = New FileInfo(fileName)
streamWriter = outputFile.CreateText
streamWriter.WriteLine(dataString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
''' <summary>
''' Deserializes xml markup from file into an Application object
''' </summary>
''' <param name="fileName">File to load and deserialize</param>
''' <param name="obj">Output Application object</param>
''' <param name="exception">output Exception value if deserialize failed</param>
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As Application, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, Application)
Try
obj = LoadFromFile(fileName)
Return True
Catch ex As System.Exception
exception = ex
Return False
End Try
End Function
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As Application) As Boolean
Dim exception As System.Exception = Nothing
Return LoadFromFile(fileName, obj, exception)
End Function
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As Application
Dim file As FileStream = Nothing
Dim sr As StreamReader = Nothing
Try
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New StreamReader(file)
Dim dataString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(dataString)
Finally
If (Not (file) Is Nothing) Then
file.Dispose()
End If
If (Not (sr) Is Nothing) Then
sr.Dispose()
End If
End Try
End Function
End Class
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
System.Serializable,
DebuggerStepThrough,
DesignerCategoryAttribute("code"),
XmlType(AnonymousType:=True, [Namespace]:="http://www.govtalk.gov.uk/CM/errorresponse")>
Partial Public Class ErrorResponseError
#Region "Private fields"
Private _raisedBy As String
Private _number As String
Private _type As String
Private _text As List(Of String)
Private _location As String
Private _application As Application
Private Shared _serializerXml As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._application = New Application()
Me._text = New List(Of String)()
End Sub
Public Property RaisedBy() As String
Get
Return Me._raisedBy
End Get
Set
Me._raisedBy = Value
End Set
End Property
<XmlElement(DataType:="integer")>
Public Property Number() As String
Get
Return Me._number
End Get
Set
Me._number = Value
End Set
End Property
Public Property Type() As String
Get
Return Me._type
End Get
Set
Me._type = Value
End Set
End Property
<XmlElement("Text")>
Public Property Text() As List(Of String)
Get
Return Me._text
End Get
Set
Me._text = Value
End Set
End Property
Public Property Location() As String
Get
Return Me._location
End Get
Set
Me._location = Value
End Set
End Property
Public Property Application() As Application
Get
Return Me._application
End Get
Set
Me._application = Value
End Set
End Property
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
Get
If (_serializerXml Is Nothing) Then
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ErrorResponseError))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
''' <summary>
''' Serialize ErrorResponseError object
''' </summary>
''' <returns>XML value</returns>
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
xmlWriterSettings.Indent = True
xmlWriterSettings.IndentChars = " "
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
''' <summary>
''' Deserializes ErrorResponseError object
''' </summary>
''' <param name="input">string to deserialize</param>
''' <param name="obj">Output ErrorResponseError object</param>
''' <param name="exception">output Exception value if deserialize failed</param>
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ErrorResponseError, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, ErrorResponseError)
Try
obj = Deserialize(input)
Return True
Catch ex As System.Exception
exception = ex
Return False
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ErrorResponseError) As Boolean
Dim exception As System.Exception = Nothing
Return Deserialize(input, obj, exception)
End Function
Public Overloads Shared Function Deserialize(ByVal input As String) As ErrorResponseError
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ErrorResponseError)
Finally
If (Not (stringReader) Is Nothing) Then
stringReader.Dispose()
End If
End Try
End Function
Public Overloads Shared Function Deserialize(ByVal s As Stream) As ErrorResponseError
Return CType(SerializerXml.Deserialize(s), ErrorResponseError)
End Function
#End Region
''' <summary>
''' Serializes current ErrorResponseError object into file
''' </summary>
''' <param name="fileName">full path of outupt xml file</param>
''' <param name="exception">output Exception value if failed</param>
''' <returns>true if can serialize and save into file; otherwise, false</returns>
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
exception = Nothing
Try
SaveToFile(fileName)
Return True
Catch e As System.Exception
exception = e
Return False
End Try
End Function
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
Dim streamWriter As StreamWriter = Nothing
Try
Dim dataString As String = Serialize()
Dim outputFile As FileInfo = New FileInfo(fileName)
streamWriter = outputFile.CreateText
streamWriter.WriteLine(dataString)
streamWriter.Close()
Finally
If (Not (streamWriter) Is Nothing) Then
streamWriter.Dispose()
End If
End Try
End Sub
''' <summary>
''' Deserializes xml markup from file into an ErrorResponseError object
''' </summary>
''' <param name="fileName">File to load and deserialize</param>
''' <param name="obj">Output ErrorResponseError object</param>
''' <param name="exception">output Exception value if deserialize failed</param>
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ErrorResponseError, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, ErrorResponseError)
Try
obj = LoadFromFile(fileName)
Return True
Catch ex As System.Exception
exception = ex
Return False
End Try
End Function
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ErrorResponseError) As Boolean
Dim exception As System.Exception = Nothing
Return LoadFromFile(fileName, obj, exception)
End Function
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ErrorResponseError
Dim file As FileStream = Nothing
Dim sr As StreamReader = Nothing
Try
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
sr = New StreamReader(file)
Dim dataString As String = sr.ReadToEnd
sr.Close()
file.Close()
Return Deserialize(dataString)
Finally
If (Not (file) Is Nothing) Then
file.Dispose()
End If
If (Not (sr) Is Nothing) Then
sr.Dispose()
End If
End Try
End Function
End Class
End Namespace
#Enable Warning

View File

@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema attributeFormDefault="unqualified"
elementFormDefault="qualified" id="Error-Response"
targetNamespace="http://www.govtalk.gov.uk/CM/errorresponse"
version="2.0" xmlns:err="http://www.govtalk.gov.uk/CM/errorresponse"
xmlns:gt="http://www.govtalk.gov.uk/CM/core" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:annotation>
<xsd:documentation>This schema is used for errors returned by
business systems. In these circumstances, the header
contains a single Error element of type &quot;business&quot;
and the Body contains further information.</xsd:documentation>
<xsd:appinfo>
<gt:KeyWords>business, error, response</gt:KeyWords>
</xsd:appinfo>
</xsd:annotation>
<xsd:element name="ErrorResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="0" ref="err:Application"/>
<xsd:element maxOccurs="unbounded" name="Error">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="RaisedBy" type="xsd:string"/>
<xsd:element minOccurs="0" name="Number" type="xsd:integer"/>
<xsd:element name="Type" type="xsd:string"/>
<xsd:element maxOccurs="unbounded"
minOccurs="0" name="Text" type="xsd:string"/>
<xsd:element minOccurs="0" name="Location" type="xsd:string"/>
<xsd:element minOccurs="0" ref="err:Application"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="SchemaVersion" use="required"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="Application">
<xsd:complexType>
<xsd:sequence>
<xsd:any maxOccurs="unbounded" minOccurs="0"
namespace="##any" processContents="lax"/>
</xsd:sequence>
<xsd:anyAttribute namespace="##any"/>
</xsd:complexType>
</xsd:element>
</xsd:schema>

View File

@@ -0,0 +1,286 @@
<?xml-stylesheet href="../2008/09/xsd.xsl" type="text/xsl"?>
<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns ="http://www.w3.org/1999/xhtml"
xml:lang="en">
<xs:annotation>
<xs:documentation>
<div>
<h1>About the XML namespace</h1>
<div class="bodytext">
<p>
This schema document describes the XML namespace, in a form
suitable for import by other schema documents.
</p>
<p>
See <a href="http://www.w3.org/XML/1998/namespace.html">
http://www.w3.org/XML/1998/namespace.html</a> and
<a href="http://www.w3.org/TR/REC-xml">
http://www.w3.org/TR/REC-xml</a> for information
about this namespace.
</p>
<p>
Note that local names in this namespace are intended to be
defined only by the World Wide Web Consortium or its subgroups.
The names currently defined in this namespace are listed below.
They should not be used with conflicting semantics by any Working
Group, specification, or document instance.
</p>
<p>
See further below in this document for more information about <a
href="#usage">how to refer to this schema document from your own
XSD schema documents</a> and about <a href="#nsversioning">the
namespace-versioning policy governing this schema document</a>.
</p>
</div>
</div>
</xs:documentation>
</xs:annotation>
<xs:attribute name="lang">
<xs:annotation>
<xs:documentation>
<div>
<h3>lang (as an attribute name)</h3>
<p>
denotes an attribute whose value
is a language code for the natural language of the content of
any element; its value is inherited. This name is reserved
by virtue of its definition in the XML specification.</p>
</div>
<div>
<h4>Notes</h4>
<p>
Attempting to install the relevant ISO 2- and 3-letter
codes as the enumerated possible values is probably never
going to be a realistic possibility.
</p>
<p>
See BCP 47 at <a href="http://www.rfc-editor.org/rfc/bcp/bcp47.txt">
http://www.rfc-editor.org/rfc/bcp/bcp47.txt</a>
and the IANA language subtag registry at
<a href="http://www.iana.org/assignments/language-subtag-registry">
http://www.iana.org/assignments/language-subtag-registry</a>
for further information.
</p>
<p>
The union allows for the 'un-declaration' of xml:lang with
the empty string.
</p>
</div>
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:union memberTypes="xs:language">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value=""/>
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="space">
<xs:annotation>
<xs:documentation>
<div>
<h3>space (as an attribute name)</h3>
<p>
denotes an attribute whose
value is a keyword indicating what whitespace processing
discipline is intended for the content of the element; its
value is inherited. This name is reserved by virtue of its
definition in the XML specification.</p>
</div>
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:NCName">
<xs:enumeration value="default"/>
<xs:enumeration value="preserve"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="base" type="xs:anyURI"> <xs:annotation>
<xs:documentation>
<div>
<h3>base (as an attribute name)</h3>
<p>
denotes an attribute whose value
provides a URI to be used as the base for interpreting any
relative URIs in the scope of the element on which it
appears; its value is inherited. This name is reserved
by virtue of its definition in the XML Base specification.</p>
<p>
See <a
href="http://www.w3.org/TR/xmlbase/">http://www.w3.org/TR/xmlbase/</a>
for information about this attribute.
</p>
</div>
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="id" type="xs:ID">
<xs:annotation>
<xs:documentation>
<div>
<h3>id (as an attribute name)</h3>
<p>
denotes an attribute whose value
should be interpreted as if declared to be of type ID.
This name is reserved by virtue of its definition in the
xml:id specification.</p>
<p>
See <a
href="http://www.w3.org/TR/xml-id/">http://www.w3.org/TR/xml-id/</a>
for information about this attribute.
</p>
</div>
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup name="specialAttrs">
<xs:attribute ref="xml:base"/>
<xs:attribute ref="xml:lang"/>
<xs:attribute ref="xml:space"/>
<xs:attribute ref="xml:id"/>
</xs:attributeGroup>
<xs:annotation>
<xs:documentation>
<div>
<h3>Father (in any context at all)</h3>
<div class="bodytext">
<p>
denotes Jon Bosak, the chair of
the original XML Working Group. This name is reserved by
the following decision of the W3C XML Plenary and
XML Coordination groups:
</p>
<blockquote>
<p>
In appreciation for his vision, leadership and
dedication the W3C XML Plenary on this 10th day of
February, 2000, reserves for Jon Bosak in perpetuity
the XML name "xml:Father".
</p>
</blockquote>
</div>
</div>
</xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation>
<div xml:id="usage" id="usage">
<h2><a name="usage">About this schema document</a></h2>
<div class="bodytext">
<p>
This schema defines attributes and an attribute group suitable
for use by schemas wishing to allow <code>xml:base</code>,
<code>xml:lang</code>, <code>xml:space</code> or
<code>xml:id</code> attributes on elements they define.
</p>
<p>
To enable this, such a schema must import this schema for
the XML namespace, e.g. as follows:
</p>
<pre>
&lt;schema . . .>
. . .
&lt;import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/xml.xsd"/>
</pre>
<p>
or
</p>
<pre>
&lt;import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2009/01/xml.xsd"/>
</pre>
<p>
Subsequently, qualified reference to any of the attributes or the
group defined below will have the desired effect, e.g.
</p>
<pre>
&lt;type . . .>
. . .
&lt;attributeGroup ref="xml:specialAttrs"/>
</pre>
<p>
will define a type which will schema-validate an instance element
with any of those attributes.
</p>
</div>
</div>
</xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation>
<div id="nsversioning" xml:id="nsversioning">
<h2><a name="nsversioning">Versioning policy for this schema document</a></h2>
<div class="bodytext">
<p>
In keeping with the XML Schema WG's standard versioning
policy, this schema document will persist at
<a href="http://www.w3.org/2009/01/xml.xsd">
http://www.w3.org/2009/01/xml.xsd</a>.
</p>
<p>
At the date of issue it can also be found at
<a href="http://www.w3.org/2001/xml.xsd">
http://www.w3.org/2001/xml.xsd</a>.
</p>
<p>
The schema document at that URI may however change in the future,
in order to remain compatible with the latest version of XML
Schema itself, or with the XML namespace itself. In other words,
if the XML Schema or XML namespaces change, the version of this
document at <a href="http://www.w3.org/2001/xml.xsd">
http://www.w3.org/2001/xml.xsd
</a>
will change accordingly; the version at
<a href="http://www.w3.org/2009/01/xml.xsd">
http://www.w3.org/2009/01/xml.xsd
</a>
will not change.
</p>
<p>
Previous dated (and unchanging) versions of this schema
document are at:
</p>
<ul>
<li><a href="http://www.w3.org/2009/01/xml.xsd">
http://www.w3.org/2009/01/xml.xsd</a></li>
<li><a href="http://www.w3.org/2007/08/xml.xsd">
http://www.w3.org/2007/08/xml.xsd</a></li>
<li><a href="http://www.w3.org/2004/10/xml.xsd">
http://www.w3.org/2004/10/xml.xsd</a></li>
<li><a href="http://www.w3.org/2001/03/xml.xsd">
http://www.w3.org/2001/03/xml.xsd</a></li>
</ul>
</div>
</div>
</xs:documentation>
</xs:annotation>
</xs:schema>

View File

@@ -0,0 +1,318 @@
<!DOCTYPE schema
PUBLIC "-//W3C//DTD XMLSchema 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd"
[
<!ATTLIST schema
xmlns:ds CDATA #FIXED "http://www.w3.org/2000/09/xmldsig#">
<!ENTITY dsig 'http://www.w3.org/2000/09/xmldsig#'>
<!ENTITY % p ''>
<!ENTITY % s ''>
]>
<!-- Schema for XML Signatures
http://www.w3.org/2000/09/xmldsig#
$Revision: 1.2 $ on $Date: 2013-04-16 12:48:49 $ by $Author: denis $
Copyright 2001 The Internet Society and W3C (Massachusetts Institute
of Technology, Institut National de Recherche en Informatique et en
Automatique, Keio University). All Rights Reserved.
http://www.w3.org/Consortium/Legal/
This document is governed by the W3C Software License [1] as described
in the FAQ [2].
[1] http://www.w3.org/Consortium/Legal/copyright-software-19980720
[2] http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD
-->
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
targetNamespace="http://www.w3.org/2000/09/xmldsig#"
version="0.1" elementFormDefault="qualified">
<!-- Basic Types Defined for Signatures -->
<simpleType name="CryptoBinary">
<restriction base="base64Binary">
</restriction>
</simpleType>
<!-- Start Signature -->
<element name="Signature" type="ds:SignatureType"/>
<complexType name="SignatureType">
<sequence>
<element ref="ds:SignedInfo"/>
<element ref="ds:SignatureValue"/>
<element ref="ds:KeyInfo" minOccurs="0"/>
<element ref="ds:Object" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="Id" type="ID" use="optional"/>
</complexType>
<element name="SignatureValue" type="ds:SignatureValueType"/>
<complexType name="SignatureValueType">
<simpleContent>
<extension base="base64Binary">
<attribute name="Id" type="ID" use="optional"/>
</extension>
</simpleContent>
</complexType>
<!-- Start SignedInfo -->
<element name="SignedInfo" type="ds:SignedInfoType"/>
<complexType name="SignedInfoType">
<sequence>
<element ref="ds:CanonicalizationMethod"/>
<element ref="ds:SignatureMethod"/>
<element ref="ds:Reference" maxOccurs="unbounded"/>
</sequence>
<attribute name="Id" type="ID" use="optional"/>
</complexType>
<element name="CanonicalizationMethod" type="ds:CanonicalizationMethodType"/>
<complexType name="CanonicalizationMethodType" mixed="true">
<sequence>
<any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
<!-- (0,unbounded) elements from (1,1) namespace -->
</sequence>
<attribute name="Algorithm" type="anyURI" use="required"/>
</complexType>
<element name="SignatureMethod" type="ds:SignatureMethodType"/>
<complexType name="SignatureMethodType" mixed="true">
<sequence>
<element name="HMACOutputLength" minOccurs="0" type="ds:HMACOutputLengthType"/>
<any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
<!-- (0,unbounded) elements from (1,1) external namespace -->
</sequence>
<attribute name="Algorithm" type="anyURI" use="required"/>
</complexType>
<!-- Start Reference -->
<element name="Reference" type="ds:ReferenceType"/>
<complexType name="ReferenceType">
<sequence>
<element ref="ds:Transforms" minOccurs="0"/>
<element ref="ds:DigestMethod"/>
<element ref="ds:DigestValue"/>
</sequence>
<attribute name="Id" type="ID" use="optional"/>
<attribute name="URI" type="anyURI" use="optional"/>
<attribute name="Type" type="anyURI" use="optional"/>
</complexType>
<element name="Transforms" type="ds:TransformsType"/>
<complexType name="TransformsType">
<sequence>
<element ref="ds:Transform" maxOccurs="unbounded"/>
</sequence>
</complexType>
<element name="Transform" type="ds:TransformType"/>
<complexType name="TransformType" mixed="true">
<choice minOccurs="0" maxOccurs="unbounded">
<any namespace="##other" processContents="lax"/>
<!-- (1,1) elements from (0,unbounded) namespaces -->
<element name="XPath" type="string"/>
</choice>
<attribute name="Algorithm" type="anyURI" use="required"/>
</complexType>
<!-- End Reference -->
<element name="DigestMethod" type="ds:DigestMethodType"/>
<complexType name="DigestMethodType" mixed="true">
<sequence>
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="Algorithm" type="anyURI" use="required"/>
</complexType>
<element name="DigestValue" type="ds:DigestValueType"/>
<simpleType name="DigestValueType">
<restriction base="base64Binary"/>
</simpleType>
<!-- End SignedInfo -->
<!-- Start KeyInfo -->
<element name="KeyInfo" type="ds:KeyInfoType"/>
<complexType name="KeyInfoType" mixed="true">
<choice maxOccurs="unbounded">
<element ref="ds:KeyName"/>
<element ref="ds:KeyValue"/>
<element ref="ds:RetrievalMethod"/>
<element ref="ds:X509Data"/>
<element ref="ds:PGPData"/>
<element ref="ds:SPKIData"/>
<element ref="ds:MgmtData"/>
<any processContents="lax" namespace="##other"/>
<!-- (1,1) elements from (0,unbounded) namespaces -->
</choice>
<attribute name="Id" type="ID" use="optional"/>
</complexType>
<element name="KeyName" type="string"/>
<element name="MgmtData" type="string"/>
<element name="KeyValue" type="ds:KeyValueType"/>
<complexType name="KeyValueType" mixed="true">
<choice>
<element ref="ds:DSAKeyValue"/>
<element ref="ds:RSAKeyValue"/>
<any namespace="##other" processContents="lax"/>
</choice>
</complexType>
<element name="RetrievalMethod" type="ds:RetrievalMethodType"/>
<complexType name="RetrievalMethodType">
<sequence>
<element ref="ds:Transforms" minOccurs="0"/>
</sequence>
<attribute name="URI" type="anyURI"/>
<attribute name="Type" type="anyURI" use="optional"/>
</complexType>
<!-- Start X509Data -->
<element name="X509Data" type="ds:X509DataType"/>
<complexType name="X509DataType">
<sequence maxOccurs="unbounded">
<choice>
<element name="X509IssuerSerial" type="ds:X509IssuerSerialType"/>
<element name="X509SKI" type="base64Binary"/>
<element name="X509SubjectName" type="string"/>
<element name="X509Certificate" type="base64Binary"/>
<element name="X509CRL" type="base64Binary"/>
<any namespace="##other" processContents="lax"/>
</choice>
</sequence>
</complexType>
<complexType name="X509IssuerSerialType">
<sequence>
<element name="X509IssuerName" type="string"/>
<element name="X509SerialNumber" type="integer"/>
</sequence>
</complexType>
<!-- End X509Data -->
<!-- Begin PGPData -->
<element name="PGPData" type="ds:PGPDataType"/>
<complexType name="PGPDataType">
<choice>
<sequence>
<element name="PGPKeyID" type="base64Binary"/>
<element name="PGPKeyPacket" type="base64Binary" minOccurs="0"/>
<any namespace="##other" processContents="lax" minOccurs="0"
maxOccurs="unbounded"/>
</sequence>
<sequence>
<element name="PGPKeyPacket" type="base64Binary"/>
<any namespace="##other" processContents="lax" minOccurs="0"
maxOccurs="unbounded"/>
</sequence>
</choice>
</complexType>
<!-- End PGPData -->
<!-- Begin SPKIData -->
<element name="SPKIData" type="ds:SPKIDataType"/>
<complexType name="SPKIDataType">
<sequence maxOccurs="unbounded">
<element name="SPKISexp" type="base64Binary"/>
<any namespace="##other" processContents="lax" minOccurs="0"/>
</sequence>
</complexType>
<!-- End SPKIData -->
<!-- End KeyInfo -->
<!-- Start Object (Manifest, SignatureProperty) -->
<element name="Object" type="ds:ObjectType"/>
<complexType name="ObjectType" mixed="true">
<sequence minOccurs="0" maxOccurs="unbounded">
<any namespace="##any" processContents="lax"/>
</sequence>
<attribute name="Id" type="ID" use="optional"/>
<attribute name="MimeType" type="string" use="optional"/> <!-- add a grep facet -->
<attribute name="Encoding" type="anyURI" use="optional"/>
</complexType>
<element name="Manifest" type="ds:ManifestType"/>
<complexType name="ManifestType">
<sequence>
<element ref="ds:Reference" maxOccurs="unbounded"/>
</sequence>
<attribute name="Id" type="ID" use="optional"/>
</complexType>
<element name="SignatureProperties" type="ds:SignaturePropertiesType"/>
<complexType name="SignaturePropertiesType">
<sequence>
<element ref="ds:SignatureProperty" maxOccurs="unbounded"/>
</sequence>
<attribute name="Id" type="ID" use="optional"/>
</complexType>
<element name="SignatureProperty" type="ds:SignaturePropertyType"/>
<complexType name="SignaturePropertyType" mixed="true">
<choice maxOccurs="unbounded">
<any namespace="##other" processContents="lax"/>
<!-- (1,1) elements from (1,unbounded) namespaces -->
</choice>
<attribute name="Target" type="anyURI" use="required"/>
<attribute name="Id" type="ID" use="optional"/>
</complexType>
<!-- End Object (Manifest, SignatureProperty) -->
<!-- Start Algorithm Parameters -->
<simpleType name="HMACOutputLengthType">
<restriction base="integer"/>
</simpleType>
<!-- Start KeyValue Element-types -->
<element name="DSAKeyValue" type="ds:DSAKeyValueType"/>
<complexType name="DSAKeyValueType">
<sequence>
<sequence minOccurs="0">
<element name="P" type="ds:CryptoBinary"/>
<element name="Q" type="ds:CryptoBinary"/>
</sequence>
<element name="G" type="ds:CryptoBinary" minOccurs="0"/>
<element name="Y" type="ds:CryptoBinary"/>
<element name="J" type="ds:CryptoBinary" minOccurs="0"/>
<sequence minOccurs="0">
<element name="Seed" type="ds:CryptoBinary"/>
<element name="PgenCounter" type="ds:CryptoBinary"/>
</sequence>
</sequence>
</complexType>
<element name="RSAKeyValue" type="ds:RSAKeyValueType"/>
<complexType name="RSAKeyValueType">
<sequence>
<element name="Modulus" type="ds:CryptoBinary"/>
<element name="Exponent" type="ds:CryptoBinary"/>
</sequence>
</complexType>
<!-- End KeyValue Element-types -->
<!-- End Signature -->
</schema>

View File

@@ -1,6 +1,19 @@
Imports Org.BouncyCastle.Ocsp
Imports VERAG_PROG_ALLGEMEIN.CC015B_TR_EXT_V4_3
Imports System.IO
Imports System.Xml.Linq
Imports com.sun.xml.internal.rngom.parse.compact
Imports Org.BouncyCastle.Ocsp
Imports Polly
Imports CC015B_TR_EXT_V4_3
Imports CC304A_v10_0
Imports CC305A_v10_0
Imports CC316A_v10_0
Imports CC328A_v10_0
Imports ENS_CC315A
Imports VERAG_PROG_ALLGEMEIN.ENS_CC315A
Imports VERAG_PROG_ALLGEMEIN.CC304A_v10_0
Imports VERAG_PROG_ALLGEMEIN.CC316A_v10_0
Imports VERAG_PROG_ALLGEMEIN.CC328A_v10_0
Imports VERAG_PROG_ALLGEMEIN.CC305A_v10_0
Public Class cHMRC_ENS
@@ -16,133 +29,836 @@ Public Class cHMRC_ENS
Shared Function helloWorldENS(ByVal response As String) As Boolean
Try
VERAG_PROG_ALLGEMEIN.cChilkat_Helper.UnlockCilkat()
VERAG_PROG_ALLGEMEIN.cChilkat_Helper.UnlockCilkat()
Dim TOKEN = cHMRC.getTOKEN("ENS_HELLOWORLD")
If TOKEN.hasEntry Then
' HTTP-Client initialisieren
Dim http As New Chilkat.Http
' Falls das Token fehlt, Hinweis ausgeben
If String.IsNullOrEmpty(TOKEN.token_BEARER_TOKEN) Then
Console.WriteLine("Fehler: Kein OAuth2-Token gefunden!")
Return False
End If
Dim TOKEN = cHMRC.getTOKEN("ENS_HELLOWORLD")
' Setze die benötigten Header
http.SetRequestHeader("Accept", "application/vnd.hmrc.1.0+xml")
http.SetRequestHeader("Content-Type", "application/xml; charset=UTF-8")
http.SetRequestHeader("Authorization", "Bearer " & TOKEN.token_BEARER_TOKEN)
If TOKEN.hasEntry Then
' API-Endpunkt für User-Restricted Hello API
Dim url As String = "https://test-api.service.hmrc.gov.uk/hello/application"
'Dim url As String = "https://test-api.service.hmrc.gov.uk/hello/user"
' HTTP-Client initialisieren
Dim http As New Chilkat.Http
' API-Anfrage senden
response = http.QuickGetStr(url)
' Falls das Token fehlt, Hinweis ausgeben
If String.IsNullOrEmpty(TOKEN.token_BEARER_TOKEN) Then
Console.WriteLine("Fehler: Kein OAuth2-Token gefunden!")
Return False
' Fehlerbehandlung
If (http.LastMethodSuccess <> True) Then
Console.WriteLine("Fehler: " & http.LastErrorText)
MsgBox("Fehler: " & http.LastErrorText)
Else
Console.WriteLine("Antwort von HMRC API: " & response)
MsgBox("Antwort von HMRC API: " & response)
End If
Return True
End If
' Setze die benötigten Header
http.SetRequestHeader("Accept", "application/vnd.hmrc.1.0+xml")
http.SetRequestHeader("Content-Type", "application/xml; charset=UTF-8")
http.SetRequestHeader("Authorization", "Bearer " & TOKEN.token_BEARER_TOKEN)
Catch ex As Exception
cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
' API-Endpunkt für User-Restricted Hello API
Dim url As String = "https://test-api.service.hmrc.gov.uk/hello/application"
'Dim url As String = "https://test-api.service.hmrc.gov.uk/hello/user"
' API-Anfrage senden
response = http.QuickGetStr(url)
' Fehlerbehandlung
If (http.LastMethodSuccess <> True) Then
Console.WriteLine("Fehler: " & http.LastErrorText)
MsgBox("Fehler: " & http.LastErrorText)
Else
Console.WriteLine("Antwort von HMRC API: " & response)
MsgBox("Antwort von HMRC API: " & response)
End If
Return True
End If
Return False
End Function
Shared Function insertENS(ENS_CC315A As CC315AType, ByVal response As String) As Boolean
' Chilkat-Objekt initialisieren
Dim http As New Chilkat.Http()
Shared Function insertENS(ENS_CC315A As CC315AType, ByVal responseStr As String) As Boolean
Try
' Chilkat-Objekt initialisieren
' Dim http As New Chilkat.Http()
' EORI-Nummer für die Überprüfung
'Dim eoriNumber As String = "GB123456789000"
' EORI-Nummer für die Überprüfung
'Dim eoriNumber As String = "GB123456789000"
Dim url As String = ""
If TEST Then
url = "test-api.service.hmrc.gov.uk"
Else
url = "api.service.hmrc.gov.uk"
End If
MsgBox(url)
VERAG_PROG_ALLGEMEIN.cChilkat_Helper.UnlockCilkat()
Dim CREDENTIALS = cHMRC.getCredentials(ApplicationName)
Dim url As String = CREDENTIALS.API_STRING ' URL Setzenen https://api.service.hmrc.gov.uk / https://test-api.service.hmrc.gov.uk
'-------------------------------------------------------
VERAG_PROG_ALLGEMEIN.cChilkat_Helper.UnlockCilkat()
ENS_CC315A = New CC315AType
ENS_CC315A.MesSenMES3 = "GB123"
ENS_CC315A.DatOfPreMES9 = Now.ToString("yyMMdd")
ENS_CC315A.TimOfPreMES10 = Now.ToString("HHmm")
ENS_CC315A.MesIdeMES19 = "ABCD1234"
'ENS_CC315A.MesTypMES20 = "CC315A"
ENS_CC315A.HEAHEA.RefNumHEA4 = "ABCD1234"
ENS_CC315A.HEAHEA.TraModAtBorHEA76 = "4"
ENS_CC315A.HEAHEA.TotNumOfIteHEA305 = "1"
'-------------------------------------------------------
'-------------------------------------------------------
Dim TOKEN = cHMRC.getTOKEN("ENS", True)
'TEEST:::
If TOKEN.hasEntry Then
ENS_CC315A = CC315AType.LoadFromFile("D:\Andreas\TMP\CC315A_Example1.xml")
ENS_CC315A.DatOfPreMES9 = Now.ToString("yyMMdd")
ENS_CC315A.TimOfPreMES10 = Now.ToString("HHmm")
Dim req As New Chilkat.HttpRequest()
If False Then
If ENS_CC315A Is Nothing Then
'Return False 'FEHLER!??!?
ENS_CC315A = New CC315AType '-> nur zum testen
End If
If ENS_CC315A.MesSenMES3 Is Nothing OrElse ENS_CC315A.MesSenMES3 = "" Then
ENS_CC315A.MesSenMES3 = "GB552556002342" 'TEST USER 790949012321
End If
' Setze deine HMRC API-Credentials
http.AuthToken = TOKEN.token_BEARER_TOKEN
ENS_CC315A.DatOfPreMES9 = Now.ToString("yyMMdd")
ENS_CC315A.TimOfPreMES10 = Now.ToString("HHmm")
ENS_CC315A.MesIdeMES19 = "ABCD1234"
'ENS_CC315A.MesTypMES20 = "CC315A"
req.HttpVerb = "POST"
req.Path = "/customs/imports/declarations"
req.ContentType = "application/xml"
req.Charset = "utf-8"
req.SendCharset = True
MsgBox(ENS_CC315A.Serialize)
' Füge das XML als Body hinzu
req.LoadBodyFromString(ENS_CC315A.Serialize, "utf-8")
' Füge benötigte Header hinzu
req.AddHeader("Accept", "application/vnd.hmrc.1.0+xml") '"application/vnd.hmrc.1.0+xml")
req.AddHeader("Content-Type", "application/xml; charset=UTF-8") '"application/xml")
req.AddHeader("Authorization", "Bearer " & TOKEN.token_BEARER_TOKEN)
' req.AddHeader("Gov-Client-Connection-Method", "WEB_APP_VIA_SERVER")
' req.AddHeader("Gov-Client-Public-IP", "192.168.1.1")
' req.AddHeader("Gov-Client-Timezone", "UTC+00:00")
MsgBox(TOKEN.token_BEARER_TOKEN)
' Sende die Anfrage
Dim resp As Chilkat.HttpResponse = http.SynchronousRequest(url, 443, True, req)
If resp Is Nothing Then
Console.WriteLine("Fehler: " & http.LastErrorText)
Else
Console.WriteLine("Status Code: " & resp.StatusCode)
Console.WriteLine("Antwort: " & resp.BodyStr)
ENS_CC315A.HEAHEA.RefNumHEA4 = "ABCD1234"
ENS_CC315A.HEAHEA.TraModAtBorHEA76 = "4"
ENS_CC315A.HEAHEA.TotNumOfIteHEA305 = "1"
End If
Return True
End If
'-------------------------------------------------------
Dim TOKEN = cHMRC.getTOKEN("ENS")
If TOKEN.hasEntry Then
' Erstellen Sie eine Instanz des Http-Objekts
Dim http As New Chilkat.Http()
' Authentifizierung: Setzen des Bearer-Tokens
http.AuthToken = TOKEN.token_BEARER_TOKEN
' Setzen des Accept-Headers für die erwartete Antwort im XML-Format
http.SetRequestHeader("Accept", "application/vnd.hmrc.1.0+xml")
' Setzen des Content-Type-Headers für die Anfrage
http.SetRequestHeader("Content-Type", "application/xml; charset=UTF-8")
' Definieren Sie die URL für die POST-Anfrage
Dim urlHTTP As String = url & "/customs/imports/declarations"
Dim xmlContent As String = ENS_CC315A.Serialize
' xmlContent = File.ReadAllText("D:\Andreas\TMP\CC315A_Example1.xml")
MsgBox(xmlContent)
' Senden Sie die POST-Anfrage mit dem XML-Inhalt
Dim response As Chilkat.HttpResponse = http.PostXml(urlHTTP, xmlContent, "utf-8")
If (http.LastMethodSuccess = False) Then
Console.WriteLine("Fehler bei der Anfrage: " & http.LastErrorText)
Return False
End If
' Überprüfen Sie den HTTP-Statuscode der Antwort
If (response.StatusCode = 202) Then
Console.WriteLine("Entry Summary Declaration erfolgreich eingereicht.")
Console.WriteLine("Antwort:")
Console.WriteLine(response.BodyStr)
Dim tempFilePath As String = Path.GetTempFileName()
File.WriteAllText(tempFilePath, response.BodyStr)
Dim RESP = SuccessResponse_v2_0.SuccessResponse.LoadFromFile(tempFilePath)
Try
File.Delete(tempFilePath) ' Bereinigen nach der Verwendung
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Return True
ElseIf (response.StatusCode = 400) Then
Console.WriteLine("Fehler: HTTP Statuscode " & response.StatusCode)
Console.WriteLine(response.BodyStr)
Dim errTxt = ""
Dim tempFilePath As String = Path.GetTempFileName()
File.WriteAllText(tempFilePath, response.BodyStr)
Dim RESP = errorresponse_v2_0.ErrorResponse.LoadFromFile(tempFilePath)
Try
File.Delete(tempFilePath) ' Bereinigen nach der Verwendung
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
For Each Erline In RESP.Error
errTxt &= String.Join(", ", Erline.Text) & vbNewLine & vbNewLine
Next
MsgBox(errTxt)
Return False
Else
Console.WriteLine("Fehler: HTTP Statuscode " & response.StatusCode)
Console.WriteLine(response.BodyStr)
Return False
End If
'Dim req As New Chilkat.HttpRequest()
'' Setze deine HMRC API-Credentials
'http.AuthToken = TOKEN.token_BEARER_TOKEN
'req.HttpVerb = "POST"
'req.Path = "/customs/imports/declarations"
'req.ContentType = "application/xml"
'req.Charset = "utf-8"
'req.SendCharset = True
'' Füge das XML als Body hinzu
'req.LoadBodyFromString(ENS_CC315A.Serialize, "utf-8")
'' Füge benötigte Header hinzu
'req.AddHeader("Accept", "application/vnd.hmrc.1.0+xml") '"application/vnd.hmrc.1.0+xml")
'req.AddHeader("Content-Type", "application/xml; charset=UTF-8") '"application/xml")
'req.AddHeader("Authorization", "Bearer " & TOKEN.token_BEARER_TOKEN)
'MsgBox(TOKEN.token_BEARER_TOKEN)
'' Sende die Anfrage
'Dim resp As Chilkat.HttpResponse = http.SynchronousRequest(url, 443, True, req)
'If resp Is Nothing Then
' Console.WriteLine("Fehler: " & http.LastErrorText)
'Else
' Console.WriteLine("Status Code: " & resp.StatusCode)
' Console.WriteLine("Antwort: " & resp.BodyStr)
'End If
'Return True
End If
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Return False
End Function
Shared Function amendENS(MRN As String, ByRef CC313AResponse As CC315AType) As Boolean
Try
Dim CREDENTIALS = cHMRC.getCredentials(ApplicationName)
Dim url As String = CREDENTIALS.API_STRING ' URL Setzenen https://api.service.hmrc.gov.uk / https://test-api.service.hmrc.gov.uk
VERAG_PROG_ALLGEMEIN.cChilkat_Helper.UnlockCilkat()
Dim TOKEN = cHMRC.getTOKEN("ENS")
If TOKEN.hasEntry Then
' Erstellen Sie eine Instanz des Http-Objekts
Dim http As New Chilkat.Http()
' Authentifizierung: Setzen des Bearer-Tokens
http.AuthToken = TOKEN.token_BEARER_TOKEN
' Setzen des Accept-Headers für die erwartete Antwort im XML-Format
http.SetRequestHeader("Accept", "application/vnd.hmrc.1.0+xml")
' Setzen des Content-Type-Headers (kann erforderlich sein)
http.SetRequestHeader("Content-Type", "application/xml")
' Definieren Sie die URL für die PUT-Anfrage
Dim urlHttp As String = url & "/customs/imports/declarations/{" & MRN & "}"
' Senden Sie die PUT-Anfrage ohne Body
Dim response As Chilkat.HttpResponse = http.QuickRequest("PUT", urlHttp)
If (http.LastMethodSuccess = False) Then
Console.WriteLine("❌ Fehler bei der Anfrage: " & http.LastErrorText)
Return False
End If
' Überprüfen Sie den HTTP-Statuscode der Antwort
If (response.StatusCode = 200) Then
Console.WriteLine("✅ Entry Summary Declaration erfolgreich geändert.")
Console.WriteLine("Antwort:")
Console.WriteLine(response.BodyStr) ' XML-Ausgabe der Antwort
Dim tempFilePath As String = Path.GetTempFileName()
File.WriteAllText(tempFilePath, response.BodyStr)
CC313AResponse = CC315AType.LoadFromFile(tempFilePath)
Try
File.Delete(tempFilePath) ' Bereinigen nach der Verwendung
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Return True
Else
Console.WriteLine("❌ Fehler: HTTP Statuscode " & response.StatusCode)
Console.WriteLine(response.BodyStr)
Return False
End If
End If
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Return False
End Function
Shared Function getListOfENSOutcomes() As List(Of HmrcOutcomes)
Try
Dim CREDENTIALS = cHMRC.getCredentials(ApplicationName)
Dim url As String = CREDENTIALS.API_STRING ' URL Setzenen https://api.service.hmrc.gov.uk / https://test-api.service.hmrc.gov.uk
VERAG_PROG_ALLGEMEIN.cChilkat_Helper.UnlockCilkat()
Dim TOKEN = cHMRC.getTOKEN("ENS")
If TOKEN.hasEntry Then
' Erstellen Sie eine Instanz des Http-Objekts
Dim http As New Chilkat.Http()
' Authentifizierung: Setzen des Bearer-Tokens
http.AuthToken = TOKEN.token_BEARER_TOKEN
' Setzen des Accept-Headers für die erwartete Antwort im XML-Format
http.SetRequestHeader("Accept", "application/vnd.hmrc.1.0+xml")
' Definieren Sie die URL für die GET-Anfrage
Dim urlHttp As String = url & "/customs/imports/outcomes/"
' Senden Sie die GET-Anfrage
Dim response As Chilkat.HttpResponse = http.QuickRequest("GET", urlHttp)
If (http.LastMethodSuccess = False) Then
Console.WriteLine("Fehler bei der Anfrage: " & http.LastErrorText)
Return Nothing
End If
' Überprüfen Sie den HTTP-Statuscode der Antwort
If (response.StatusCode = 204) Then
Console.WriteLine("Ergebnis: Kein Inhalt!")
Console.WriteLine(response.BodyStr)
Return Nothing
End If
' Überprüfen Sie den HTTP-Statuscode der Antwort
If (response.StatusCode = 200) Then
Console.WriteLine("Liste der Outcomes erfolgreich abgerufen:")
Console.WriteLine(response.BodyStr) ' XML-Ausgabe der Antwort
Dim HmrcOutcomesList As List(Of HmrcOutcomes) = ParseHmrcXmlResponseOutcomes(response.BodyStr)
Return HmrcOutcomesList
Else
Console.WriteLine("Fehler: HTTP Statuscode " & response.StatusCode)
Console.WriteLine(response.BodyStr)
Return Nothing
End If
End If
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Return Nothing
End Function
Shared Function retrieveENSOutcome(correlationId, ByRef TypeOfResonse, ByRef ResponseClass) As Boolean
Try
Dim CREDENTIALS = cHMRC.getCredentials(ApplicationName)
Dim url As String = CREDENTIALS.API_STRING ' URL Setzenen https://api.service.hmrc.gov.uk / https://test-api.service.hmrc.gov.uk
VERAG_PROG_ALLGEMEIN.cChilkat_Helper.UnlockCilkat()
Dim TOKEN = cHMRC.getTOKEN("ENS")
If TOKEN.hasEntry Then
' Erstellen Sie eine Instanz des Http-Objekts
Dim http As New Chilkat.Http()
' Authentifizierung: Setzen des Bearer-Tokens
http.AuthToken = TOKEN.token_BEARER_TOKEN
' Setzen des Accept-Headers für die erwartete Antwort im XML-Format
http.SetRequestHeader("Accept", "application/vnd.hmrc.1.0+xml")
' Definieren Sie die URL für die GET-Anfrage
Dim urlHttp As String = url & "/customs/imports/outcomes/{" & correlationId & "}"
' Senden Sie die GET-Anfrage
Dim response As Chilkat.HttpResponse = http.QuickRequest("GET", urlHttp)
If (http.LastMethodSuccess = False) Then
Console.WriteLine("Fehler bei der Anfrage: " & http.LastErrorText)
Return Nothing
End If
' Überprüfen Sie den HTTP-Statuscode der Antwort
If (response.StatusCode = 200) Then
Console.WriteLine("Outcome erfolgreich abgerufen:")
Console.WriteLine(response.BodyStr) ' XML-Ausgabe der Antwort
If response.BodyStr.Contains("CC328A") Then ' ANTWORT OK New submission accepted:
Dim tempFilePath As String = Path.GetTempFileName()
File.WriteAllText(tempFilePath, response.BodyStr)
Dim CC328A = CC328AType.LoadFromFile(tempFilePath)
Try
File.Delete(tempFilePath) ' Bereinigen nach der Verwendung
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
TypeOfResonse = "CC328A"
ResponseClass = CC328A
Return True
ElseIf response.BodyStr.Contains("CC316A") Then ' ANTWORT OK New submission rejected:
Dim tempFilePath As String = Path.GetTempFileName()
File.WriteAllText(tempFilePath, response.BodyStr)
Dim CC316A = CC316AType.LoadFromFile(tempFilePath)
Try
File.Delete(tempFilePath) ' Bereinigen nach der Verwendung
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
TypeOfResonse = "CC316A"
ResponseClass = CC316A
Return True
ElseIf response.BodyStr.Contains("CC304A") Then ' Amended submission accepted
Dim tempFilePath As String = Path.GetTempFileName()
File.WriteAllText(tempFilePath, response.BodyStr)
Dim CC304A = CC304AType.LoadFromFile(tempFilePath)
Try
File.Delete(tempFilePath) ' Bereinigen nach der Verwendung
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
TypeOfResonse = "CC304A"
ResponseClass = CC304A
Return True
ElseIf response.BodyStr.Contains("CC305A") Then ' Amended submission rejected
Dim tempFilePath As String = Path.GetTempFileName()
File.WriteAllText(tempFilePath, response.BodyStr)
Dim CC305A = CC305AType.LoadFromFile(tempFilePath)
Try
File.Delete(tempFilePath) ' Bereinigen nach der Verwendung
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
TypeOfResonse = "CC305A"
ResponseClass = CC305A
Return True
End If
Else
Console.WriteLine("Fehler: HTTP Statuscode " & response.StatusCode)
Console.WriteLine(response.BodyStr)
Return Nothing
End If
' The Outcome for the Correlation ID (schema here).
'An accepted outcome which Is successful will contain a Movement Reference Number. A rejected outcome will contain one Or more errors. Accordingly, the content of response element will be based on one of the following schemas:
' New submission accepted schema http //ics.dgtaxud.ec/CC328A.
' New submission rejected: schema http: //ics.dgtaxud.ec/CC316A.
' Amended submission accepted: schema http: //ics.dgtaxud.ec/CC304A.
' Amended submission rejected: schema http: //ics.dgtaxud.ec/CC305A.
End If
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Return Nothing
End Function
Shared Function acknowlageENSOutcome(correlationId) As Boolean
Try
Dim CREDENTIALS = cHMRC.getCredentials(ApplicationName)
Dim url As String = CREDENTIALS.API_STRING ' URL Setzenen https://api.service.hmrc.gov.uk / https://test-api.service.hmrc.gov.uk
VERAG_PROG_ALLGEMEIN.cChilkat_Helper.UnlockCilkat()
Dim TOKEN = cHMRC.getTOKEN("ENS")
If TOKEN.hasEntry Then
' Erstellen Sie eine Instanz des Http-Objekts
Dim http As New Chilkat.Http()
' Authentifizierung: Setzen des Bearer-Tokens
http.AuthToken = TOKEN.token_BEARER_TOKEN
' Setzen des Accept-Headers für die erwartete Antwort im XML-Format
http.SetRequestHeader("Accept", "application/vnd.hmrc.1.0+xml")
' Setzen des Content-Type-Headers für die Anfrage
http.SetRequestHeader("Content-Type", "application/xml")
' Definieren Sie die URL für die POST-Anfrage
Dim urlHttp As String = url & "/customs/imports/outcomes/{" & correlationId & "}"
' Senden Sie die POST-Anfrage ohne Body
Dim response As Chilkat.HttpResponse = http.QuickRequest("POST", urlHttp)
If (http.LastMethodSuccess = False) Then
Console.WriteLine("Fehler bei der Anfrage: " & http.LastErrorText)
Return False
End If
' Überprüfen Sie den HTTP-Statuscode der Antwort
If (response.StatusCode = 204) Then
Console.WriteLine("✅ Benachrichtigung erfolgreich bestätigt.")
Return True
Else
Console.WriteLine("❌ Fehler: HTTP Statuscode " & response.StatusCode)
Console.WriteLine(response.BodyStr)
Return False
End If
End If
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Return False
End Function
Shared Function getENSNotifications() As List(Of HmrcNotification)
Try
Dim CREDENTIALS = cHMRC.getCredentials(ApplicationName)
Dim url As String = CREDENTIALS.API_STRING ' URL Setzenen https://api.service.hmrc.gov.uk / https://test-api.service.hmrc.gov.uk
VERAG_PROG_ALLGEMEIN.cChilkat_Helper.UnlockCilkat()
Dim TOKEN = cHMRC.getTOKEN("ENS")
If TOKEN.hasEntry Then
' Erstellen Sie eine Instanz des Http-Objekts
Dim http As New Chilkat.Http()
' Falls eine Authentifizierung erforderlich ist, setzen Sie den API-Schlüssel oder andere Authentifizierungsheader
http.SetRequestHeader("Authorization", "Bearer " & TOKEN.token_BEARER_TOKEN)
' Setzen des Accept-Headers für die erwartete Antwort im XML-Format
http.SetRequestHeader("Accept", "application/vnd.hmrc.1.0+xml")
' Definieren Sie die URL für die GET-Anfrage
Dim urlHttpReq As String = url & "/customs/imports/notifications/"
' Senden Sie die GET-Anfrage und erhalten Sie die Antwort
Dim response As Chilkat.HttpResponse = http.QuickRequest("GET", urlHttpReq)
If (http.LastMethodSuccess = False) Then
Console.WriteLine("Fehler bei der Anfrage: " & http.LastErrorText)
Return Nothing
End If
' Überprüfen Sie den HTTP-Statuscode der Antwort
If (response.StatusCode = 204) Then
Console.WriteLine("Ergebnis: Kein Inhalt!")
Console.WriteLine(response.BodyStr)
Return Nothing
End If
If (response.StatusCode <> 200) Then
Console.WriteLine("Fehler: HTTP Statuscode " & response.StatusCode)
Console.WriteLine(response.BodyStr)
Return Nothing
End If
' Verarbeiten Sie den Antworttext (XML)
Dim xmlResponse As String = response.BodyStr
Console.WriteLine("Antwort erhalten:")
Console.WriteLine(xmlResponse)
Dim NotificationList As List(Of HmrcNotification) = ParseHmrcXmlResponse(xmlResponse)
Return NotificationList
End If
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Return Nothing
End Function
Public Shared Function ParseHmrcXmlResponse(xmlResponse As String) As List(Of HmrcNotification)
Dim notifications As New List(Of HmrcNotification)
Try
' XML in ein XElement-Objekt laden
Dim xml As XElement = XElement.Parse(xmlResponse)
' Alle <response>-Elemente durchlaufen
For Each response As XElement In xml.Elements("response")
Dim notification As New HmrcNotification With {
.CorrelationId = response.Element("correlationId")?.Value,
.NotificationId = response.Element("notificationId")?.Value,
.Link = response.Element("link")?.Value
}
notifications.Add(notification)
Next
Catch ex As Exception
Console.WriteLine("Fehler beim Parsen der XML-Antwort: " & ex.Message)
End Try
Return notifications
End Function
Public Shared Function ParseHmrcXmlResponseOutcomes(xmlResponse As String) As List(Of HmrcOutcomes)
Dim outcomes As New List(Of HmrcOutcomes)
Try
' XML in ein XElement-Objekt laden
Dim xml As XElement = XElement.Parse(xmlResponse)
' Alle <response>-Elemente durchlaufen
For Each response As XElement In xml.Elements("response")
Dim notification As New HmrcOutcomes With {
.CorrelationId = response.Element("correlationId")?.Value,
.MRN = response.Element("MRN")?.Value,
.Link = response.Element("link")?.Value
}
outcomes.Add(notification)
Next
Catch ex As Exception
Console.WriteLine("Fehler beim Parsen der XML-Antwort: " & ex.Message)
End Try
Return outcomes
End Function
Shared Function acknowlageENSNotification(notificationID) As Boolean
Try
Dim CREDENTIALS = cHMRC.getCredentials(ApplicationName)
Dim url As String = CREDENTIALS.API_STRING ' URL Setzenen https://api.service.hmrc.gov.uk / https://test-api.service.hmrc.gov.uk
VERAG_PROG_ALLGEMEIN.cChilkat_Helper.UnlockCilkat()
Dim TOKEN = cHMRC.getTOKEN("ENS")
If TOKEN.hasEntry Then
' Erstellen Sie eine Instanz des Http-Objekts
Dim http As New Chilkat.Http()
' Authentifizierung: Setzen des Bearer-Tokens
http.AuthToken = TOKEN.token_BEARER_TOKEN
' Setzen des Accept-Headers für die erwartete Antwort im XML-Format
http.SetRequestHeader("Accept", "application/vnd.hmrc.1.0+xml")
' Setzen des Content-Type-Headers für die Anfrage
http.SetRequestHeader("Content-Type", "application/xml")
' Definieren Sie die URL für die POST-Anfrage
Dim urlHttp As String = url & "/customs/imports/notifications/{" & notificationID & "}/acknowledge"
' Senden Sie die POST-Anfrage ohne Body
Dim response As Chilkat.HttpResponse = http.QuickRequest("POST", urlHttp)
If (http.LastMethodSuccess = False) Then
Console.WriteLine("Fehler bei der Anfrage: " & http.LastErrorText)
Return False
End If
' Überprüfen Sie den HTTP-Statuscode der Antwort
If (response.StatusCode = 204) Then
Console.WriteLine("✅ Benachrichtigung erfolgreich bestätigt.")
Return True
Else
Console.WriteLine("❌ Fehler: HTTP Statuscode " & response.StatusCode)
Console.WriteLine(response.BodyStr)
Return False
End If
End If
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Return False
End Function
Shared Function readENSNotification(notificationID) As CC315AType
Try
Dim CREDENTIALS = cHMRC.getCredentials(ApplicationName)
Dim url As String = CREDENTIALS.API_STRING ' URL Setzenen https://api.service.hmrc.gov.uk / https://test-api.service.hmrc.gov.uk
VERAG_PROG_ALLGEMEIN.cChilkat_Helper.UnlockCilkat()
Dim TOKEN = cHMRC.getTOKEN("ENS")
If TOKEN.hasEntry Then
' Erstellen Sie eine Instanz des Http-Objekts
Dim http As New Chilkat.Http()
' Authentifizierung: Setzen des Bearer-Tokens
http.AuthToken = TOKEN.token_BEARER_TOKEN
' Setzen des Accept-Headers für die erwartete Antwort im XML-Format
http.SetRequestHeader("Accept", "application/vnd.hmrc.1.0+xml")
' Definieren Sie die URL für die GET-Anfrage
Dim urlHttp As String = url & "/customs/imports/notifications/{" & notificationID & "}"
' Senden Sie die GET-Anfrage
Dim response As Chilkat.HttpResponse = http.QuickRequest("GET", urlHttp)
If (http.LastMethodSuccess = False) Then
Console.WriteLine("❌ Fehler bei der Anfrage: " & http.LastErrorText)
Return Nothing
End If
' Überprüfen Sie den HTTP-Statuscode der Antwort
If (response.StatusCode = 200) Then
Console.WriteLine("✅ Benachrichtigung erfolgreich abgerufen:")
Console.WriteLine(response.BodyStr) ' XML-Ausgabe
Dim tempFilePath As String = Path.GetTempFileName()
File.WriteAllText(tempFilePath, response.BodyStr)
Dim ENS_CC315A = CC315AType.LoadFromFile(tempFilePath)
Try
File.Delete(tempFilePath) ' Bereinigen nach der Verwendung
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Return ENS_CC315A
Else
Console.WriteLine("❌ Fehler: HTTP Statuscode " & response.StatusCode)
Console.WriteLine(response.BodyStr)
Return Nothing
End If
End If
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Return Nothing
End Function
' Klasse zur Speicherung einer einzelnen Notification
Public Class HmrcNotification
Public Property CorrelationId As String
Public Property NotificationId As String
Public Property Link As String
End Class
' Klasse zur Speicherung einer einzelnen Notification
Public Class HmrcOutcomes
Public Property CorrelationId As String
Public Property MRN As String
Public Property Link As String
End Class
End Class