Well, I checked the reference by letting the Subscription-creating SA create a ZIP-file and deploying it in a ServiceMix container with a different configuration. It is working, hence the reference is correct.
In order to investigate the cause of the incorrectly routed MessageExchange, I did some debugging. It turns out that when the subscription is deployed to the WSN component, it attempts to resolve the EndpointReference. To that end, it gets a ComponentContextImpl, through which it obtains the container, through which it obtains the Registry, through which it obtains the current components, through which it attempts to resolve the EPR*). Now what happens is that it compares the beginning of the URI contained in the ConsumerReference with the protocols that the registered components are able to handle**). In my case, as I had the HTTP component deployed in order to run the Subscription-creating SA, this comparison is triggered - and the MessageExchange routed to the HTTP component instead of the tracer. This, of course, is not the desired behaviour. I'll try again by specifying the URI in a different way***). Nevertheless, I think it would be better to redo the EPR resolving in order to make it work without side effects. *) org.apache.servicemix.common.DefaultComponent.resolveEndpointReference(DocumentFragment) **) org.apache.servicemix.common.ResolvedEndpoint.resolveEndpoint(DocumentFragment, QName, QName, String), line 93 prossma wrote: > > In order to fix this, I replaced the WSNSpringComponent by WSNComponent*). > Now, I can deploy the service assembly I created, and the publisher sends > notifications. > > I believe I set the consumer reference incorrectly: I get an error from > the HttpProcessor**), which makes me believe I supplied a wrong consumer > reference. However, judging from > http://www.nabble.com/WS-Notification-Broker-in-ServiceMix-3.1-not-behaving-as-I-would-expect-tf3351459s12049.html > another post about WS-Notification , I believe that I did it correctly, > supplying a value of http://t-systems.es/test/trace/ep for an endpoint > that shows in JMX as {http___t-systems.es_test_}traceep ***). > > Any help on this issue would be highly appreciated. > > Thanks in advance, > Ciao, Philipp > > *) > <sm:activationSpec componentName="servicemix-wsn2005"> > <sm:component> > <bean class="org.apache.servicemix.wsn.component.WSNComponent"> > <property name="connectionFactory" ref="connectionFactory"/> > </bean> > <!--<sm:activationSpec componentName="servicemix-wsn2005"> > <sm:component> > <wsn:component connectionFactory="#connectionFactory"/>--> > </sm:component> > </sm:activationSpec> > > **) > 15:28:25,109 | ERROR | pool-flow.seda.servicemix-http-thread-13 | > HttpComponent | ervicemix.common.BaseLifeCycle 48 | Error > processing exchange InOnly[ > id: ID:192.168.1.5-11430fa3348-5:44 > status: Active > role: provider > endpoint: http://t-systems.es/test/trace/ep > 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>ttestTopic</ns2:Topic><ns2:Message><timer > xmlns="" > xmlns:ns5="http://www.w3.org/2005/08/addressing"><name>{http://t-systems.es/test2/}tsysQuartz:ep</name><group>DEFAULT</group><fullname>DEFAULT.{http://t-systems.es/test2/}tsysQuartz:ep</fullname><description/><fireTime>Sat > Aug 04 15:28:24 CEST > 2007</fireTime></timer></ns2:Message></ns2:NotificationMessage></ns2:Notify> > ] > > java.lang.Exception: Invalid status response: 404 > > at > org.apache.servicemix.http.processors.ProviderProcessor.process(ProviderProcessor.java:191) > > 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:595) > > 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) > > ***) from servicemix.xml: > ... xmlns:ttest="http://t-systems.es/test/" ... > <sm:activationSpec componentName="trace" service="ttest:trace" > endpoint="ep"> > ... > > > prossma wrote: >> >> Hi, >> >> I figured that not being able to deploy has to do with using >> Spring-configuration for the WSN component. >> >> Ciao, Philipp >> >> >> prossma wrote: >>> >>> Hi, >>> >>> I have a JSR181-service that is creating a service-assembly-ZIP-file >>> which I want to install utilizing AdminCommandsServiceMBean. >>> >>> The ZIP is generated fine, but it doesn't get deployed; accordingly, I >>> made a test where I deploy the ZIP directly to the deploy directory. >>> >>> The result surprised me*): I get the message >>> <loc-message>Target component servicemix-wsn2005 for service unit >>> TestSub-su does not accept deployments</loc-message> >>> >>> Any idea what this could be related to? >>> >>> Thanks in advance, >>> Ciao, >>> Philipp Rossmanith >>> >>> *) >>> <jbi-task xmlns="http://java.sun.com/xml/ns/jbi/management-message" >>> version="1.0"> >>> <jbi-task-result> >>> <frmwk-task-result> >>> <frmwk-task-result-details> >>> <task-result-details> >>> <task-id>deploy</task-id> >>> <task-result>FAILED</task-result> >>> <message-type>ERROR</message-type> >>> <task-status-msg> >>> <msg-loc-info> >>> <loc-token/> >>> <loc-message>Target component servicemix-wsn2005 for service unit >>> TestSub-su does not accept deployments</loc-message> >>> </msg-loc-info> >>> </task-status-msg> >>> </task-result-details> >>> </frmwk-task-result-details> >>> </frmwk-task-result> >>> </jbi-task-result> >>> </jbi-task> >>> >>> at >>> org.apache.servicemix.jbi.framework.ManagementSupport.failure(Management >>> Support.java:121) >>> at >>> org.apache.servicemix.jbi.framework.ManagementSupport.failure(Management >>> Support.java:103) >>> at >>> org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssem >>> bly(DeploymentService.java:484) >>> at >>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive( >>> AutoDeploymentService.java:335) >>> at >>> org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirecto >>> ry(AutoDeploymentService.java:646) >>> at >>> org.apache.servicemix.jbi.framework.AutoDeploymentService.access$200(Aut >>> oDeploymentService.java:62) >>> at >>> org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDepl >>> oymentService.java:609) >>> at java.util.TimerThread.mainLoop(Timer.java:512) >>> at java.util.TimerThread.run(Timer.java:462) >>> WARN - AutoDeploymentService - Directory: deploy: Automatic >>> install of C:\Oy\3.1.1\deploy\TestSub-sa.zip faile >>> d >>> javax.jbi.management.DeploymentException: Failed to update Service >>> Assembly: TestSub-sa >>> at >>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive( >>> AutoDeploymentService.java:349) >>> at >>> org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirecto >>> ry(AutoDeploymentService.java:646) >>> at >>> org.apache.servicemix.jbi.framework.AutoDeploymentService.access$200(Aut >>> oDeploymentService.java:62) >>> at >>> org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDepl >>> oymentService.java:609) >>> at java.util.TimerThread.mainLoop(Timer.java:512) >>> at java.util.TimerThread.run(Timer.java:462) >>> Caused by: java.lang.Exception: <?xml version="1.0" encoding="UTF-8"?> >>> <jbi-task xmlns="http://java.sun.com/xml/ns/jbi/management-message" >>> version="1.0"> >>> <jbi-task-result> >>> <frmwk-task-result> >>> <frmwk-task-result-details> >>> <task-result-details> >>> <task-id>deploy</task-id> >>> <task-result>FAILED</task-result> >>> <message-type>ERROR</message-type> >>> <task-status-msg> >>> <msg-loc-info> >>> <loc-token/> >>> <loc-message>Target component servicemix-wsn2005 for service unit >>> TestSub-su does not accept deployments</loc-message> >>> </msg-loc-info> >>> </task-status-msg> >>> </task-result-details> >>> </frmwk-task-result-details> >>> </frmwk-task-result> >>> </jbi-task-result> >>> </jbi-task> >>> >>> This e-mail and any attachments may contain confidential or >>> privileged information. Any unauthorised copying, use or distribution of >>> this information is strictly prohibited. >>> >>> >> >> > > -- View this message in context: http://www.nabble.com/Problem-with-deployment-to-servicemix-wsn2005---SM-3.1.1-tf4208859s12049.html#a12163819 Sent from the ServiceMix - User mailing list archive at Nabble.com.
