1. Create a Java class to implement Web service
2. Create a Java class to publish Web service
3. Run the publisher class (StateWebServicePublisher.java)Run the above program which we exposed the end point.
4. Check the WSDL
WSDLThe Web Services Description Language is an XML-based interface definition language that is used for describing the functionality offered by a web service.
Below are the elements of a WSDL file
- <definitions> = Root WSDL Elements
- <types> = What data type will be transmitted?
- <message> = What exact information is expected
- <portType> = What operations will be supported
- <binding> = How will the message will be transmitted on the wire ? What SOAP specific details are there
- <service> = Define the collection of ports that make up the services and where is service located.
WSDL SOAP Bindinga WSDL SOAP binding can be either a Remote Procedure Call (RPC) style binding or a document style binding. see more about bindings here http://www.ibm.com/developerworks/library/ws-whichwsdl/
To specify particular binding we can use the annotations over the service class as below
Now we completed the service implementation and started the service, next we need to create the client for the service using the WSDL.