> 1. I am confused that how come tomcat itself is already a webserver,
> why would people use it on top of apache http server, which is another
> web server?
Apache HTTPD in front of Tomcat is not needed but sometimes
preferred.
Examples of reasons:
- serving non JSP content like PHP
- load balancing over multiple Tomcat
- usage of hardware SSL accelerator
> 2. To create a web services, (I am thinking of the .net web services
> that i have done - that once you deploy it with IIS, and you browse to
[quoted text clipped - 4 lines]
> include those textboxes yourself, and do a manual post to the web
> services address?
Web services are by definition something that is called by programs
not browsers.
.NET has this nice little test feature. I do not belive Axis
offers that service.
You do not do a manual post - you let Axis generate a stub
and call that.
> 3. Are there any book out there, explains how to use tomcat for
> webservices? I have looked thru some of the java books that talks about
> web services, they mainly explain what webservices are, what is
> xml..etc... and of course, they did talk about the differenct type of
> messaging format available. (JAX-RPC..etc..)
Axis comes with docs about how to use it.
> 4. In the java world - how do you use webservices? Is it the same way
> that i am familiar with? Like, that we have a front end gui, that it
> will call the web services, pass it a few param, and get the xml result
> back, and parse it and display / store.. it? Or that is not the correct
> way to consume the web services in java world?
Using web services in java and .NET is more or less the same.
You deploy your web service code. The container generates all
the extra stuff on the server side. For the client side you generate
a stub and call that.
Neither in Java or .NET you usuall parse the SOAP XML yourself.
> 5. In .net - as long as i have the .net framework sdk, and a IIS - i am
> good to go. In java - what do i need in order to deploy a web
> services?? I already have tomcat / jdk / wsdp / IDE - do i have enough
> to create a simple ws? if so, can you show me a basic tutorial??
You need:
* JDK (to compile your code and run Tomcat)
* Tomcat (or another servlet container)
* Axis (either to deploy as a the axis web app or to grab pieces and
deploy as your own web app)
IDE is optional.
JWSDP is an alternative to Axis.
> based on some reading, i understand that the ws on the service side,
> needs an SEI implementing java.rmi.remote, and we need another class
[quoted text clipped - 5 lines]
> at the code, to get a better understand, what is the relationship
> between each of these softwares (tomcat, apache http server, axis...)
You do not need to think about all that. You just write your web service
logic and deploy it.
The Axis guide do have examples.
Arne
yekasi@gmail.com - 23 Aug 2006 19:35 GMT
> > 1. I am confused that how come tomcat itself is already a webserver,
> > why would people use it on top of apache http server, which is another
[quoted text clipped - 7 lines]
> - load balancing over multiple Tomcat
> - usage of hardware SSL accelerator
What are come reasons that you will need multiple of Tomcat? Doesnt
tomcat allow you to deploy multiple servlet / applications?
> > 2. To create a web services, (I am thinking of the .net web services
> > that i have done - that once you deploy it with IIS, and you browse to
[quoted text clipped - 13 lines]
> You do not do a manual post - you let Axis generate a stub
> and call that.
Thats what I meant by "the browser", the test function... Do you konw
if WSDP generateds that test function? I am thinking of one situation,
that the test function page will come in handy..
Say, i developed a few web services, which are some basic arithmetic
addition / subtraction / mul / div..etc.. Say another developer wants
to call my ws, but he would like to see what is available for him to
use... I used to just give the other developer the link to the ws, and
he will see all methods available via the "browser test page". In java
world, what do you do when situations like that happen if the developer
wants to see it first, before any coding on his end??
> > 5. In .net - as long as i have the .net framework sdk, and a IIS - i am
> > good to go. In java - what do i need in order to deploy a web
[quoted text clipped - 10 lines]
>
> JWSDP is an alternative to Axis.
Am I right on this - that java ws must be deployed in a servlet
container? So, does that mean, java ws is a servlet itself? I followed
some tutorial in netbeans IDE 5.0 - which is to create a web services
and deploy it as servlet, but his example was using a sun app server. I
followed everything, except that I am using tomcat instead of sun app
server... when I try to run the ws - it complained that my class is not
a servlet. But in the code, there was nothing about inheriting anything
servlet class, it just implements the SEI, and java.rmi.remote... So
the webapp would not start..
A few more questions...
1. apache soap - based on some reading, it is also some package that
allow you to develop ws. Is that just the same thing as an alternative
from using JWSDP, Axis...?
2. WSDL - let say i am NOT using axis (i know axis comes with java2wsdl
and vice versa), are you suppose to write the wsdl yourself? Or the
container / IDE is capable generating that as well? If so, which one
will do it, and how do you generate the wsdl?
Thanks!
T
Arne Vajhøj - 24 Aug 2006 02:08 GMT
>>> 1. I am confused that how come tomcat itself is already a webserver,
>>> why would people use it on top of apache http server, which is another
[quoted text clipped - 9 lines]
> What are come reasons that you will need multiple of Tomcat? Doesnt
> tomcat allow you to deploy multiple servlet / applications?
Load balancing over Tomcat's running on multiple physical boxes
to achieve redundancy and horizontal scalability.
> Say, i developed a few web services, which are some basic arithmetic
> addition / subtraction / mul / div..etc.. Say another developer wants
[quoted text clipped - 3 lines]
> world, what do you do when situations like that happen if the developer
> wants to see it first, before any coding on his end??
Tell him to generate a stub and look at the code.
Or read the WSDL if he is hardcore.
> Am I right on this - that java ws must be deployed in a servlet
> container? So, does that mean, java ws is a servlet itself?
A web service need a permanent running server accepting HTTP requests.
I am not aware of any Java web service toolkit that does not
use a servlet.
No your web service is not a servlet. There are an Axis servlet
that dispatches to your web services.
> I followed
> some tutorial in netbeans IDE 5.0 - which is to create a web services
[quoted text clipped - 4 lines]
> servlet class, it just implements the SEI, and java.rmi.remote... So
> the webapp would not start..
Follow the Axis guide. Start with .jws file and go on to deploying
with .wsdd files.
> A few more questions...
>
> 1. apache soap - based on some reading, it is also some package that
> allow you to develop ws. Is that just the same thing as an alternative
> from using JWSDP, Axis...?
Apache SOAP is Axis version 0. Or Axis has replaced Apache SOAP.
> 2. WSDL - let say i am NOT using axis (i know axis comes with java2wsdl
> and vice versa), are you suppose to write the wsdl yourself? Or the
> container / IDE is capable generating that as well? If so, which one
> will do it, and how do you generate the wsdl?
I use Axis to generate WSDL. The .NET runtime generate the WSDL.
I would not use a web service toolkit that does not generate the WSDL.
(and you do not use java2wsdl with Axis - you let the Axis runtime
generate it)
Arne
tak - 24 Aug 2006 18:00 GMT
> > 2. WSDL - let say i am NOT using axis (i know axis comes with java2wsdl
> > and vice versa), are you suppose to write the wsdl yourself? Or the
[quoted text clipped - 6 lines]
> (and you do not use java2wsdl with Axis - you let the Axis runtime
> generate it)
I was able to generate the wsdl, and get the ws up and running using
axis (so easy to use). On the other hand - i would like to get more
understand on netbeans, and the ws without using axis.... i created a
web application, with a ws in it, using netbeans, and it compiles...
but i cannot seem to let me generate the wsdl document for me. How do
you generate wsdl document in netbeans?? inside the WEB-INF folder,
there is a wsdl folder, and it is empty...
ideas?
thanks,
T
Arne Vajhøj - 25 Aug 2006 04:13 GMT
> I was able to generate the wsdl, and get the ws up and running using
> axis (so easy to use). On the other hand - i would like to get more
[quoted text clipped - 3 lines]
> you generate wsdl document in netbeans?? inside the WEB-INF folder,
> there is a wsdl folder, and it is empty...
I do not use Netbeans.
I do not generate WSDL myself - I let Axis generate that
dynamicly.
Arne
tak - 28 Aug 2006 22:08 GMT
> > I was able to generate the wsdl, and get the ws up and running using
> > axis (so easy to use). On the other hand - i would like to get more
[quoted text clipped - 10 lines]
>
> Arne
One more question. What IDE do you use? or you do not use IDE? (Trying
to figure out what works best with axis.)
Thanks,
Tak
Arne Vajhøj - 29 Aug 2006 00:00 GMT
>> I do not use Netbeans.
> One more question. What IDE do you use? or you do not use IDE? (Trying
> to figure out what works best with axis.)
I use Eclipse for coding (used to be JBuilder).
But I do all the building and deploying with
ant scripts (outside Eclipse).
Arne