Test Datahub Locally

Test datahub – single file

To test submitting a single idoc. You will need Postman on chrome.
Switch it to “POST”.
Click Authorization tab
Select Basic Auth for Type
Enter the Username and Password

Click Body tab
Select raw radial and XML(text/xml)

You can then add the xml. Here is the sample xml
<?xml version="1.0" encoding="utf-8"?>

<COND_A04>

  <IDOC BEGIN="1">

    <EDI_DC40 SEGMENT="1">

      <TABNAM>EDI_DC40</TABNAM>

      <MANDT>140</MANDT>

      <DOCNUM>0000000000649403</DOCNUM>

      <DOCREL>750</DOCREL>

      <STATUS>30</STATUS>

      <DIRECT>1</DIRECT>

      <OUTMOD>2</OUTMOD>

      <IDOCTYP>COND_A04</IDOCTYP>

      <MESTYP>COND_A</MESTYP>

      <SNDPOR>SAPDE2</SNDPOR>

      <SNDPRT>LS</SNDPRT>

      <SNDPRN>DE2CLNT140</SNDPRN>

      <RCVPOR>DEV2DHUB</RCVPOR>

      <RCVPRT>LS</RCVPRT>

      <RCVPRN>DEV2DHUB</RCVPRN>

      <CREDAT>20160817</CREDAT>

      <CRETIM>135429</CRETIM>

      <SERIAL>20160817135429</SERIAL>

    </EDI_DC40>

    <E1KOMG SEGMENT="1">

      <KVEWE>A</KVEWE>

      <KOTABNR>913</KOTABNR>

      <KAPPL>V</KAPPL>

      <KSCHL>ZDCP</KSCHL>

      <VAKEY>US 300008000000000020570001</VAKEY>

      <VKORG>1000</VKORG>

      <VTWEG>10</VTWEG>

      <KDGRP>WA</KDGRP>

      <MATNR>000000000030050001</MATNR>

      <EVRTP>00000</EVRTP>

      <LAND1>US</LAND1>

      <POSNR>000000</POSNR>

      <ANZSN>0000000000</ANZSN>

      <VAKEY_LONG>US 300008000000000020570001</VAKEY_LONG>

      <MATNR_LONG>000000000030050001</MATNR_LONG>

      <E1KOMG1 SEGMENT="1">

        <VAKEY_255>US 300008000000000020570001</VAKEY_255>

        <VAKEY_VERSION>00</VAKEY_VERSION>

      </E1KOMG1>

      <E1KONH SEGMENT="1">

        <KNUMH>0000029227</KNUMH>

        <DATAB>20160817</DATAB>

        <DATBI>99991231</DATBI>

        <E1KONP SEGMENT="1">

          <KSCHL>ZDCP</KSCHL>

          <STFKZ>A</STFKZ>

          <KSTBM>0.000</KSTBM>

          <KSTBW>0.00</KSTBW>

          <KRECH>C</KRECH>

          <KBETR>2.03</KBETR>

          <KONWA>USD</KONWA>

          <KPEIN>1</KPEIN>

          <KMEIN>EA</KMEIN>

          <KUMZA>0</KUMZA>

          <KUMNE>0</KUMNE>

          <MXWRT>0.00</MXWRT>

          <GKWRT>0.00</GKWRT>

          <KWAEH>USD</KWAEH>

          <ZAEHK_IND>01</ZAEHK_IND>

          <KBRUE>0.00</KBRUE>

          <VALTG>00</VALTG>

          <VALDT>00000000</VALDT>

          <ANZAUF>00</ANZAUF>

          <MIKBAS>0.000</MIKBAS>

          <MXKBAS>0.000</MXKBAS>

          <KOMXWRT>0.00</KOMXWRT>

          <KLF_STG>0000</KLF_STG>

          <KLF_KAL>0000</KLF_KAL>

          <ZAEHK_IND_LONG>001</ZAEHK_IND_LONG>

        </E1KONP>

      </E1KONH>

    </E1KOMG>

  </IDOC>

</COND_A04>


Test datahub – multiple files

You will need some test files.

put one or more of the TXT files in the “incoming” directory created above on your machine.

The files will automatically be picked up from the file and processed. The file is then placed in the archive directory you created.


Setup Debugger with Intellij
1.      Open the startup script in (your_tomcat_home)/bin (WIN: startup.bat, UNIX: startup.sh)
2.      Add the following lines at the first blank line in the file
3.      For Windows add:
set JPDA_ADDRESS=8000
set JPDA_TRANSPORT=dt_socket


4.      For UNIX:
export JPDA_ADDRESS=8000
export JPDA_TRANSPORT=dt_socket

5.      Change the execute line at the end to include jpda start
6.      For WIN:
call "%EXECUTABLE%" jpda start %CMD_LINE_ARGS%

7.      UNIX:
exec "$PRGDIR"/"$EXECUTABLE" jpda start "$@"

8.      Run the startup script when starting tomcat to run tomcat in debug mode(for unix:  ./startup.sh)
9.      In Intellij, open Run/Debug Configurations
10.    Click the plus sign
11.    Click “Remote” (Do not use the Tomcat one)
12.    Change the port to 8000
13.   

With your tomcat running you can then run this debugger and it will connect.

Comments

Post a Comment

Popular Posts