Jibx2Wsdl example codeThe /examples/jibx2wsdl directory of the JiBX distribution contains some samples for demonstrating the use of Jibx2Wsdl, each in a separate subdirectory. All the samples use the same approach to build a service implementation and corresponding client, starting from a service definition class which implements (or at least defines) some sort of functionality. The service definition class is used to generate a WSDL service definition, and the data classes passed to or from the service methods are used to generate XML schema definitions. This starting code is in a starter directory within each example subdirectory. If you just want to try generating WSDL and schema definitions (along with the JiBX binding, of course), you can do that using only the JiBX code. If you want to generate and try the client and server code, you also need an Axis2 installation updated with the latest JiBX jars (using the jibx-axis2 download). You may also need to edit the /examples/jibx2wsdl/build.properties file and set the paths to your JiBX and Axis2 (if used) installations. The path provided for JiBX is correct as long as you keep the code as part of your distribution. All the examples use the same directory structure, with a starter subdirectory for the service definition and data classes, a client directory for the client code, and a server directory for the service code. The client and server directory each contain some provided code to start with, for a simple test program on the client side and for a service implementation class on the server side (which in most cases just delegates to the original service definition class provided in the starter code). The client and server code can only be compiled once the linkage code has been generated using Axis2. An Ant build.xml file is included in each example. If you run Example detailsHere's the list of examples:
Currently only the infoq-example uses any customizations which are specifically for Jibx2Wsdl, rather than just BindGen. |