Hi Lorenzo,
First of all, your needs look like the servicemix pdfcomposer that I'm
creating currently. The PDF composer could take XML data, populate a PDF
template with XML data (xpath or marshaler) to generate a new PDF doc.
I plan to complete this new component is around two weeks.
Anyway, in your case, you need:
1/ a servicemix-file poller endpoint to read XML files (and send XML
messages in the NMR).
2/ you can create your own bean to get incoming XML files and make your
business. This bean can be exposed in ServiceMix using servicemix-bean
component.
3/ If you want to send the data directly, your bean can send to a
targetService/targetEndpoint. This targetEndpoint could be a HTTP
provider endpoint (or CXF-BC provider endpoint).
If you want to send data as attachment, I think that you need to
implement the WebService call directly in your bean (using CXF for example).
If you use JBI packaging, it's not possible to place the poller and
consumer in the same XBean as it's based on two different components. So
you need one SU based on servicemix-file component (with one xbean.xml)
and one SU based on servicemix-http/servicemix-cxf-bc component (with
one xbean.xml) and assemble both in a SA.
If you use SMX4, you can store all endpoints definition in a config.xml
file that you put in the deploy directory.
You can package all SUs in one SA, the SA is really only an assembly
artifact.
To be honest, I can't really see the advantage of using ODE in your
case. What workflow/business logic you want to implement with BPEL/ODE ?
Regards
JB
On 06/10/2010 05:13 PM, Lorenzo Bolzani wrote:
Hi,
I'm starting to use Servicemix and I'm not sure about how to best organize
the components.
The scenario I need to implement is something like this
1. poll a folder for an xml file
2. read the xml file, this contains an attribute pointing to a pdf file.
Read this too
3. call an already existing servicemix service to save this documents
4. send both the files to an external web service
If useful, as much as possible of the process should be defined as bpel with
ode.
Some parts are quite easy: I need a file:poller, I need a cxfbc:consumer and
a SU with the bpel definition.
But how many other SU should I define? Is it a good idea to place the poller
and the consumer in the same xbeans file? Or is better to keep them
separated?
Is it ok to add everything to a single SA or are there better options?
Ode is "required" to be able to monitor the process instance: do you think
it is a correct approach in this case or not?
Thanks, bye
Lorenzo