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

How to implement complex microservices? [closed]
seek bar for resize of border between 1 to 20 pixels?
sort function in Java collections
Cannot get information from the object when it is changed in the object in Client-Server Java program
Java Spring Bean error
gravity form generate signature in java
is there a new variable created each time in loop?
Maven-failsafe-plugin: skipTests configuration does not work for Spring Boot 1.4 integration tests
How can a java proxy handle “https” requests to multiple hosts?
How to share credentials between `java.net` and `org.apache.http.HttpClient`
Java log4J with multiple file, and need to remove instance name from logfile
android Clear Button in a simple counter
Why is DialogPreference.needInputMethod() hidden?
Best algorithm to find intersection and overlapping of ranges and storing the resultant range set
how to create frequency table (array of integers)
How to solve java.net.BindException: Address already in use

Categories

HOME
variables
coq
drivers
kde
relative-path
syntax
webpack-2
append
add
gorm
communication
zend-framework3
messages
quickfix
predix
pass-by-reference
captiveportal
microsoft-r
blazemeter
chromebook
social-media
typo3-6.2.x
msys2
unboundid
flink-streaming
nat
kendo-ui-grid
catch-all
android-kernel
picasso
ios5
bitbucket-pipelines
automake
gesture
serverside-rendering
vapor
android-fingerprint-api
streamreader
azure-ml
greenrobot-eventbus
gulp-sourcemaps
quadratic-programming
janrain
firebase-admin
arena-simulation
s
angular2-meteor
xml-documentation
smartcontracts
youcompleteme
atomicity
paxos
celery-task
alphabet
return-value
namecoin
orthogonal
synchronous
background-service
slicknav
ado.net-entity-data-model
trash
rvest
goose
fouc
citrus-pay
inmobi
device-orientation
typekit
tt-news
mechanize-ruby
page-layout
soundtouch
tws
http-unit
hamiltonian-cycle
trusted
bluepill
buildr
ohm
adk
hirefire
joyent
propagation
mongomapper
ext3
perfect-hash
kdbg
wsdl.exe
3gp

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