DAXP – Java Implementation

The following examples demonstrate the DAXP protocol implemented in Java.

Repositories:

 

 

Example 1 – Attribute Dictionary

Description:
Request the Customer Service (daxp-core-test) for the field dictionary and message definitions.

Request (GET): http://localhost:8080/daxp/get

BODY: DAXP=1|TF=DEC|EN=UTF8|9=DR|99=123

OR URL: http://localhost:8080/daxp/get?msg_type=DR

 

Response (Field Dictionary):

DAXP=1|TF=DEC|EN=UTF8|9=DD|6=10|
7=1|209=Id customer|100=2001|110=?|
7=2|209=First name|100=2002|165=N|110=S|
7=3|209=Surname|100=2003|110=S|
7=4|209=Email|100=2004|110=S|
7=5|209=Town|100=2005|110=S|
7=6|209=Telephone|100=2006|110=S|
7=7|209=Id|100=2201|110=?|
7=8|209=Amount|100=2202|165=N|110=?|
7=9|209=Contract No|100=2203|165=N|166=20|167=2|110=S|
7=10|209=Status|100=2205|110=C|
99=123|

 

Example 2 – Customer List

Description:
Request the Customer Service (daxp-core-test) for a list of customers.

Request (GET): http://localhost:8080/daxp/get

Body: DAXP=1|TF=DEC|EN=UTF8|9=CRM.DR|99=123

 

Response (Customer Data List):

DAXP=1|TF=DEC|EN=UTF8|9=CRM.DD|6=3|
7=1|2001=1|2002=John|
7=2|2001=2|2002=Anna|2004=This email address is being protected from spambots. You need JavaScript enabled to view it.|2006=+48 123 456 789|
7=3|2001=3|2002=Robert|2003=Homa|2004=This email address is being protected from spambots. You need JavaScript enabled to view it.|
99=123|

 

Example 3 – Create a New Customer

Description:
Send a request to create a new customer.

Request (POST): http://localhost:8080/daxp/post

Body: DAXP=1|TF=DEC|EN=UTF8|9=UCi|2002=Any2name|2003=Any2Surname|2005=1990|
2011=This email address is being protected from spambots. You need JavaScript enabled to view it.|2073=+4812345598|99=211|

 

Response (New Customer Created):

DAXP=1|TF=DEC|EN=UTF8|9=CRM.DD|2001=7|2002=Any2name|2003=Any2Surname|2005=1990|99=123|