Clarification about Eclipse 3.4, Axis 2 and Tomcat 5.5

I've read about major webservice concepts and protocols (SOAP, WSDL) and i' ve build also some first webservices in eclipse with Axis 1 and 2. I 've had installed a Tomcat Application Server and to run webservices I've installed Apache Axis 2.

Eclipse supports the top-down and the botton-up processes to create webservices; there exists several wizard. If I start from a POJO and want to express this class as an webservice, then throught the specific wizard my webservice is created and deployed on Tomcat.

I've locked in my workspace to find the generated wsdl-file, but this file exists only on the server, and I've not found any local copy. Is this "works as designed"?

After the automatic creation of the specific webservice, my POJO looks still the same, there a no additional annotations. I've only found new files under the WEB-INF\services folder. Is this Axis specific, or exists there an specification ?

While searching for webservice-examples I've found also this snippet

I read that this snippet is JAX-WS, is this correct? How can I recognize it? All the examples which I used before were all simple POJO's or classes which I've created from an existing WSDL? Were they so JAX-RPC? This point is really unclear for me.

When I use an WSDL-File to create the specific Java Classes, then there are a lot of classes generated, like xyzCallbackHandler, xyzMessageRecieverInOut, xyzSkeleton, xyzSkeletonInterface, xyzStub? I don't 've read anything about them, and I'm asking myself "Does I really need them - I hope not ".

For the above snippet (MyWebService.java) I've found a another java-class which should be able to publish this Webserice:

The code which is commented is just another way to publish the service, both approaches don't work, or I'm not able to configure them correctly for my environment. If I execute the above code then I always get an (no 10) BindException, and no webserice is published on my server.

Does someone has an idea to solve this problem? If this would work, then I think that I don't need to deploy another EAR-file for this specific webservice. Is this assumption correct?

Christian Nicoll wrote:I've locked in my workspace to find the generated wsdl-file, but this file exists only on the server, and I've not found any local copy. Is this "works as designed"?

Yes. The web service stack can defer generation of the WSDL to deployment time.

After the automatic creation of the specific webservice, my POJO looks still the same, there a no additional annotations.

The annotations is the way you communicate your requirements to the web service stack in the same way as the annotations on EJBs or the web.xml deployment descriptor for servlets etc. In the days of JAX-RPC, it used to be an XML file and with JAX-WS you can still use XML deployment descriptors, either on their own or to override annotations.

I've only found new files under the WEB-INF\services folder. Is this Axis specific, or exists there an specification ?

Axis specific.

I read that this snippet is JAX-WS, is this correct? How can I recognize it?

The endpoint implementation class uses annotations. JAX-RPC does not use annotations but XML deployment descriptors, as before.

When I use an WSDL-File to create the specific Java Classes, then there are a lot of classes generated, like xyzCallbackHandler, xyzMessageRecieverInOut, xyzSkeleton, xyzSkeletonInterface, xyzStub? I don't 've read anything about them, and I'm asking myself "Does I really need them - I hope not ".

Yes you need them. With JAX-WS, the generated artifacts typically include JAXB bean classes to which XML data in requests and responses are bound, proxy and service classes which are used when sending requests to the service.

For the above snippet (MyWebService.java) I've found a another java-class which should be able to publish this Webserice:

The Endpoint class allows you to publish a service WITHOUT using a server, that is, the service will NOT be published in your server but in a standalone fashion.

You already have a server running that uses port 8080 and you try to start another server that also want to use port 8080.
Best wishes!

I want to thank you for your fast and well-founded answer. Further I find it quite incredible what you do for this Ranch, thanks a lot.

I tried to publish the Webservice with the Endpoint without an started server, but it receive several exceptions. I will investigate this problem first on my own, perhaps if I don't find the reason for those exceptions I'll then look for some help here.