Skip to content
JGuillemotte edited this page Feb 2, 2012 · 8 revisions

EasySOA Light Architecture

Light proxy Architecture :

The ligth proxy works with two components : the HTML form generator and the REST/SOAP proxy.

HTML Form generator :

Its role is to generate an HTML form from a WSDL document.

**(The following description is the old solution)**The generation is made with a XSLT transformation. Javascipt code is embeded directly in the form. With this solution, the form can send a request, receive and display a response directly to the REST/SOAP proxy.

The new solution works with Frascati and with Velocity. An easysoalight service use the Frascati Velocity binding based on a Servlet. The binding is described in the sca composite file, in the 'scaffoldingProxyComponent' component (See https://github.com/easysoa/EasySOA/blob/master/easysoa-proxy/easysoa-proxy-core/easysoa-proxy-core-scaffolderproxy/src/main/resources/scaffoldingProxy.composite).
The default page 'formGeneratorTemplate.html' contains some javascript code to process the request and the response and Velocity expressions to get all the required data to build the form (See https://github.com/easysoa/EasySOA/blob/master/easysoa-proxy/easysoa-proxy-core/easysoa-proxy-core-scaffolderproxy/src/main/resources/contents/formGeneratorTemplate.html).
The WSDL is processed in the 'formGeneratorService' which works with a form generator class (see https://github.com/easysoa/EasySOA/blob/master/easysoa-proxy/easysoa-proxy-core/easysoa-proxy-core-scaffolderproxy/src/main/java/org/openwide/easysoa/scaffolding/EasyWsdlFormGenerator.java). This class provides methods to get services, operations and parameters from the WSDL. It works with EasyWSDL API.

REST / SOAP proxy :

The REST/SOAP proxy receive a REST request containing the parameters to map in the SOAP request and indications about the WSDL, port and operation tuo use. It builds with these indications the SOAP request and maps the received paramaters in the request. Then the SOAP request is send to the server specified in the WSDL. The server response is send back to the HTML form.

Architectural choices :

The two components of the light proxy works with FraSCAti.

For HTML Form generator :

  • Use of EasyWSDL with a Velocity template : The HTML is generated with a Velocity template working with a generator class. The generator use EasyWSDL API to get all the required informations from the WSDL. Then these informations are passed to the velocity template for rendering. It is working for simple WSDL definition with messages containing only primitive types. For more complex data structures contained int the WSDL, we have to study the best way to displaycomplex parameter types in the HTML form.
  • Complex data structures and HTML Form : Not working at the moment. The form can only contains simple primitives types for input and outpu fields. We have to find a way to display complex dtat structures.
  • Embeded javascript : Javascript code is embeded directly in the form for sending request and receiving and displaying the response.
  • Velocity is used to make the link between the REST request to get the form and the XSLT transformation method.

For Rest/SOAP proxy :

  • Use of SOAPUI : SOAPI=UI is used in the proxy to easily generate the SOAP request and to establish the dialog with the targeted web service. unfortunately, there is no mecanism in SOAPUI to map easilly form parameters in the SOAP request. We have to use standard java string manipulation methods.

Tests :

A test class is avalaible : FormGeneratoTest.java. This test is fully automated, starts both components and send request automatically. The proxy has been successfully tested with pure air flowers and smart travel samples.

How to use :

  • Start the light in FraSCAti with the composite : scaffoldingProxy.composite

To generate a WSDL form :

New features :

To be completed.

Clone this wiki locally