SourceForge.net Logo

The IntegraTx Project

http://integratx.sourceforge.net



ClientX: IntegraTx's Web Services client generator


ClientX is a module that dynamically generates web based applications that use IntegraTx's platform Web Services. This way, Web Services can be tested either by hand or automatically with JUnit. These clients are created in a Java/J2EE/JBoss multi-tier architecture using the Struts framework. This program, written in Ant + Java + XSLT, generates Java sources and classes, JSPs, and XML files, everything packaged in a .WAR for a web-based client that will call a Web Service. The input is a WSDL file (XML file that defines a Web Service, representing a "contract" between the client and the server). The ClientX module will generate the required files for the presentation layer (in Struts) and the business layer (a plain Java object or a Stateless Session Bean). For the business layer, ClientX uses JBossWS client libraries to call a Web Service. There is no SQL or database access involved.

Diagram of the generated client, and its interaction with IntegraTx:

 

 

ClientX: Technical definitions

<CLIENTX>
    <WSDL-NAME>getcurrinfo.wsdl</WSDL-NAME>
<WAR-NAME>wsclient.war</WAR-NAME> <INPUT> <TITLE>Title of the HTML INPUT web page</TITLE> <CSS>styles.css</CSS> <URL>getcurrinfo</URL> </INPUT> <OUTPUT> <TITLE>Title of the HTML OUTPUT web page</TITLE> <CSS>styles.css</CSS>
</OUTPUT> <BIZ-CLASS> <SOURCE>dirname/BizGetCurrencyInfo</SOURCE> <CLASS-DIR>classdirectory</CLASS-DIR> <METHOD>getCurrencyInfo</METHOD> <CREATE-SESSION-EJB>0</CREATE-SESSION-EJB> </BIZ-CLASS> </CLIENTX>

Where:

 

Directory structure of the generated client

The generated client will be packged in a .WAR file, and its internal directory structure will be as follows (using directory names provided in the XML example):

example.war 
|-- src
    |-- bizlayer
        |-- getcurrinfo (this directory includes business layer Java/EJB files)
    |-- present
        |-- getcurrinfo (this directory includes presentation layer files)
|-- META-INF
    application.xml	
|-- WEB-INF
    |-- lib 
        getcurrinfo.jar (JAR file that includes bizlayer and present classes)
    web.xml
    struts-config.xml
    struts-*.tld (Struts libraries)  

 


Please feel free to send ideas to integratx@gmail.com or visit the SourceForge.net website at www.sourceforge.net/projects/integratx