Yes iam able to delploy the POJO componet.
I have given the servicename correctly in init method and iam able to
invoke the pojo but the message is not going to destination after this i.e,
to the topic , configuration for JMSConsumer is as follows
<jms:endpoint service="bescocr:JMSConsumer"
endpoint="jms"
role="consumer"
destinationStyle="topic"
jmsProviderDestinationName="PHB800"
connectionFactory="#jmsFactory"
defaultMep="http://www.w3.org/2004/08/wsdl/in-only"
/>
<bean id="jmsFactory"
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>
One more question How to get the value of a specific tag from the message
which i got in onMessageExchange method?
When i print the value of message.getContent() iam getting output as
folllows
[EMAIL PROTECTED]
- MessageInterceptor - Received message InOnly[
: ID:EC4T16INT165110-4176-1181029075183-5:64
atus: Active
le: provider
rvice: {http://xxx.com/bescocr_031807}BESMessageInterceptor
dpoint: endpoint
: <?xml version="1.0" encoding="UTF-8"?><Address
xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:http=
p://model.besgv.e2e.xxx.com"
xmlns:ns1="http://www.w3.org/2001/XMLSchema-instance"
xmlns:urn="urn:soap:bes-binding">
<Body>
<FirstName>yyy</FirstName>
<eid>123</eid>
</Body>
</Address>
i need to get the value of eid and set the one message property to that
value
Arif Mohd wrote:
>
> i have added this configuration to conf/servicemix.xml
>
> Gert Vanthienen wrote:
>>
>> Arif,
>>
>> Have you added this configuration to conf/servicemix.xml or have you
>> built a servicemix-lwcontainer SU to hold you service?
>>
>> Have you activated the endpoint? Something like:
>> public void init(ComponentContext context) throws JBIException {
>> this.context = context;
>> context.activateEndpoint(new QName("http://your.namespace",
>> "service"),
>> "endpoint");
>> }
>>
>> Gert
>>
>>
>> Arif Mohd wrote:
>>>
>>> Hi,
>>>
>>> Iam using servicemix3.1 my components configuration is as follows.
>>>
>>> wire tap --> POJO class ---> JMS Topic
>>>
>>> I have configured POJO class as follows in servicemix.xml
>>>
>>> <sm:activationSpecs>
>>> <sm:activationSpec id="BESMessageInterceptor"
>>> service="foo:BESMessageInterceptor"
>>> destinationService="bescocr:JMSConsumer">
>>> <sm:component><bean
>>> class="com.e2e.bes.processor.MessageInterceptor"/></sm:component>
>>> </sm:activationSpec>
>>> </sm:activationSpecs>
>>>
>>>
>>> And my pojo class method is
>>>
>>> public void onMessageExchange(MessageExchange exchange) throws
>>> MessagingException {
>>> log.info("Received message " + exchange);
>>> NormalizedMessage message = exchange.getMessage("in");
>>> System.out.println("_______________hai__________");
>>> getMessageList().addMessage(message);
>>> exchange.setStatus(ExchangeStatus.DONE);
>>> context.getDeliveryChannel().send(exchange);
>>> }
>>>
>>>
>>> when i start my servicemix pojo class gets deployed the following output
>>> depicts that
>>>
>>>
>>> INFO - JBIContainer - Activating component for:
>>> [container=ServiceMix,name=BESMessageInterceptor] with service
>>> : BESMessageInterceptor component:
>>> org.apache.servicemix.components.util.ComponentAdaptorMEListener for
>>> com.e2e.bes.process
>>> [EMAIL PROTECTED]
>>> INFO - ComponentMBeanImpl - Initializing component:
>>> BESMessageInterceptor
>>> INFO - ComponentMBeanImpl - Setting running state for
>>> Component: servicemix-bpe to Started
>>>
>>> But when i send a message to wire tap iam getting the following
>>> exception
>>>
>>>
>>>
>>> WARN - DefaultBroker - ServiceName
>>> (BESMessageInterceptor) specified for routing, but can't find it
>>> registered
>>> WARN - DefaultBroker - ServiceName
>>> (BESMessageInterceptor) specified for routing, but can't find it
>>> registered
>>> ERROR - EIPComponent - Error processing exchange
>>> InOnly[
>>> id: ID:EC4T16INT165110-2355-1180969168607-5:38
>>> status: Active
>>> role: provider
>>> service: {http://xxx.com/bescocr_031807}PipetoJmsTapSvc
>>> endpoint: endpoint
>>> in: <?xml version="1.0" encoding="UTF-8"?>
>>> <Actual message which i got in tap>]
>>> javax.jbi.messaging.MessagingException: Could not find route for
>>> exchange: InOnly[
>>> id: ID:EC4T16INT165110-2355-1180969168607-5:40
>>> status: Active
>>> role: provider
>>> service: BESMessageInterceptor
>>> in: <?xml version="1.0" encoding="UTF-8"?>
>>>
>>> <Actual message which i got in tap>] for service: BESMessageInterceptor
>>> and interface: null
>>> at
>>> org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(DefaultBroker.java:295)
>>> at
>>> org.apache.servicemix.jbi.security.SecuredBroker.sendExchangePacket(SecuredBroker.java:80)
>>> at
>>> org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:793)
>>> at
>>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:381)
>>> at
>>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:417)
>>> at
>>> org.apache.servicemix.common.AsyncBaseLifeCycle.sendConsumerExchange(AsyncBaseLifeCycle.java:546)
>>> at
>>> org.apache.servicemix.common.EndpointDeliveryChannel.send(EndpointDeliveryChannel.java:77)
>>> at
>>> org.apache.servicemix.common.endpoints.SimpleEndpoint.send(SimpleEndpoint.java:67)
>>> at
>>> org.apache.servicemix.eip.patterns.WireTap.sendToListenerAndTarget(WireTap.java:258)
>>> at
>>> org.apache.servicemix.eip.patterns.WireTap.processAsync(WireTap.java:204)
>>> at
>>> org.apache.servicemix.eip.EIPEndpoint.process(EIPEndpoint.java:160)
>>> at
>>> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:489)
>>> at
>>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:441)
>>> at
>>> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
>>> at
>>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:593)
>>> at
>>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174)
>>> at
>>> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176)
>>> at
>>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
>>> at
>>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
>>> at
>>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
>>> at java.lang.Thread.run(Thread.java:595)
>>>
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/Not-able-to-call-POJO-class-tf3865883s12049.html#a10964980
Sent from the ServiceMix - User mailing list archive at Nabble.com.