On Jan 20, 2008 11:09 AM, mmistroni <[EMAIL PROTECTED]> wrote:
>
> hello all,
>  i have followed good example for file move here
>
> http://servicemix.apache.org/2-beginner-using-maven-to-develop-jbi-applications.html
>
> it worked fine, but now i want to move forward by replacing the sender
> endpoint with a serviceengine which process the file.....
>
> i have written a simple serviceEngine following the HelloWorld SE, here's my
> xbean.xml for the related su
> [code]
> <beans  xmlns:hwse="http://org.apache.servicemix.tutorial/1.0";
>         xmlns:ex="http://www.servicemix.org/example";>
>
>   <hwse:endpoint service="ex:filehandler" endpoint="handlerEndpoint"/>
>
> </beans>
> [/code]
> My Endpoint implements ProviderEndpoint, and for the moment it does
> nothing.. but the main method process() has some System.out prints that
> shows me that the serviceengine has been invoked
> [code]
> protected void processInOut(MessageExchange exchange, NormalizedMessage in,
> NormalizedMessage out) throws Exception {
>                 SourceTransformer sourceTransformer = new SourceTransformer();
>                 //String inMessage = 
> sourceTransformer.toString(in.getContent());
>                 System.err.println("---- REceived Message from someone....");
>                 out.setContent(new StringSource("<hello>Hello World! 
> Message</hello>."));
>         }
> [/code]
>
> here's the xbean.xml for my tutorial-file-su (where i define the poller,
> which will send a message to my SE containing the file, this is what i
> assumed)
>
> [code]
> <beans xmlns:file="http://servicemix.apache.org/file/1.0";
>        xmlns:tut="urn:servicemix:tutorial"
>        xmlns:hwse="http://org.apache.servicemix.tutorial/1.0";
>         xmlns:ex="http://www.servicemix.org/example";>
>
>   <!-- add the poller endpoint here -->
>   <file:poller service="tut:file"
>                endpoint="poller"
>                file="file:///c:/servicemix-projects/in/"
>                targetService="ex:filehandler"
>                targetEndpoint="handlerEndpoint">
>
>                <property name="marshaler">
>                      <bean
> class="org.apache.servicemix.components.util.BinaryFileMarshaler" />
>                 </property>
>    </file:poller>
>
>
> </beans>
> [/code]
>
> But when my sa/se gets deployed, my SE does not get invoked....
> what am i missing? am i missing some fundamental points here?
>
> original example was using this as endpoint
> [code]
> <file:sender service="tut:file"
>                endpoint="sender"
>              directory="file:///c:/servicemix-projects/out/" >
>              <property name="marshaler">
>                    <bean
> class="org.apache.servicemix.components.util.BinaryFileMarshaler" />
>              </property>
>   </file:sender>
>
>   <file:poller service="tut:file"
>              endpoint="poller"
>              file="file:/home/gert/poller"
>              targetService="tut:file"
>              targetEndpoint="sender"/>
>
> [/code]
>
> i thought that all i needed was to replace  targetService/targetEndpoint
> with info from my SE....

What I see above is that you changed a file:poller to a file:sender.
I'm not sure if that is what you've done but the descriptions above
are difficult to understand and it looks like this is what you've
done. If you're trying to pick up files from the filesystem and send
them to the custom SE, then the flow you want is as follows:

filesystem --> (file:poller) --> (custom SE)

The file:poller picks up files from the filesystem and sends them to
the custom SE.

I'm also not sure if your namespaces are matching as the namespace in
the custom SE must be the namespace used in the xbean.xml of any SU
routing to the custom SE. So I'd like to see the full xbean.xml files
with namespaces included.

Bruce
-- 
perl -e 'print unpack("u30","D0G)[EMAIL 
PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

Blog: http://bruceblog.org/

Reply via email to