java


I want to write web service in java which will fetch the mail from my mailbox with my credentials [on hold]


I am new to web services want to learn more here I wanted to write the web services which will help me to fetch the emails from my inbox. so want to ask which type of web service should I write or from where should I start. Actually, before this, I created the web services which fetches and stores the data into the database.
following code is which I use for fetching data from the database.
#POST
#Path("signup")
#Consumes(MediaType.APPLICATION_FORM_URLENCODED)
#Produces(MediaType.TEXT_HTML)
public Viewable signup(#FormParam("userName") String userName,
#FormParam("password") String password,
#FormParam("firstName") String firstName,
#FormParam("lastName") String lastName,
#FormParam("dateOfBirth") String dateOfBirth,
#FormParam("emailAddress") String emailAddress) throws
ParseException {
Student student = new Student();
student.setUserName(userName);
student.setPassword(password);
student.setFirstName(firstName);
student.setLastName(lastName);
student.setDateOfBirth(new java.sql.Date(new
SimpleDateFormat("MM/dd/yyyy")
.parse(dateOfBirth.substring(0, 10)).getTime()));
student.setEmailAddress(emailAddress);
if(studentService.findByUserName(userName)) {
Map<String, Object> map = new HashMap<String, Object>();
map.put("message", "User Name exists. Try another user name");
map.put("student", student);
return new Viewable("/signup", map);
} else {
studentService.save(student);
return new Viewable("/login");
}
}
Service for saving details
#Transactional
public <S extends T> S save(S entity) {
if (this.entityInformation.isNew(entity)) {
this.em.persist(entity);
return entity;
} else {
return this.em.merge(entity);
}
}

Related Links

Trying to get includes working with AsciiDoc Java Interface
Java the best way of waiting & getting data from your client
JMeter Custom Java Client to Test Websocket Application
Using OR statment in condition sqlite database
Controll Java Swing Application over Bluetooth
Java logger better formatting
Limiting duplicate random numbers
How to fetch a <map> in Hibernate
Yaroslavskiy’s dual pivot quick sort algorithm
Checking the clipboard contents
Fetch Array of key values from Mongo collection using java
Passing cmd line arguments to specific method [duplicate]
error when use onClickListener in listActivity from SQLite DB
ObjectAnimator Choppy Scrolling
Manipulating a colored image in matrix form in java
Ensure that Groovy ArrayList objects are of the same class

Categories

HOME
cakephp
multithreading
date
gitlab
netbeans
minimum-spanning-tree
tesseract
alfresco
frameworks
jpeg
ezpublish
yum
wamp
flyway4
autotools
kentor-authservices
timeout
static-libraries
fortumo
decimal
clearcase-ucm
serilog
emulator
paging
one-hot-encoding
mps
sox
core-text
apache-commons-io
internet-explorer-9
social-media
newline
ecto
exuberant-ctags
pdb
usbserial
mpmediaquery
fusionpbx
multilingual
neuroscience
theano.scan
unobtrusive-validation
elasticsearch-plugin
tasker
http-redirect
taffy
return-value
recursive-datastructures
sqlclient
magma
nbconvert
smart-table
time-and-attendance
qgraphicsview
natvis
pervasive-sql
simple-framework
wyam
0xdbe
graph-api-explorer
nsmutabledictionary
dia
tt-news
onactivityresult
heisenbug
tld
p4java
jubula
android-2.2-froyo
transcoding
oracle-warehouse-builder
industrial
ivyde
coverflow
yui-compressor
interface-orientation
limejs
referrer
armcc
dbproviderfactories
getmessage
data-loss
spyware
android-sdk-2.1
sql-server-profiler
html-input
cxxtest
getresponsestream
meego
boost-smart-ptr
dbisam

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App