Search code examples
javaweb-servicessoapapache-axissoapui

How to go about learning java webservice


Given a task at work to understand the usage of java webservice or aka JAX-WS in eclipse IDE with axis2 tool and using soap UI to view the messages.

looked at few examples on [http://docs.oracle.com/javaee/6/tutorial/doc/bnayl.html][1] and also tried a example to retrieve database info to soap ui message but still not confident to say that I understood everything.

Need clarity on the points below:

  1. What is axis2 tool and what it does to help when combined with eclipse ide
  2. soap ui - as the name says its a user interface to view soap messages if I am not wrong, but what is other way of running a webservice with out soap ui and what is the convenience for a developer to adopt to soap ui

As I am simultaneously learning webservices with burden of understanding tools at the same time please guide me few good tutorial sites.

Thank you


Solution

  • I did more or less the same few years ago. My experience is as follows (your mileage might vary):

    • you need to understand XSD well
    • when you look at few WSDL examples you will figure out that WSDL is XSD + little overhead, which is almost always the same
    • it helps to play with examples, I personally found axis/axis2 bit clumsy, if possible take another provider, e.g. JBoss or reference implementation (Glassfish), but perhaps you will have to use axis afterwards, so better to stick to it from the beginning. SOAP UI is ok, you use it as client.
    • I read one of the books on axis and one on JAX_WS alone. I would recommend the JAX-WS book, which did good job covering all the theoretical background and provided lot of examples. Bit boring read but good for getting started and as a reference.

    Axis2 is WebService provider. It's a bunch of libraries and tools which on one hand generate for your the needed artefacts (Java from WSDL or the other way around) and on the other when packed into a web war allows you to publish a webservice by deploying the war in a container, e.g. tomcat. Yo might start by deploying one of the examples in Eclipse into Tomcat (running in Eclipse or outside) and write and run a Java client against it. Writing a simple client against a running service is good alternative against SOAP UI. SOAP UI helps you to understand the JAX-WS at protocol (SOAP) level. For playing with axis (not axis2!) was the axis book helpful.