Hi, I created a servlet in Jetty that will act as a notification consumer. The notification broker and producer are deployed in servicemix. I get the following error when I send the subscribe request to the broker. I saw some discussion on have external endpoints in this forum before but still not sure how to resolve this. Any help will be greatly appreciated.
I am following the example in http://www.ibm.com/developerworks/library/gr-ws-not/ My servlet in Jetty is mapped to http://localhost:8080/test/foo. It has a doGet and doPost method. The doGet subscribes to the servicemix WSN broker and I would like for the broker to send notifications to the doPost method. Request sent by servlet: <?xml version="1.0" encoding="UTF-8"?> <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:wsa="http://www.w3.org/2005/08/addressing"> <env:Body><wsnt:Subscribe> <wsnt:ConsumerReference> < wsa:Address> endpoint:http://localhost:8080/test/foo </wsa:Address> </wsnt:ConsumerReference> <wsnt:Filter> <wsnt:TopicExpression Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Simple">myTopic </wsnt:TopicExpression> </wsnt:Filter> </wsnt:Subscribe> </env:Body> </env:Envelope> I get the following response: WARN org.mortbay.log - /test/foo: java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:8492/Broker/ In Servicemix window I see the following output: java.lang.Exception: org.apache.servicemix.wsn.jaxws.SubscribeCreationFailedFaul t: Unable to resolve consumer reference endpoint at org.apache.servicemix.http.processors.ConsumerProcessor.process(Consu merProcessor.java:194) at org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet .java:71) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487 ) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:3 62) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7 12) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHand lerCollection.java:211) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection. java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1 39) at org.mortbay.jetty.Server.handle(Server.java:313) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:50 6) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:375) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja va:396) at org.mortbay.jetty.nio.SelectChannelConnector$RetryContinuation.run(Se lectChannelConnector.java:511) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool .java:442) Caused by: org.apache.servicemix.wsn.jaxws.SubscribeCreationFailedFault: Unable to resolve consumer reference endpoint at org.apache.servicemix.wsn.jbi.JbiSubscription.validateSubscription(Jb iSubscription.java:88) at org.apache.servicemix.wsn.AbstractSubscription.create(AbstractSubscri ption.java:277) at org.apache.servicemix.wsn.AbstractNotificationBroker.handleSubscribe( AbstractNotificationBroker.java:178) at org.apache.servicemix.wsn.AbstractNotificationBroker.subscribe(Abstra ctNotificationBroker.java:163) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.servicemix.wsn.component.WSNEndpoint.process(WSNEndpoint.j ava:143) at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi feCycle.java:538) at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async BaseLifeCycle.java:490) at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife Cycle.java:46) at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun d(DeliveryChannelImpl.java:610) at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo w.java:170) at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j ava:167) at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav a:134) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec utor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor .java:675) at java.lang.Thread.run(Thread.java:595) Thanks, Nithya -- View this message in context: http://www.nabble.com/Unable-to-resolve-endpoint-for-an-external-servlet-tp15072513s12049p15072513.html Sent from the ServiceMix - User mailing list archive at Nabble.com.
