You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Felipe Gaucho <fg...@gmail.com> on 2007/03/06 15:57:03 UTC

step-by-step BC tutorial required

I am looking for simple instructions on how to create a BC component that:

create a message or read message



-- 
View this message in context: http://www.nabble.com/step-by-step-BC-tutorial-required-tf3355969s12049.html#a9333351
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: step-by-step BC tutorial required

Posted by Guillaume Nodet <gn...@gmail.com>.
Another is to take a look at the existing components.
The file component is quite simple:

http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-file/


On 3/6/07, Felipe Gaucho <fg...@gmail.com> wrote:
>
>
> If one has an eclipse project with the BC that compiles and pass maven
> install, please mail me at fgaucho@gmail.com
>
> thanks...
>
> I am following the exact steps of the BC tutorial and it always fail..
> should be something very tricky and buggy, probably something I did
> mistake
> here..  so, if you could send a workable example for me, very thanks ;)
>
> --
> View this message in context:
> http://www.nabble.com/step-by-step-BC-tutorial-required-tf3355969s12049.html#a9337993
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Architect, LogicBlaze (http://www.logicblaze.com/)
Blog: http://gnodet.blogspot.com/

Re: step-by-step BC tutorial required

Posted by Felipe Gaucho <fg...@gmail.com>.
If one has an eclipse project with the BC that compiles and pass maven
install, please mail me at fgaucho@gmail.com

thanks...

I am following the exact steps of the BC tutorial and it always fail..
should be something very tricky and buggy, probably something I did mistake
here..  so, if you could send a workable example for me, very thanks ;)

-- 
View this message in context: http://www.nabble.com/step-by-step-BC-tutorial-required-tf3355969s12049.html#a9337993
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: step-by-step BC tutorial required

Posted by Bruce Snyder <br...@gmail.com>.
On 3/6/07, Felipe Gaucho <fg...@gmail.com> wrote:
>
> ok, I am trying the hello-world example....
>
> first feedback: it compiles fine, but if I put anything into code, it fails
> to compile.
>
>
>
> > -------------------------------------------------------
> >  T E S T S
> > -------------------------------------------------------
> > Running ch.netcetera.jbi.tutorial.MySpringComponentTest
> > log4j:WARN No appenders could be found for logger
> > (org.springframework.core.CollectionFactory).
> > log4j:WARN Please initialize the log4j system properly.
> > Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.155 sec
> > <<< FAILURE!

Note the tests run output above. You are not experiencing a
compilation failure, this is a test failure. My guess is that after
adding the new processInOut() method that the MySpringComponentTest
still needs to be updated to match the out message that was added to
the processInOut() method. See the test output in the
target/surefire-tests directory for the actual failure. Also see the
next section of the tutorial about changing the test so it passes:

http://incubator.apache.org/servicemix/hello-world-bc.html#HelloWorld-BC-TestingtheHelloWorldBindingComponent

But again, the tutorial is a work in progress and it not complete yet.

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

Apache Geronimo - http://geronimo.apache.org/
Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Castor - http://castor.org/

Re: step-by-step BC tutorial required

Posted by Felipe Gaucho <fg...@gmail.com>.
ok, I am trying the hello-world example....

first feedback: it compiles fine, but if I put anything into code, it fails
to compile.



> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Running ch.netcetera.jbi.tutorial.MySpringComponentTest
> log4j:WARN No appenders could be found for logger
> (org.springframework.core.CollectionFactory).
> log4j:WARN Please initialize the log4j system properly.
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.155 sec
> <<< FAILURE!
> 

just after including this in the provider skeleton:



> 	protected void processInOut(MessageExchange exchange, NormalizedMessage
> in,
> 			NormalizedMessage out) throws Exception {
> 		SourceTransformer sourceTransformer = new SourceTransformer();
> 		String inMessage = sourceTransformer.toString(in.getContent());
> 		out.setContent(new StringSource("<hello>Hello World! Message ["
> 				+ inMessage + "] contains [" + inMessage.getBytes().length
> 				+ "] bytes</hello>."));
> 	}
> 

-- 
View this message in context: http://www.nabble.com/step-by-step-BC-tutorial-required-tf3355969s12049.html#a9335157
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: step-by-step BC tutorial required

Posted by Guillaume Nodet <gn...@gmail.com>.
Take a look at
   http://cwiki.apache.org/SM/hello-world-bc.html
which is a work in progress.
Feedback welcome ...

On 3/6/07, Felipe Gaucho <fg...@gmail.com> wrote:
>
>
> I am looking for simple instructions on how to create a BC component that:
>
> create a message or read message
>
>
>
> --
> View this message in context:
> http://www.nabble.com/step-by-step-BC-tutorial-required-tf3355969s12049.html#a9333351
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Architect, LogicBlaze (http://www.logicblaze.com/)
Blog: http://gnodet.blogspot.com/