sockets - Communicating Between Java SE and Java EE Applications -


i have 2 applications: java se application , java ee application. java ee application being run on glassfish server. want send data in form of json java se application java ee application. want both programs running on same computer. json sent identify student_id, student_name, instructor_name, school_name, course_name, absent_days, tardy_days, , total_grade. on top of want java ee application parse json received , send java db (derby) database table called reports. have never done before , confused in regard how go it. have been trying figure out general problem on month. can please me. 1. first of all, use socket, http post request, or combination of two? 2. in java ee program place code receives socket or post request?

json object sent java se application: {“student_id”:  “123456789”,  “student_name: “bart simpson”,    “instructor_name”: “professor xavier”,   “school_name”: “xavier high school”,   “course_name”: “eng12per1”,   “absent_days_num”: “0”,   “tardy_days_num”: “1”,   “total_grade”: “92.5”} 

one approach accomplish need creating web services on java ee application (rest recommended), take article familiarized rest concepts http://www.javacodegeeks.com/2014/11/an-introduction-to-rest.html. you'll find several tutorials create web services rest , glassfish.

after have running web services, you'll need adapt java se application client application consume web services. see other article http://www.javacodegeeks.com/2012/09/simple-rest-client-in-java.html


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -