Skip to content
mkalam-alami edited this page Jun 14, 2011 · 17 revisions

Sources location

The source code is available in the easysoa-model-demo repository. All code regarding SCA import is located in the plugins/easysoa-model-demo-core folder, which is a Maven project.

See Development Environment to install all needed programs, and easysoa-demo-dist's README.md to set up your projects and build them.

Current features

Parses any .composite file to import services to the model. For now, it recognizes:

  • <binding.ws> tags (WS bindings)
  • <binding.rest> tags (REST bindings)

Limitations: For now, the import is quite basic, since it assumes all services come from the same application.

Architecture

The .composite parsing is done using the visitor pattern: the XML parsing is done once, and several visitor implementations are used to handle each piece of information as they come. There is one visitor per tag type.

The package containing all SCA sources is org.easysoa.sca. It can be found in the easysoa-model-demo-core bundle.

  • SCAVisitor is the interface to be implemented by all visitors.
  • SCAImportBean is currently used to handle web requests, parse the XML and call all visitors each time a tag of interest is found. It also implements two inline visitors, for WS and REST bindings.

This architecture has yet to be improved to ease the contribution of new visitors, mostly by separating more clearly the visitor implementations from the bean.

Clone this wiki locally