JBoss.orgCommunity Documentation
SwitchYard integrates with Seam Forge to provide a set of rapid application development tools for service-oriented applications. Please consult the Getting Started guide for information on how to install Forge and the SwitchYard extensions to Forge.
The first thing you'll want to do with Forge is create a new project. This can be done inside the Forge shell using the new-project command.
$ forge ____ _____ / ___| ___ __ _ _ __ ___ | ___|__ _ __ __ _ ___ \___ \ / _ \/ _` | '_ ` _ \ | |_ / _ \| '__/ _` |/ _ \ \\ ___) | __/ (_| | | | | | | | _| (_) | | | (_| | __/ // |____/ \___|\__,_|_| |_| |_| |_| \___/|_| \__, |\___| |___/ [no project] tmp $ new-project --named syApp --topLevelPackage org.switchyard.examples.forge Use [/private/tmp/syApp] as project directory? [Y/n] Wrote /private/tmp/syApp/src/main/resources/META-INF/forge.xml ***SUCCESS*** Created project [syApp] in new working directory [/private/tmp/syApp]
At this point, you have an empty application with a few Maven facets installed. What's a facet you ask? Read on ....
Facets add capabilities to an application and to the forge environment itself. This allows SwitchYard to add dependencies to your application's pom based on the functionality you will be using, instead of sticking every possible SwitchYard dependency in the application by default. Facets are also used to add commands specific to SwitchYard itself and components which you will be using in your application. The following facets are currently available:
switchyard - core set of commands and dependencies for the SwitchYard runtime
switchyard.bean - commands and dependencies for Bean component services
switchyard.soap - commands and dependencies for SOAP gateway bindings
switchyard.camel - commands and dependencies for Camel services and gateway bindings
Installing a facet can be done directly in the shell using the
install-facet
command.
[syapp] syapp $ project install-facet switchyard.soap ***SUCCESS*** Installed [switchyard.soap] successfully.
The following SwitchYard commands are available in Forge (grouped by facet).
switchyard
switchyard show-confi
g : displays the current state of your application's configuration, including services, references, and bindings.
switchyard promote-service
: promotes an internal application-scoped service to be visible to other applications.
s
witchyard promote-reference
: promotes an internal application-scoped reference so that it can be mapped to services provided in other applications.
switchyard.bean
bean-service create
: creates a new CDI Bean service, consisting of a service interface and implementation class.
switchyard.camel
camel-service create
: creates a new XML or Java DSL Camel route.
camel-binding bind-service
: binds a service using a Camel endpoint URI.
camel-binding bind-reference
: binds a reference using a Camel endpoint URI.
switchyard.soap
soap-binding bind-service
: binds a service to a SOAP endpoint.
s
oap-binding bind-reference
: binds a reference to a SOAP endpoint.