File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes JAX-WS clarification Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "JAX-WS clarification" Watch "JAX-WS clarification" New topic
Author

JAX-WS clarification

Girish Vasmatkar
Ranch Hand

Joined: Apr 24, 2008
Posts: 199
Hello Guys,


I have a simple question.

What chganges do one needs to make in web.xml file while using JAX-WS. I mean, recently I one example that tells you to do this(assume this web service adds two given numbers)





Is it necessary to do these changes? Because some tutorials don't tell to specify the above mentioned servlet . As an example, I deployed a sample web service project that comes with Netbeans(Calculator web service) and when I see the web.xml file I don't see the servlet mapping for com.sun.xml.ws.transport.http.servlet.WSServlet.

2. Also I see another configuration file named sun-jaxws.xml in some of the tutorials. What is this file used for? Again some examples don't use this file.

Please bear with me as I jave just started using JAX-WS implementation for web service develpoment.


Thanks and Regards,
Girish.


Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
First of all, the servlet implementation class and the second deployment descriptor file you talk about are both specific to the GlassFish server and cannot be used with other servers.
When using JAX-WS, it is not necessary to use the web.xml deployment descriptor - rather you should rely on using annotations for configuration.
Yes, you can use the web.xml deployment descriptor but experimenting with it has caused at least me some hassle.
Thus, I recommend staying away from these files until you gain more knowledge.
I have written some about web service deployment in my SCDJWS study notes, if you are interested. They are available here on JavaRanch.
Best wishes!
Girish Vasmatkar
Ranch Hand

Joined: Apr 24, 2008
Posts: 199
Thanks Ivan for making things clear.

Some more questions.

Just after posting my first question in this thread I cam to know that the sun-jaxws.xml file is specific to metro project.

1.So does effectively mean that metro can not be used with other application servers or web servers other than glassfish?

2.Also how different is metro from JAX-WS?

3. I need to know where I can find your study notes as you mentioned at javaranch.

4. I have developed a simple web service using JAX-WS and I need to how can I print the actual SOAP message exchange between the client and the web service.


Thanks again for your reply.

Regards,
Girish



Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Girish Vasmatkar wrote:
1.So does effectively mean that metro can not be used with other application servers or web servers other than glassfish?

No, check this page, which says that Metry web services can, for instance, be deployed into a Tomcat web container: https://metro.dev.java.net/getting-started/basic.html

2.Also how different is metro from JAX-WS?

Another reference: https://jax-ws.dev.java.net/
As the above web page says, Metro is the reference implementation of JAX-WS. Metro does not only implement the JAX-WS specification.

3. I need to know where I can find your study notes as you mentioned at javaranch.

The latest version can be found here: http://www.javaforum.se/jforum/posts/list/549.page

4. I have developed a simple web service using JAX-WS and I need to how can I print the actual SOAP message exchange between the client and the web service.

Check section 9.5 SOAP Logging in my study notes.

Best wishes!



Girish Vasmatkar
Ranch Hand

Joined: Apr 24, 2008
Posts: 199
Awesome Ivan. Thank you very much again for taking out precious time for answering the questions.

I have downloaded your study notes and already started styding them.

Regards,
Girish
Ravi Danum
Ranch Hand

Joined: Jan 13, 2009
Posts: 104
Ivan,

Where are the study notes (i.e. step by step certificate installation)?

Thanks.

-Ravi
André Asantos
Ranch Hand

Joined: Nov 23, 2009
Posts: 234
Hi all,

please can you give to me any exemple step by step saying e.g a hello world on JAX-WS?

bye,
AS


André AS
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JAX-WS clarification
 
Similar Threads
Why context listeners not configured in web.xml in some way of WS implementation?
JAX WS servlet end point
Unusual servlet URL mapping -- is this possible?
Deploy JAXWS (Mustang) WS to Tomcat?
JAX WS servlet end point