Hi Bruce,
Thanks for the prompt reply
Now I am setting my target service of jms to the bean service still its not
working
I am expecting actually the echo of my message that i am sending to the
jms-queue.
This is my jms-client test console of the output
Connecting to JMS server.
log4j:WARN No appenders could be found for logger
(org.apache.activemq.transport.WireFormatNegotiator).
log4j:WARN Please initialize the log4j system properly.
Producer got this: ActiveMQMessageProducer {
value=ID:2115-khanaly-1-1856-1191436053617-1:0:1:1 }
Consumer got this: ActiveMQMessageConsumer {
value=ID:2115-khanaly-1-1856-1191436053617-1:0:1:1, started=false }
Sending request.
ActiveMQTextMessage {commandId = 0, responseRequired = false, messageId =
null, originalDestination = null, originalTransactionId = null, producerId =
null, destination = null, transactionId = null, expiration = 0, timestamp =
0, arrival = 0, correlationId = null, replyTo = null, persistent = false,
type = null, priority = 0, groupID = null, groupSequence = 0,
targetConsumerId = null, compressed = false, userID = null, content = null,
marshalledProperties = null, dataStructure = null, redeliveryCounter = 0,
size = 0, properties = null, readOnlyProperties = false, readOnlyBody =
false, droppable = false, text = Yogi}
Done.
Please comment on the configuration of this file
mvn jbi:projectDeploy was successful though.
Can I use bean SU and jms-consumer SU for the purpose
My purpose it to get message from bean.
Regards,
Raj
I am again attaching you my bean xbean.xml files
<beans xmlns:bean="http://servicemix.apache.org/bean/1.0"
xmlns:y="http://localhost:8192/yrkproject">
<bean:endpoint service="y:service"
endpoint="nih.nci.gov.caXchange.org.servicemix.yrkprojectinput"
bean="#myBean"/>
<bean id="myBean" class="org.apache.YrkProject.MyBean"/>
</beans>
<beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
xmlns:y="http://localhost:8192/yrkproject"
xmlns:amq="http://activemq.org/config/1.0">
<jms:endpoint service="y:yrkproject"
endpoint="nih.nci.gov.caXchange.org.servicemix.yrkprojectsource"
targetService="y:service"
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" />
<bean id="#connectionFactory"
class="org.apache.activemq.pool.PooledConnectionFactory">
<property name="connectionFactory">
<bean class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="tcp://localhost:61616"/>
</bean>
</property>
</bean>
Thanks once again for your suggestion.I appreciate it.
Regards,
Raj
[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">
>
> <bean:endpoint service="y:service"
> endpoint="nih.nci.gov.caXchange.org.servicemix.yrkprojectinput"
> bean="#myBean"/>
>
> <bean id="myBean" class="org.apache.YrkProject.MyBean"/>
> </beans>
>
> beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
> xmlns:y="http://localhost:8192/yrkproject"
> xmlns:amq="http://activemq.org/config/1.0">
>
>
> <jms:endpoint service="y:yrkproject"
>
> 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" />
> <bean id="#connectionFactory"
> class="org.apache.activemq.pool.PooledConnectionFactory">
> <property name="connectionFactory">
> <bean class="org.apache.activemq.ActiveMQConnectionFactory">
> <property name="brokerURL" value="tcp://localhost:61616"/>
> </bean>
> </property>
> </bean>
>
>
>
>
> </beans>
>
>
>
> 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("<message>Hello,
> world!</message>"));
> 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("<hello>world</hello>"));
> ssertTrue(client.sendSync(me, 1000000));
> 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/Regarding-servicemix-bean-and-jms-consumer-tf4563322s12049.html#a13025177
Sent from the ServiceMix - User mailing list archive at Nabble.com.