This is an old problem that has never been fixed: in servicemix-http,
all urls must end with a "/", else you receive a 302 error (moved
temporarily).  Just send your getMessages request to
   http://localhost:8192/Broker/
instead of
   http://localhost:8192/Broker

On 8/21/07, timbo <[EMAIL PROTECTED]> wrote:
>
> ok thx Guillaume, this is helpful. now i see notifications going to the topic
> & pullpoint.
>
> still unable to complete the scenario with pullpoint getMessages.  i am
> attempting to send
>  getMessages request using wsa to route to the internal pullpoint, but no
> success
> (messages/log below).
>
> in your soapui example you also send the request to the broker's http
> endpoint using wsa.
> what am i missing here ?
>
> this is my xbean.xml:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns:http="http://servicemix.apache.org/http/1.0";
>        xmlns:wsn="http://servicemix.org/wsnotification";>
>
> <http:endpoint service="wsn:NotificationBroker"
>                  endpoint="http-binding1"
>                  targetService="wsn:NotificationBroker"
>                  targetEndpoint="Broker"
>                  role="consumer"
>                  locationURI="http://localhost:8192/Broker/";
>                  defaultMep="http://www.w3.org/2004/08/wsdl/in-out";
>                  soap="true"/>
>
>   <http:endpoint service="wsn:CreatePullPoint"
>                  endpoint="http-binding2"
>                  targetService="wsn:CreatePullPoint"
>                  targetEndpoint="Broker"
>                  role="consumer"
>                  locationURI="http://localhost:8192/CreatePullPoint/";
>                  defaultMep="http://www.w3.org/2004/08/wsdl/in-out";
>                  soap="true"/>
>
> </beans>
>
> this is the message sequence and log error:
>
> 1) createPullPoint:
>
> <!-- sent to http://localhost:8192/CreatePullPoint -->
> <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/";>
>         <env:Body>
>
>                 <wsnt:CreatePullPoint
>                         xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2";
>                         xmlns:sm="http://servicemix.apache.org/wsn2005/1.0";>
>
>                 </wsnt:CreatePullPoint>
>         </env:Body>
> </env:Envelope>
>
> <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/";>
>    <env:Body>
>       <ns4:CreatePullPointResponse
>
> xmlns:ns2="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/b-2";
> xmlns:ns5="http://docs.oasis-open.org/wsn/t-1";>
>          <ns4:PullPoint>
>
>
> <ns2:Address>http://servicemix.org/wsnotification/PullPoint/ID-USMKETSBIERNA1-4946-1187638679054-6-0</ns2:Address>
>          </ns4:PullPoint>
>       </ns4:CreatePullPointResponse>
>    </env:Body>
> </env:Envelope>
>
> 2) take returned address, and subscribe pullpoint as follows:
>
> <!-- sent to http://localhost:8192/Broker -->
> <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/";>
>         <env:Body>
>                 <wsnt:Subscribe 
> xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2";
>                         xmlns:wsa="http://www.w3.org/2005/08/addressing";>
>                         <wsnt:ConsumerReference>
>                                 <wsa:Address>
>                                         <!-- returned from createPullPoint -->
>
> endpoint:http://servicemix.org/wsnotification/PullPoint/ID-USMKETSBIERNA1-4946-1187638679054-6-0
>                                 </wsa:Address>
>                         </wsnt:ConsumerReference>
>                         <!--  <wsnt:UseNotify>false</wsnt:UseNotify> -->
>                         <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>
>
> <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/";>
>    <env:Body>
>       <ns4:SubscribeResponse
>
> xmlns:ns2="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/b-2";
> xmlns:ns5="http://docs.oasis-open.org/wsn/t-1";
>
> xmlns:ns6="http://docs.oasis-open.org/wsn/br-2";>
>          <ns4:SubscriptionReference>
>
> <ns2:Address>http://servicemix.org/wsnotification/Subscription/ID-USMKETSBIERNA1-4946-1187638679054-3-0</ns2:Address>
>          </ns4:SubscriptionReference>
>          <ns4:TerminationTime xsi:nil="true"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
>       </ns4:SubscribeResponse>
>    </env:Body>
> </env:Envelope>
>
>
> note: at this point the topic myTopic is created in amq, and an endpoint for
> the pullpoint is created in smx,.
>
> 3) notify
>
> <!-- sent to http://localhost:8192/Broker -->
> <soapenv:Envelope
>         xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
>
>         <soapenv:Header />
>         <soapenv:Body>
>                 <wsnt:Notify xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2";>
>                         <wsnt:NotificationMessage>
>                                 <wsnt:Topic
>
>                                         
> Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Simple";>
>                                         myTopic
>
>                                 </wsnt:Topic>
>                                 <wsnt:Message>
>                                         <hello>world</hello>
>                                 </wsnt:Message>
>                         </wsnt:NotificationMessage>
>                 </wsnt:Notify>
>         </soapenv:Body>
> </soapenv:Envelope>
>
> note: upon first notification, a queue is created for the pullpoint in amq
> (queue has same id as smx pullpoint endpoint).
> observe that myTopic EnqueueCount attribute increases with each
> notification, and pullpoint queue EnqueueCount attribute
> increases also.
>
> 4) now try getMessages against pullpoint, using wsa to route to internal
> endpoint:
>
> <!-- sent to http://localhost:8192/Broker -->
> <soapenv:Envelope
>    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
>
>    xmlns:b="http://docs.oasis-open.org/wsn/b-2";
>
>    xmlns:wsa="http://www.w3.org/2005/08/addressing";>
>    <soapenv:Header>
>       <wsa:To>
>
> endpoint:http://servicemix.org/wsnotification/PullPoint/ID-USMKETSBIERNA1-4946-1187638679054-6-0
>       </wsa:To>
>    </soapenv:Header>
>    <soapenv:Body>
>       <b:GetMessages>
>       </b:GetMessages>
>    </soapenv:Body>
> </soapenv:Envelope>
>
> <<no response>>
>
> <<log output>>
>
> 15:43:47,167 | DEBUG | @ localhost:8192 | JettyContextManager              |
> ContextManager$ThreadPoolWrapper  441 | Dispatching job:
>
> [EMAIL PROTECTED],io=1,w=true,b=0|0]
> 15:43:47,167 | DEBUG | ool0-1 - /Broker | jetty                            |
> .servicemix.http.jetty.JCLLogger   67 | REQUEST /Broker on
>
> [EMAIL PROTECTED]
>
> 15:43:47,167 | DEBUG | ool0-1 - /Broker | jetty                            |
> .servicemix.http.jetty.JCLLogger   67 | RESPONSE /Broker  302
>
>
>
>
> gnodet wrote:
> >
> > The WS-Notification broker will send a notification message to the address
> > you subscribed.
> > If you have created a PullPoint, you need to create a subscription for it.
> > The URI you give in your subscription must be a recognized URI: see
> > http://incubator.apache.org/servicemix/uris.html.
> >
> > It means, if you send "http://test.org"; in the URI, it will try to send a
> > notification using http on the given uri.   You need to try something like
> > "endpoint:qname[sep]name".
> >
> > For the soap problem, you need to create a soap proxy for your PullPoint,
> > which can be done by deploying a SU on the http component.
> >
> > Hope it helps,
> > Guillaume Nodet
> >
> >
>
>
> --
> View this message in context: 
> http://www.nabble.com/WSN-PullPoint-getMessages-tf4179625s12049.html#a12257338
>
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Reply via email to