[forge-dev] trying to close the gap on a SwitchYard demo

Dan Allen dan.j.allen at gmail.com
Fri Jul 6 19:37:29 EDT 2012


I got the whole demo working, at last! Here are my notes. Feel free to
massage these into a proper tutorial :)

Lines beginning w/ # are notes. Any other line represents a command.

# install SwitchYard Forge plugin from using the SwitchYard installer from
http://downloads.jboss.org/switchyard/releases/v0.5.Beta1/switchyard-installer-0.5.0.Beta1.zip
# update installer.properties:
# switchyard.tools.url=
http://downloads.jboss.org/switchyard/releases/v0.5.Beta1/switchyard-tools-0.5.0.Beta1.zip
# if using Java 7, remove child notes of <fileset dir="${java.share.dir}">
in build.xml
ant install-forge

new-project --named greeting --topLevelPackage org.example.greeting
project install-facet switchyard
 ? Application name (e.g. myApp) greeting
project install-facet switchyard.bpm
bpm-service create --serviceName Greeting
project install-facet switchyard.bean
bean-service create --serviceName Hello
bean-service create --serviceName Goodbye
switchyard create-service-test --serviceName Greeting

# copy file Greeting.bpmn to src/main/resources/META-INF/
# replace contents of HelloBean.java and GoodbyeBean.java process method w/
System.out.println("Hello, " + content); and System.out.println("Goodbye, "
+ content); respectively
# change signature of method on Greeting to void greet(String name);
# change message in GreetingTest to service.sendInOnly("JAX");
# add <component name="Hello"></component> and <component
name="Goodbye"></component> nodes as children of the <composite> node in
switchyard.xml

switchyard add-reference --referenceName Hello --interfaceType java
--interface org.example.greeting.Hello --componentName Hello
switchyard add-reference --referenceName Goodbye --interfaceType java
--interface org.example.greeting.Goodbye --componentName Goodbye

test

switchyard promote-service --serviceName Greeting
camel-binding bind-service --serviceName Greeting --configURI
file:///tmp/input

build

# deploy target/greeting.jar to SwitchYard AS 7 Server (
http://downloads.jboss.org/switchyard/releases/v0.5.Beta1/switchyard-as7-0.5.0.Beta1.zip
)

mkdir /tmp/input
echo "SwitchYard" > /tmp/input/message.txt

# Observe the following output in the AS 7 console:
# INFO  [stdout] (Camel (camel-5) thread #10 - file:///tmp/input) Hello,
SwitchYard
# INFO  [stdout] (Camel (camel-5) thread #10 - file:///tmp/input)
# INFO  [stdout] (Camel (camel-5) thread #10 - file:///tmp/input) Goodbye,
SwitchYard
# INFO  [stdout] (Camel (camel-5) thread #10 - file:///tmp/input)

Good luck!

-Dan

On Fri, Jul 6, 2012 at 6:34 PM, Dan Allen <dan.j.allen at gmail.com> wrote:

> On Fri, Jul 6, 2012 at 5:53 PM, Keith Babo <kbabo at redhat.com> wrote:
>
>> This is a "feature" of the XML validation in Eclipse.  Disable "Honour
>> all scheme locations" under XML - Validation (or something like that).
>>
>
> When I got back a test with lots of red marks, I should have asked my
> teacher "is it possible to turn off this validation feature?"
>
> hahaha
>
> -Dan
>
> --
> Dan Allen
> Principal Software Engineer, Red Hat | Author of Seam in Action
> Registered Linux User #231597
>
> http://google.com/profiles/dan.j.allen
> http://mojavelinux.com
> http://mojavelinux.com/seaminaction
>
>


-- 
Dan Allen
Principal Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597

http://google.com/profiles/dan.j.allen
http://mojavelinux.com
http://mojavelinux.com/seaminaction
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/forge-dev/attachments/20120706/ae513986/attachment.html 


More information about the forge-dev mailing list