Difference between revisions of "HVS32 JDBC interface (automatic polling)"

From Wiki - Heidler Strichcode GmbH
Jump to navigation Jump to search
Line 4: Line 4:
{| class="wikitable"
{| class="wikitable"
| DGS version || or higher
| DGS version || DGS-3_8_1_661 or higher
| DGS Plugins || HVS32Client, JDBC Server
| DGS Plugins || HVS32Client, JDBC Server
| JDBC driver || latest version of JDBC driver (JDK15) for the database in use
| JDBC driver || latest version of JDBC driver (JDK17) for the database in use
<!-- ------------------------------------------------------------------------------- ENDE Voraussetzungen ------------------------------------------------------------------------------- -->
<!-- ------------------------------------------------------------------------------- ENDE Voraussetzungen ------------------------------------------------------------------------------- -->

Revision as of 11:52, 16 December 2021


DGS version DGS-3_8_1_661 or higher
DGS Plugins HVS32Client, JDBC Server
JDBC driver latest version of JDBC driver (JDK17) for the database in use

Description of functions

The DataGatewayServer (DGS) selects the data records to be processed from the polling table at a configurable interval (default 1000 ms) and transmits them to the HVS32 Client for processing. The data records are selected on the basis of the control field HVS32Verarbeitet (value = 0).
By means of the control field HVS32Funktion, the DGS is informed which function is to be executed for the selected data record.

After the data set has been processed by the HVS32, the feedback is given. Thereby, the value HVS32Verarbeitet is set to the value 1. If an error should have occurred in the HVS32 during processing, e.g. "The route could not be determined!", the field HVS32Fehler is additionally set to the value 1 and the error text in HVS32Fehlertext1 + HVS32Fehlertext2 is reported back.

Further "subrequests / -responses" can be configured for the request and response. These SQLs are additionally executed and the data is enriched with the main request / response. For each request/response and subrequest/response, the SQL can be individually adapted and a different database source can be configured.

In addition, it is possible to configure a Fall Back, which is executed as soon as the request or response fails. For example, if an incorrect data type (alphanumeric instead of numeric values) is transmitted in the request control character or in the response. Furthermore, the case back can be used if no HVS32 clients are connected to the DGS. This is to prevent incorrect data records from being selected again and again and thus running into errors again.

Control section

The control section is used to define which action is to be carried out with the data set from the database.

Field name Field name english translation Type Max length Decimal places Assignment
ID Integer - - Unique number to identify the record (autocounter).
HVS32Funktion HVS32Function Integer - - The function number to be executed in HVS32 for the record.

1 = VersandDatenAnfrage (en: shipping data request)
2 = VerladeVersandDaten (en: load shipping data)
3 = UpdateVersandDaten (en: update shipping data)
4 = StornoVersandDaten (en: cancel shipping data)
5 = Tagesabschluss (en: daily closing)
6 = VersandDatenPruefAnfrage (en: verify shipping data request)
7 = AnonymisiereVersandDaten (en: anonymise shipping data)

HVS32Verarbeitet HVS32Processed Integer - - Set to 1 after processing in HVS32. Records are selected based on this field.
HVS32Fehler HVS32Error Integer - - If the record has been processed in HVS32 and an error occurred, this value is set to 1.
HVS32Fehlertext1 HVS32Errortext1 String 200 - Error text in case of error
HVS32Fehlertext2 HVS32Errortext2 String 200 - Error text in case of error

Available HVS32 functions

Package processing (VersandDatenAnfrage)

The gateway function VersandDatenAnfrage is sent from the data gateway server in automatic polling mode to the HVS32 to generate and post a label for a package. A label is identified for all further functions such as cancellation, loading release, etc. by means of the package ID on the host side. This is transferred in the PackstueckID field and must therefore be unique within the shipping system.

Article and dangerous goods data should each be realised in a separate table with a 1:n relation to the package table. The relation of the tables can be done, for example, via the ID from the Control section.

Interface Field Description

Load/release package (VerladeVersandDaten)

The gateway function VerladeVersandDaten is sent from the data gateway server in automatic polling mode to the HVS32 in order to release packages for outgoing. Only packages that have been released for exit are taken into account for the daily closing.

Interface Field Description

Update package data (UpdateVersandDaten)

The gateway function UpdateVersandDaten is sent from the data gateway server in automatic polling mode to the HVS32 to change the data of existing packages. This request is sent, for example, if the value of goods for a package is only known at a later time. A search is always made via the PackstueckID field and, if occupied, also via the TrackingNr field. With this request, however, the fields and contents to be updated are no longer checked according to the carrier's guidelines (e.g. weight limits, etc.). The upstream system must therefore ensure that the values to be updated comply with the carrier's guidelines. If this is not possible, this function cannot be used and the label must be cancelled and processed again. In addition, fields that have already been printed on a label or determined by the HVS32 dispatch system in a carrier processing (e.g. address, route, tracking no., special services, etc.) cannot be manipulated.

Interface Field Description

Cancel package (StornoVersandDaten)

The gateway function StornoVersandDaten is sent from the data gateway server in automatic polling mode to the HVS32 in order to cancel existing packages there that are not yet on an outgoing list. As a rule, a package is cancelled on the basis of the package ID on the host side. This is transferred in the Packing unit ID field. In addition to the host-side package ID, the tracking number can also help to identify the package, in case the host-side package ID cannot guarantee uniqueness.

Interface Field Description

Verify package data (VersandDatenPruefAnfrage)

The Gateway sends the VersandDatenPruefAnfrage to the automatic polling of the HVS32. A dispatch data request is thus simulated in the HVS32. No labels are printed and the package or label is not booked, but all other processes are identical to the shipping data request (route determination, tracking number determination, address check, etc.) This function is used to validate all shipping data in advance.

Article and dangerous goods data should each be realised in a separate table with a 1:n relation to the package table. The relation of the tables can be done, for example, via the ID from the Control section.

Interface Field Description

Anonymise package data (AnonymisiereVersandDaten)

The gateway sends the AnonymisiereVersandDaten to the automatic polling of the HVS32. In the HVS32, customer-related data is thus anonymised for the corresponding data record in accordance with the DSGVO. This anonymisation is irrevocably and finally carried out at the database level of the dispatch system. A recovery of the original data is therefore no longer possible. Log files, confirmation files, already transmitted carrier data transmission etc. are not affected by this. Only packages and consignments that have already been completed on a daily basis can be anonymised.

Interface Field Description

Daily Closing (Tagesabschluss)

The gateway sends the daily closing request to the automatic polling of the HVS32. A daily closing is thus triggered in the HVS32 on the basis of the additionally transferred parameters. The daily closing consists of the items Generate Outgoing List and Create carrier EDI. Only packages that have been released for exit are taken into account for the daily closing. By default, all packages are released unless they have been blocked by the output scanning extension module. The feedback in the HVS32 takes place after the daily closing has been executed. No package/shipment data is available for feedback.

Interface Field Description


Please note that the following scripts are only an aid from our side. The administration of the database is the responsibility of the customer.
Field names /-lengths /-formats or table names can differ in principle, but in this case must be considered/analysed individually.

CREATE TABLE polling_packstueck (
        -- Steuerungsteil
        ID bigint(20) unsigned NOT NULL auto_increment,
        HVS32Funktion int(10) unsigned NOT NULL default 1,
        HVS32Verarbeitet int(1) unsigned NOT NULL default 0,
        HVS32Fehler int(1) unsigned NOT NULL default 0,
        HVS32Fehlertext1 varchar(200) default NULL,
        HVS32Fehlertext2 varchar(200) default NULL,
        -- Sendungsteil
        KundenNr varchar(20) default NULL,
        ZielAdrName1 varchar(50) NOT NULL,
        ZielAdrName2 varchar(50) default NULL,
        ZielAdrName3 varchar(50) default NULL,
        ZielAdrStrasse varchar(50) NOT NULL,
        ZielAdrLKZ varchar(5) NOT NULL,
        ZielAdrPLZ varchar(10) NOT NULL,
        ZielAdrOrt varchar(50) NOT NULL,
        ZielAdrRegion varchar(20) default NULL,
        ZielAdrBahnhof varchar(30) default NULL,
        Ansprechpartner varchar(20) default NULL,
        TelefonNr varchar(20) default NULL,
        FaxNr varchar(20) default NULL,
        UstIDNr varchar(20) default NULL,
        ILNNr varchar(20) default NULL,
        AuftraggeberID varchar(10) NOT NULL,
        VersandartID varchar(10) NOT NULL,
        AVISHinweis1 varchar(30) default NULL,
        AVISHinweis2 varchar(30) default NULL,
        AVISZusatz1 varchar(20) default NULL,
        AVISZusatz2 varchar(20) default NULL,
        LieferscheinNr varchar(40) NOT NULL,
        AuftragNr varchar(20) default NULL,
        BestellNr varchar(20) default NULL,
        Warenwert decimal(18,2) default NULL,
        WWWaehrung varchar(3) default NULL,
        Nachnahme decimal(18,2) default NULL,
        NNWaehrung varchar(3) default NULL,
        NNVermerk varchar(1) default NULL,
        NNVerwendung varchar(30) default NULL,
        Versicherungswert decimal(18,2) default NULL,
        VWWaehrung varchar(3) default NULL,
        FrankaturKennung varchar(10) default NULL,
        Zahlungsbedinung varchar(10) default NULL,
        ZBZoll varchar(1) default NULL,
        FrachtfuehrerKDNr varchar(10) default NULL,
        Sonderdienste varchar(30) default NULL,
        SendungsInhalt varchar(30) default NULL,
        TerminArt varchar(1) default NULL,
        TerminDatum varchar(10) default NULL,
        TerminZeit varchar(5) default NULL,
        NeutabsenderName1 varchar(30) default NULL,
        NeutabsenderName2 varchar(30) default NULL,
        NeutabsenderName3 varchar(30) default NULL,
        NeutabsenderStrasse varchar(30) default NULL,
        NeutabsenderLKZ varchar(3) default NULL,
        NeutabsenderPLZ varchar(10) default NULL,
        NeutabsenderOrt varchar(30) default NULL,
        RechnungsEmpfName1 varchar(50) default NULL,
        RechnungsEmpfName2 varchar(50) default NULL,
        RechnungsEmpfName3 varchar(50) default NULL,
        RechnungsEmpfStr varchar(50) default NULL,
        RechnungsEmpfLKZ varchar(5) default NULL,
        RechnungsEmpfPLZ varchar(10) default NULL,
        RechnungsEmpfOrt varchar(50) default NULL,
        PostLeitcode varchar(15) default NULL,
        PostZielFrachtzent varchar(5) default NULL,
        FrachtBrief varchar(20) default NULL,
        -- Packstueckteil
        Gewicht decimal(8,3) default NULL,
        NettoGewicht decimal(8,3) default NULL,
        PackStkGes int(10) unsigned default NULL,
        PackStkNr int(10) unsigned default NULL,
        Verpackungsart varchar(6) default NULL,
        PackstueckLaenge int(10) unsigned default NULL,
        PackstueckBreite int(10) unsigned default NULL,
        PackstueckHoehe int(10) unsigned default NULL,
        Packplatz varchar(10) default NULL,
        PackstueckID varchar(15) NOT NULL,
        -- Rückmeldung
        TrackingNr  varchar(35) default NULL,
        VersandSendungsNr varchar(20) default NULL,
        DruckDateTime varchar(20) default NULL,
        AusgangDateTime varchar(10) default NULL,
        Gebuehr decimal(8,3) default NULL, 
        GebuehrWaehrung varchar(3) default NULL,
        -- Primärschlüssel
        PRIMARY KEY (ID)

CREATE TABLE polling_packstueck (
        -- Steuerungsteil
        ID bigINT IDENTITY(1,1) NOT NULL,
        HVS32Funktion INT NOT NULL default 1,
        HVS32Verarbeitet INT NOT NULL default 0,
        HVS32Fehler INT NOT NULL default 0,
        HVS32Fehlertext1 VARCHAR(200) default NULL,
        HVS32Fehlertext2 VARCHAR(200) default NULL,
        -- Sendungsteil
        KundenNr VARCHAR(20) default NULL,
        ZielAdrName1 VARCHAR(50) NOT NULL,
        ZielAdrName2 VARCHAR(50) default NULL,
        ZielAdrName3 VARCHAR(50) default NULL,
        ZielAdrStrasse VARCHAR(50) NOT NULL,
        ZielAdrLKZ VARCHAR(5) NOT NULL,
        ZielAdrPLZ VARCHAR(10) NOT NULL,
        ZielAdrOrt VARCHAR(50) NOT NULL,
        ZielAdrRegion VARCHAR(20) default NULL,
        ZielAdrBahnhof VARCHAR(30) default NULL,
        Ansprechpartner VARCHAR(20) default NULL,
        TelefonNr VARCHAR(20) default NULL,
        FaxNr VARCHAR(20) default NULL,
        UstIDNr VARCHAR(20) default NULL,
        ILNNr VARCHAR(20) default NULL,
        AuftraggeberID VARCHAR(10) NOT NULL,
        VersandartID VARCHAR(10) NOT NULL,
        AVISHinweis1 VARCHAR(30) default NULL,
        AVISHinweis2 VARCHAR(30) default NULL,
        AVISZusatz1 VARCHAR(20) default NULL,
        AVISZusatz2 VARCHAR(20) default NULL,
        LieferscheinNr VARCHAR(40) NOT NULL,
        AuftragNr VARCHAR(20) default NULL,
        BestellNr VARCHAR(20) default NULL,
        Warenwert NUMERIC(18,2) default NULL,
        WWWaehrung VARCHAR(3) default NULL,
        Nachnahme NUMERIC(18,2) default NULL,
        NNWaehrung VARCHAR(3) default NULL,
        NNVermerk VARCHAR(1) default NULL,
        NNVerwendung VARCHAR(30) default NULL,
        Versicherungswert NUMERIC(18,2) default NULL,
        VWWaehrung VARCHAR(3) default NULL,
        FrankaturKennung VARCHAR(10) default NULL,
        Zahlungsbedinung VARCHAR(10) default NULL,
        ZBZoll VARCHAR(1) default NULL,
        FrachtfuehrerKDNr VARCHAR(10) default NULL,
        Sonderdienste VARCHAR(30) default NULL,
        SendungsInhalt VARCHAR(30) default NULL,
        TerminArt VARCHAR(1) default NULL,
        TerminDatum VARCHAR(10) default NULL,
        TerminZeit VARCHAR(5) default NULL,
        NeutabsenderName1 VARCHAR(30) default NULL,
        NeutabsenderName2 VARCHAR(30) default NULL,
        NeutabsenderName3 VARCHAR(30) default NULL,
        NeutabsenderStrasse VARCHAR(30) default NULL,
        NeutabsenderLKZ VARCHAR(3) default NULL,
        NeutabsenderPLZ VARCHAR(10) default NULL,
        NeutabsenderOrt VARCHAR(30) default NULL,
        RechnungsEmpfName1 VARCHAR(50) default NULL,
        RechnungsEmpfName2 VARCHAR(50) default NULL,
        RechnungsEmpfName3 VARCHAR(50) default NULL,
        RechnungsEmpfStr VARCHAR(50) default NULL,
        RechnungsEmpfLKZ VARCHAR(5) default NULL,
        RechnungsEmpfPLZ VARCHAR(10) default NULL,
        RechnungsEmpfOrt VARCHAR(50) default NULL,
        PostLeitcode VARCHAR(15) default NULL,
        PostZielFrachtzent VARCHAR(5) default NULL,
        FrachtBrief VARCHAR(20) default NULL,
        -- Packstueckteil
        Gewicht NUMERIC(8,3) default NULL,
        NettoGewicht NUMERIC(8,3) default NULL,
        PackStkGes INT default NULL,
        PackStkNr INT default NULL,
        Verpackungsart VARCHAR(6) default NULL,
        PackstueckLaenge INT default NULL,
        PackstueckBreite INT default NULL,
        PackstueckHoehe INT default NULL,
        Packplatz VARCHAR(10) default NULL,
        PackstueckID VARCHAR(15) NOT NULL,
        -- Rückmeldung
        TrackingNr  VARCHAR(35) default NULL,
        VersandSendungsNr VARCHAR(20) default NULL,
        DruckDateTime VARCHAR(10) default NULL,
        AusgangDateTime VARCHAR(10) default NULL,
        Gebuehr NUMERIC(8,3) default NULL, 
        GebuehrWaehrung VARCHAR(3) default NULL,
        AusgangslisteNr INT default NULL

FAQ / Troubleshooting