Hi,In the new year I have been tasked with developing a SIRI consumer that will need to create stop monitoring subscriptions and receive stop monitoring and heart beat deliveries.To get a bit of a head start I wanted to use the onebusaway library to set up a simple server and client example. Here is what I have so far...Set<Module> modules = new HashSet<>();SiriJettyModule.addModuleAndDependencies(modules);SiriCoreModule.addModuleAndDependencies(modules);Injector injector = Guice.createInjector(modules);final SiriServer server = injector.getInstance(SiriServer.class);// Set our SIRI identityserver.setIdentity("me");// Change the port and url we listen to for incoming client requestsserver.setUrl("http://127.0.0.1:8080/server.xml");server.addSubscriptionRequestHandler(new SiriSubscriptionRequestHandler() {@Overridepublic void handleSubscriptionRequest(SubscriptionRequest request) {ServiceDelivery serviceDelivery = new ServiceDelivery();serviceDelivery.setAddress(request.getAddress());server.publish(serviceDelivery);}});SiriClient client = injector.getInstance(SiriClient.class);// Set our SIRI identityclient.setIdentity("me");// Change the port and url we listen to for incoming service deliveriesclient.setUrl("http://127.0.0.1:8081/client.xml");// Register a service delivery handlerclient.addServiceDeliveryHandler(new SiriServiceDeliveryHandler() {@Overridepublic void handleServiceDelivery(SiriChannelInfo sci, ServiceDelivery sd) {throw new UnsupportedOperationException("Client Not supported yet.");}});// Start the server and clientLifecycleService lifecycleService = injector.getInstance(LifecycleService.class);lifecycleService.start();Siri siri = new Siri();SubscriptionRequest subscriptionRequest = new SubscriptionRequest();StopMonitoringSubscriptionStructure stopMonitoringSubscriptionStructure = new StopMonitoringSubscriptionStructure();subscriptionRequest.getStopMonitoringSubscriptionRequest().add(stopMonitoringSubscriptionStructure);siri.setSubscriptionRequest(subscriptionRequest);SiriClientRequest request = new SiriClientRequest();request.setTargetUrl(server.getUrl());request.setTargetVersion(ESiriVersion.V1_3);request.setPayload(siri);request.setSubscribe(false);client.handleRequest(request);The servers SiriSubscriptionRequestHandler gets called the log output shows that the client gets a SubscriptionResponse. But I see no service delivery on the client side.Could anyone give me some pointers on how to get this example working? I've not used guice before either so I'm not sure if I need to set the servers subscription manger myself or not.--
You received this message because you are subscribed to the Google Groups "onebusaway-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/onebusaway-users/-/XJoMFLef6dEJ.
To post to this group, send email to onebusaw...@googlegroups.com.
To unsubscribe from this group, send email to onebusaway-use...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/onebusaway-users?hl=en.
They don't use SOAP in the strict sense of the term. They do pass XML messages back and forth in a SOAP- like manner, as defined by the SIRI standard. I've only ever tested it against one other SIRI implementation but it does seem to work ;-)
To view this discussion on the web visit https://groups.google.com/d/msg/onebusaway-users/-/fwXP1oLkn0cJ.