Hello to Everybody,
My First Post on this Forum!!
I am started learning web services. And I have tried one sample web service example (fibonacci). At this stage, I have few queries to clarify.
As a service provider, I have to do the following things: (Pls correct me, if I am wrong)
1. Write the interface (with business methods)
2. Implement that interface.
3. Generate the WSDL file from the Interface using Java2WSDL tool.
Here comes my first question: What this WSDL file contains?(I have seen this WSDL file, which is the XML file. That's what I know) What is the role of this wsdl file? Whether without Java2WSDL tool, we can generate manually?
4. Generate the
Java Files from generated WSDL file using WSDL2Java Tool.
Why we generating the Java files from WSDL xml file? Whether we can't do this wihout WSDL? That is generated WSDL xml file is having the interface details, I am guessing. Why can't from that interface, we can directly generated the rest of the java files like
FibonacciSoapBindingImpl.java
Fibonacci.java
FibonacciService.java
FibonacciServiceLocator.java
FibonacciSoapBindingSkeleton.java
FibonacciSoapBindingStub.java
5. Deploy the jar files.
Upto step 5, it's the service provider task.
How the client will know the service provided by the service provider?
And also, where are all we can use web services? Give some example application that suits web services? If so, why can't the
EJB can be used for that same application?