Next the WSDL is put through the Axis2 tool to generate the server code. This server code contains logic to receive XML from the HTTP server using SOAP (which contains the input data), parse it, and create the types to pass to the main application. It also contains code to turn these types back to XML and return to the Web server, which returns a SOAP response.
You must start the JBoss AS 7.1 server before generating the server-side code:
This opens the New Server dialog box.
To generate the server-side code:
A progress bar might appear while it generates the code.
The classes BookDetails, BookReturn, BookReturnE, NewBook, and StockNo hold instances of the types represented in the WSDL.
In the outline view for BookLegacySkeleton.java are four methods, nextBook(), readBook(), deleteBook(), and addBook(). These are the methods that are called by the web service for the operations that were defined and is where you place your code.
Because you might want to regenerate this code, it is a good idea to keep the user code in this file to a minimum and have all the logic in a separate class. Each of these methods contain one line to invoke an appropriate method in a new class called BookOperation. The next step is to create this class which interfaces between the Web service and the COBOL application.