Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2006

Tip: Looking for answers? Try searching our database.

Web Services or Servlet?

Thread view: 
Homer - 29 Jun 2006 16:14 GMT
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
Timo Stamm - 29 Jun 2006 16:34 GMT
Homer schrieb:
> Hi All,
>
[quoted text clipped - 4 lines]
> 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
Dimitri Maziuk - 29 Jun 2006 17:01 GMT
Homer sez:
> Hi All,
>
[quoted text clipped - 10 lines]
> 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
Signature

... If you want to make sure you don't put a Pig in a List of airplanes and
have it fail at insertion rather than extraction, use
planelist.add((Airplane)o) instead of planelist.add(o).  It's that easy.
                                                    -- Mark 'Kamikaze' Hughes

Mike Schilling - 29 Jun 2006 18:32 GMT
> Hi All,
>
[quoted text clipped - 8 lines]
> 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.
Homer - 30 Jun 2006 13:44 GMT
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.

> > Hi All,
> >
[quoted text clipped - 13 lines]
> service, and there are a number of tools for building such a thing, e.g.
> Axis.
Mark Space - 01 Jul 2006 07:37 GMT
> 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....

> I will give Axis a try and then decide between Servlet or Web
> Services/Axis.
[quoted text clipped - 18 lines]
>> service, and there are a number of tools for building such a thing, e.g.
>> Axis.
Tomek - 03 Jul 2006 15:04 GMT
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):
> Thanks all for your replies.
>
[quoted text clipped - 23 lines]
> > service, and there are a number of tools for building such a thing, e.g.
> > Axis.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.