Re: How to build SA using bean SU and jms consumer SU and debug and deploy in eclipse

2007-10-03 Thread [EMAIL PROTECTED]

Can you just send me the sample configuration files with the minimum
requrired field for the xbean for the jms-consumer su that sends messge to
the nmr 
and bean su that listens to the messge back to the nmr 
i mean so that i can't get response back to my client program.
Regards,
Yogaraj



[EMAIL PROTECTED] wrote:
> 
> Hi,
> I made an SA successfully using the servicemix-bean su and  jms-consumer
> su and used mvn command  
> to make SA out of them and build was successful.I wrote a client jms
> program that sends the message.But I couldn't get response back from bean
> I am using simple inout echo bean that you listed on the site.
> I think problem is with my xbean and target point
> i am sending both here.
> 
> 
> beans xmlns:bean="http://servicemix.apache.org/bean/1.0";
>xmlns:y="http://localhost:8192/yrkproject";>
> 
>endpoint="nih.nci.gov.caXchange.org.servicemix.yrkprojectinput"
> bean="#myBean"/>
> 
>   
> 
> 
> beans xmlns:jms="http://servicemix.apache.org/jms/1.0";
>xmlns:y="http://localhost:8192/yrkproject";
>xmlns:amq="http://activemq.org/config/1.0";>
> 
>
>   
> endpoint="nih.nci.gov.caXchange.org.servicemix.yrkprojectsource"
>   targetService="y:yrkproject"
>  
> targetEndpoint="nih.nci.gov.caXchange.org.servicemix.yrkprojectsource"
>   role="consumer"
>   destinationStyle="queue"
>  
> jmsProviderDestinationName="nih.nci.gov.caXchange.org.servicemix.yrkprojectsource"
>   defaultMep="http://www.w3.org/2004/08/wsdl/in-out";
>   defaultOperation="test:Echo"
>   connectionFactory="#connectionFactory" />
>   class="org.apache.activemq.pool.PooledConnectionFactory">
> 
> 
> 
> 
>   
>   
>
> 
>
> 
> 
> 
> 
> 
> This is my client
> 
> package nih.nci.gov.caXchange;
> import javax.jbi.messaging.InOut;
> import org.apache.servicemix.client.DefaultServiceMixClient;
> import org.apache.servicemix.jbi.jaxp.StringSource;
> import javax.xml.namespace.QName;
> import javax.jms.*;
> 
> import org.apache.activemq.ActiveMQConnectionFactory;
> import org.apache.activemq.command.ActiveMQQueue;
> 
> 
> public class TestJmsClient {
> 
> /**
>  * @param args
>  */
> public static void main(String[] args) throws JMSException{
>  System.out.println("Connecting to JMS server.");
>   // ActiveMQ JMS Provider code
> ActiveMQConnectionFactory factory =
> new ActiveMQConnectionFactory("tcp://localhost:61616");
> Destination inQueue = new
> ActiveMQQueue("nih.nci.gov.caXchange.org.servicemix.yrkprojectsource");
> Destination outQueue = new
> ActiveMQQueue("nih.nci.gov.caXchange.org.servicemix.yrkprojectoutput");
> Connection connection = factory.createConnection();
> Session session = connection.createSession(false,
> Session.CLIENT_ACKNOWLEDGE);
>  // Create the message 66 and consumer
> MessageProducer producer = session.createProducer(inQueue);  
> System.out.println("Producer got this:  "+producer);
> MessageConsumer consumer = session.createConsumer(outQueue);
> System.out.println("Consumer got this:   "+consumer);
> connection.start();  
> System.out.println("Sending request.");
> //producer.send(session.createTextMessage("Hello,
> world!"));
> TextMessage tMsg = session.createTextMessage("Yogi");
> System.out.println(tMsg);
> tMsg.setJMSReplyTo(inQueue);
> producer.send(tMsg);
> connection.close();
> System.out.println("Done.");
>
>
>
>
> }
>
>   /*public void init(ComponentContext context) throws JBIException
> {
>   this.context = context;
>   context.activateEndpoint(new QName("http://your.namespace";,
> "service"), "endpoint");
>   }*/
>
> /*public void testEcho() throws Exception {
> DefaultServiceMixClient client = new
> DefaultServiceMixClient(jbi);
>         InOut me = client.createInOutExchan

How to build SA using bean SU and jms consumer SU and debug and deploy in eclipse

2007-10-03 Thread [EMAIL PROTECTED]

Hi,
I made an SA successfully using the servicemix-bean su and  jms-consumer su
and used mvn command  
to make SA out of them and build was successful.I wrote a client jms program
that sends the message.But I couldn't get response back from bean I am using
simple inout echo bean that you listed on the site.
I think problem is with my xbean and target point
i am sending both here.


beans xmlns:bean="http://servicemix.apache.org/bean/1.0";
   xmlns:y="http://localhost:8192/yrkproject";>

  

  


beans xmlns:jms="http://servicemix.apache.org/jms/1.0";
   xmlns:y="http://localhost:8192/yrkproject";
   xmlns:amq="http://activemq.org/config/1.0";>

   
http://www.w3.org/2004/08/wsdl/in-out";
  defaultOperation="test:Echo"
  connectionFactory="#connectionFactory" />
 




  
  
   

   





This is my client

package nih.nci.gov.caXchange;
import javax.jbi.messaging.InOut;
import org.apache.servicemix.client.DefaultServiceMixClient;
import org.apache.servicemix.jbi.jaxp.StringSource;
import javax.xml.namespace.QName;
import javax.jms.*;

import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.command.ActiveMQQueue;


public class TestJmsClient {

/**
 * @param args
 */
public static void main(String[] args) throws JMSException{
 System.out.println("Connecting to JMS server.");
  // ActiveMQ JMS Provider code
ActiveMQConnectionFactory factory =
new ActiveMQConnectionFactory("tcp://localhost:61616");
Destination inQueue = new
ActiveMQQueue("nih.nci.gov.caXchange.org.servicemix.yrkprojectsource");
Destination outQueue = new
ActiveMQQueue("nih.nci.gov.caXchange.org.servicemix.yrkprojectoutput");
Connection connection = factory.createConnection();
Session session = connection.createSession(false,
Session.CLIENT_ACKNOWLEDGE);
 // Create the message 66 and consumer
MessageProducer producer = session.createProducer(inQueue);  
System.out.println("Producer got this:  "+producer);
MessageConsumer consumer = session.createConsumer(outQueue);
System.out.println("Consumer got this:   "+consumer);
connection.start();  
System.out.println("Sending request.");
//producer.send(session.createTextMessage("Hello,
world!"));
TextMessage tMsg = session.createTextMessage("Yogi");
System.out.println(tMsg);
tMsg.setJMSReplyTo(inQueue);
producer.send(tMsg);
connection.close();
System.out.println("Done.");
   
   
   
   
}
   
  /*public void init(ComponentContext context) throws JBIException {
  this.context = context;
  context.activateEndpoint(new QName("http://your.namespace";,
"service"), "endpoint");
  }*/
   
/*public void testEcho() throws Exception {
DefaultServiceMixClient client = new
DefaultServiceMixClient(jbi);
InOut me = client.createInOutExchange();
me.setService(new QName("http://bpmscript.org/jbi";,
"timeout"));
me.getInMessage().setContent(new
StringSource("world"));
ssertTrue(client.sendSync(me, 100));
Exception error = me.getError();
        assertTrue(error instanceof TimeoutException);
            } */

}


Can any one suggest me how do I get reply back from servicemix bean.
Regards,
Raj
-- 
View this message in context: 
http://www.nabble.com/How-to-build-SA-using-bean-SU-and-jms-consumer-SU-and-debug-and-deploy-in-eclipse-tf4563348s12049.html#a13024209
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.