-
Notifications
You must be signed in to change notification settings - Fork 200
Contract First Development
Enunciate was originally designed to support code-first Web service development. However, there are times when a code-first development strategy is not possible, and it would still be nice to leverage some of Enunciate's features like generated client-side code.
The wsimport tool takes a WSDL document and generates the server-side JAX-WS stubs for the endpoints defined in the WSDL. This means the process for contract-first development involves three simple steps:
- Run wsimport on the contract to generate the stubs
- Provide implementations of the stubs
- Invoke Enunciate
These steps probably deserve more elaboration, but for now you'll have to make do with an example. For Enunciate 1, the example is named "contract-first" and is available in the "integration-tests" directory of the repository. For Enunciate 2, the example is also named "contract-first" and is available in the "examples" directory of the repository.
git clone https://github.com/stoicflame/enunciate.git
cd examples/contract-first
mvn clean package cargo:run
Note especially the POM file which runs wsimport and the implementation of the generated stubs.
Assuming all went well, you should be able to see the contract-first-developed application at http://localhost:8080/epcis.