Web Services or Servlet?

H

Homer

Hi All,

I have following scenarios:

An application running on some server (inside our Intranet) is sending
our server a request including 5 fields of data (volume is ~1000 per
day) and our server is suppose to do some calculation and return back a
two field data.

This sounds like a good example of Web Service/SOAP scenario but I
don't really want to complicate things with Application Server,
Deploy and etc.
Do you think I should simplify it with Servlet or something or should I
stay with Web Services?


Thanks in advance,

Homer
 
T

Timo Stamm

Homer said:
Hi All,

I have following scenarios:

An application running on some server (inside our Intranet) is sending
our server a request including 5 fields of data (volume is ~1000 per
day) and our server is suppose to do some calculation and return back a
two field data.

Encode the 5 data fields in the HTTP request parameter. The server can
return the 2 fields separated by a line feed. This will only take a few
lines of code.

Web service stuff as described on java.sun.com/webservices is total
overkill for this application. Keep it simple.


Timo
 
D

Dimitri Maziuk

Homer sez:
Hi All,

I have following scenarios:

An application running on some server (inside our Intranet) is sending
our server a request including 5 fields of data (volume is ~1000 per
day) and our server is suppose to do some calculation and return back a
two field data.

This sounds like a good example of Web Service/SOAP scenario but I
don't really want to complicate things with Application Server,
Deploy and etc.
Do you think I should simplify it with Servlet or something or should I
stay with Web Services?

--> http://our.server/app.cgi?param1=x&param2=y&param3=z...
<-- (text/xml) <tag1>val1</tag1><tag2>val2</tag2> (for example)

Can do this in perl :)CGI), php, shell, or anything -- no need to
bring in the servlet container and JVM either.

Dimitri
 
M

Mike Schilling

Homer said:
Hi All,

I have following scenarios:

An application running on some server (inside our Intranet) is sending
our server a request including 5 fields of data (volume is ~1000 per
day) and our server is suppose to do some calculation and return back a
two field data.

This sounds like a good example of Web Service/SOAP scenario but I
don't really want to complicate things with Application Server,
Deploy and etc.

You don't need a full J2EE application server to run a web service. A
servlet running inside a servlet container (e.g. Tomcat) can implement a web
service, and there are a number of tools for building such a thing, e.g.
Axis.
 
H

Homer

Thanks all for your replies.

They want it to be Java anyway.

I will give Axis a try and then decide between Servlet or Web
Services/Axis.
WebServices (like everything else in J2EE) is too complicate for what
is does (maybe because I am coming from Corba background) but I use
Jbuilder and it does pretty much everything for you.
 
M

Mark Space

Homer said:
Thanks all for your replies.

They want it to be Java anyway.

I'm confused. They want Java, or they want a web service / servlet?

I don't see the need for a full web service for five little fields. Can
you just open a socket with java and stuff five fields down the pipe?
There server will need a deamonized Java program listening on a port,
but that's just as easy. Put the configuration info inside the JAR file
as a resource, and you're done.

'Course, I could be wrong about what you are trying to do....
 
T

Tomek

Hi,
If you want to use something simple without conifg/depyoment problem,
axis isn't a good choise. Try something like XFire (
http://xfire.codehaus.org ).
I also don't agree that webservice is an overkill, it makes some stuff
simpler. You don't have to parse any http request, you just create POJO
with functionality you want to expose and write 1 file which tells what
object you want to expose ( looks simpler to me then parsing requests
and you don't have to write any webserwice related code ). Performace
isn't also a problem if you use Stax based websersice engines like
XFire or Axis 2.

You don't need to use full J2EE server, anything able to run servlet
is enough, like tomcat, orion or jetty. ( you can even run it as
standalone app, sice XFire can use emeded jetty server :)

Homer napisal(a):
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top