I'm still trying to get the Notifications to work in servicemix, I seem to
keep running into weird problems that lead me to think I'm not configuring
something correctly. So here is my scenario:
I have a thread that runs in a CXF service which creates a
NotificationBroker like this:
ClientFactory factory = (ClientFactory) new InitialContext().lookup(
ClientFactory.DEFAULT_JNDI_NAME);
this.client = factory.createClient();
((DefaultServiceMixClient) this.client).setMarshaler(new
JAXBMarshaler(jaxbContext));
this.wsnBroker = new NotificationBroker(client);
It publishes notifications such as the following, which initially seem to be
fine (No pullpoints are created yet, so it appears it's published straight
to the broker):
DEBUG - SedaFlow - Called Flow send
DEBUG - DeliveryChannelImpl - Waiting for exchange ID:
192.168.1.2-1153b25d35b-25:0 (8549ab) to be answered in
DeliveryChannel{ID:192.168.1.2-1153b25d35b-0:0} from sendSync
DEBUG - SedaQueue -
[EMAIL PROTECTED] dequeued
exchange: In
Only[
id: ID:192.168.1.2-1153b25d35b-25:0
status: Active
role: provider
endpoint: Broker
in: <?xml version="1.0" encoding="UTF-8"?><ns3:Notify xmlns:ns3="
http://docs.oasis-open.org/wsn/b-2" xmlns="urn://notification.test"
xmlns:ns2="http://www.w3.org/2005/08/addressing" xmlns:ns4="
http://docs.oasis-open.org/w
srf/bf-2" xmlns:ns5="http://docs.oasis-open.org/wsn/t-1" xmlns:ns6="
http://docs.oasis-open.org/wsn/br-2"><ns3:Notificatio
nMessage><ns3:Topic>notificationTopic</ns3:Topic><ns3:Message><Notification>...
]
DEBUG - WSNComponent - Received exchange: status: Active,
role: provider
DEBUG - WSNComponent - Retrieved correlation id: null
DEBUG - AbstractNotificationBroker - Notify
DEBUG - DeliveryChannelImpl - Send ID:192.168.1.2-1153b25d35b-25:0
in DeliveryChannel{servicemix-wsn2005}
So then I create a pullpoint, and create a subscription to the pullpoint
with plain soap messages from soapUI. I receive the responses back I would
expect, but now I start getting errors on each notification. The pullpoint
for this example that I created and then subscribed to is this:
http://servicemix.org/wsnotification/PullPoint/ID-arcmap15-3199-1190698261218-8-0
I can access the pullpoint and attempt to retrieve messages, but the
response is always empty. So it appears that's fine. Now the notifications
start looking like this:
DEBUG - DeliveryChannelImpl - Notifying exchange ID:
192.168.1.2-1153b403626-25:3(1fb03f0) in DeliveryChannel{I
D:192.168.1.2-1153b403626-0:0} from processInboundSynchronousExchange
DEBUG - DeliveryChannelImpl - Notified: ID:
192.168.1.2-1153b403626-25:3(1fb03f0) in DeliveryChannel{ID:192.168
.1.2-1153b403626-0:0} from sendSync
DEBUG - DeliveryChannelImpl - Send ID:192.168.1.2-1153b403626-20:0
in DeliveryChannel{servicemix-wsn2005}
DEBUG - SedaFlow - Called Flow send
DEBUG - SedaQueue -
[EMAIL PROTECTED] dequeued
exchange: In
Only[
id: ID:192.168.1.2-1153b403626-20:0
status: Active
role: provider
endpoint:
http://servicemix.org/wsnotification/PullPoint/ID-arcmap15-3199-1190698261218-8-0
in: <?xml version="1.0" encoding="UTF-8"?><ns2:Notify xmlns:ns2="
http://docs.oasis-open.org/wsn/b-2" xmlns="http://www.
w3.org/2005/08/addressing" xmlns:ns3="http://docs.oasis-open.org/wsrf/bf-2"
xmlns:ns4="http://docs.oasis-open.org/wsn/t-1
"><ns2:NotificationMessage><ns2:Topic>notificationTopic</ns2:Topic><ns2:Message><Notification>...
]
WARN - DeliveryChannelImpl - Error calling listener: null
java.lang.NullPointerException
at
org.apache.servicemix.jbi.monitoring.StatisticsService.onExchangeAccepted(
StatisticsService.java:307)
at
org.apache.servicemix.jbi.monitoring.StatisticsService$3.exchangeAccepted(
StatisticsService.java:186)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(
DeliveryChannelImpl.java:598)
at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(
AbstractFlow.java:170)
at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(
SedaFlow.java:167)
at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(
SedaQueue.java:134)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(
ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
DEBUG - HttpComponent - Received exchange: status: Active,
role: provider
DEBUG - HttpComponent - Retrieved correlation id: null
ERROR - HttpComponent - Error processing exchange InOnly[
id: ID:192.168.1.2-1153b403626-20:0
status: Active
role: provider
endpoint:
http://servicemix.org/wsnotification/PullPoint/ID-arcmap15-3199-1190698261218-8-0
in: <?xml version="1.0" encoding="UTF-8"?><ns2:Notify xmlns:ns2="
http://docs.oasis-open.org/wsn/b-2" xmlns="http://www.
w3.org/2005/08/addressing" xmlns:ns3="http://docs.oasis-open.org/wsrf/bf-2"
xmlns:ns4="http://docs.oasis-open.org/wsn/t-1
"><ns2:NotificationMessage><ns2:Topic>notificationTopic</ns2:Topic><ns2:Message><Notification>...
]
java.lang.Exception: Invalid status response: 302
at org.apache.servicemix.http.processors.ProviderProcessor.process(
ProviderProcessor.java:179)
at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(
AsyncBaseLifeCycle.java:538)
at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(
AsyncBaseLifeCycle.java:490)
at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(
BaseLifeCycle.java:46)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(
DeliveryChannelImpl.java:610)
at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(
AbstractFlow.java:170)
at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(
SedaFlow.java:167)
at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(
SedaQueue.java:134)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(
ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
DEBUG - DeliveryChannelImpl - Send ID:192.168.1.2-1153b403626-20:0
in DeliveryChannel{servicemix-http}
So my question is, what are the Exceptions that are giving the 302s? I
retrieved a pullpoint successfully and created a subscription to it, so I
can't think that would be the problem.... might notifications not work
correctly with CXF?