Thanks. So, using xbean.xml files for configuring SU is similar to write
servicemix.xml files for configuring the container and the components,
right? In the latter case I could personalize the container.... but from a
component perspective it's quite the same, no?
Just another thing: at the end of your tutorial, I will get two SU, one of
which depends over a SE (so, three folders) and one SA (another folder);
now, what do I copy to install directory and what to deploy? I try to
answer, correct me if I'm wrong: I will copy ZIP of SUs into install (SE's
ZIP too???) and SA's JAR into deploy. And I would reach the same result if I
would copy the ZIPs into install and then write mvn jbi:projectDeploy into
SA directory, right?
Thanks, sorry for my English (I'm Italian) and for the simple questions....
Gert Vanthienen wrote:
>
> Guiseppe,
>
> I'll try to give you a brief primer on what you should do to get this
> result. If you just want to write a service to receive a message and do
> something with it, you do not have to write your own service engine, you
> can use the servicemix-lwcontainer or servicemix-bean component that is
> included in the distribution and just build the SU/SA yourself. Anyway,
> to get the SE example working...
>
> First of all, the tutorial lets you build two things:
> - a hello-world-se service engine (component), which is deployed by
> copying it to ${servicemix.home}/install
> - a hello-world-su service unit project
>
> You have to add an xbean.xml file to your service unit project, to
> describe the configuration for your service unit. Add an xbean.xml file
> to hello-world-su/src/main/resources with this contents and rebuild the
> project.
> <beans
> xmlns:hello="http://org.apache.servicemix.samples.helloworld.se/1.0"
> xmlns:beppe="http://guiseppe.org">
> <hello:endpoint service="beppe:service" endpoint="endpoint"/>
> </beans>
>
> Now, create a second service unit project, now containing this xbean.xml:
> <beans xmlns:ftp="http://servicemix.apache.org/ftp/1.0"
> xmlns:beppe="http://guiseppe.org">
> <ftp:poller service="beppe:ftp" endpoint="poller"
> targetService="beppe:service" targetEndpoint="endpoint"
> uri="ftp://anonymous:[EMAIL PROTECTED]" />
> </beans>
>
> Afterwards, you should create another ZIP file (the service assembly),
> containing both SU zip file and a file named META-INF/jbi.xml. For an
> example of this file, have a look at
> http://incubator.apache.org/servicemix/what-is-a-jbi-sa-and-how-do-i-create-one.html
>
> (bottom of the page). Your file will contain two <service-unit/>
> elements, one targeted towards the hello-world-se component, the other
> uses servicemix-ftp.
>
> Hope this helps,
>
> Gert
>
>
> beppe82 wrote:
>> Hi all, please help me because it's three days I'm wasting my time into
>> things that I think are not too difficult (but I can't do that!).
>> I have a simple SU, written following the tutorial about hello world SE.
>> My
>> process() method just receive a "in" message, print a phrase (using
>> System.out.println(...)... can I use this method to write on standard
>> output?) and sets exchange status to "done". I'd like to use it together
>> with the ready component ftp-poller... can you write me a step-by-step
>> guide
>> to do that? I'm not able to integrate, build and deploy this very simple
>> application... I'm a bit confused about using maven, or using ant, using
>> servicexml.xml... I don't exactly know what to do! Thank you very much,
>> Giuseppe
>>
>
>
>
--
View this message in context:
http://www.nabble.com/help-for-a-novice-tf3526390s12049.html#a9852032
Sent from the ServiceMix - User mailing list archive at Nabble.com.