[Contract First SOAP web service]: How to create WSDL?
java, soap, web-services, wsdl
Solution
Searching around the web, I realized that you have learn how to author WSDL yourself. There are no wizard like tools that ask you few simple questions and do it for you.
WSDL is yet another XML schema definition (aka XSD) which defines the web service. So using any standard IDE like IntelliJ IDEA, Eclipse, NetBeans should do the trick.
If you are apprehensive about authoring the WSDL, it may be because you are not comfortable with the following concepts (as in my case). So pull up your socks and spend some time to understand the following:
- XML
- XML Namespaces
- XML Schema (XSD)
Here are a few resources that may help you write your own WSDL from scratch:
- XML Schema : http://www.w3schools.com/schema/
- XML Namespaces : http://www.w3schools.com/xml/xml_namespaces.asp
- WSDL Structure: http://www.w3schools.com/xml/xml_wsdl.asp
Problem
My aim is to develop a SOAP web service in Java. I want to go with the 'contract first approach'. The obvious steps (in order) are: - Create a WSDL file from scratch - Generate Java classes using wsdl2java - Develop business logic round the generated Java classes However, I am a little apprehensive about writing a WSDL from scratch (given the complexity). I just wanted to know if there are any standard tools which are used to author a WSDL file from scratch?