I'm trying to implement the consumer side of SIRI using Microsoft.NET / C#
I am having a really hard time getting this to work
The version of siri is 1.0
If anyone have done this before I'd be eager to hear about your experience / solution.
I have the following file structure
ref
|- siri_facilities-v1.0.xsd
|- siri_facility-v1.0.xsd
|- siri_journey-v1.0.xsd
|- siri_location-v1.0.xsd
|- siri_modes-v1.0.xsd
|- siri_permissions-v1.0.xsd
|- siri_reference-v1.0.xsd
|- siri_requests-v1.0.xsd
|- siri_time-v1.0.xsd
|- siri_types-v1.0.xsd
xml
|- xml.xsd
siri.xsd
siri_common.xsd
siri_connectionMonitoring_service.xsd
siri_connectionTimetable_service.xsd
siri_discovery.xsd
siri_estimatedTimetable_service.xsd
siri_generalMessage_service.xsd
siri_productionTimetable_service.xsd
siri_stopMonitoring_service.xsd
siri_stopTimetable_service.xsd
siri_vehicleMonitoring_service.xsd
siri_wsConsumer.wsdl
siri_wsProducer.wsdl
I have generated the service and data contracts using SVCUTIL like this
svcutil.exe siri_wsConsumer.wsdl *.xsd ref/*.xsd xml/*.xsd /serializer:XmlSerializer /n:*,SiriLib.SiriWsConsumer
Which generates the contract.
Then I have created a service implementation
snippet from the implementation:
void SOAPPort.NotifyHeartbeat(ProducerRequestEndpointStructure HeartbeatNotifyInfo, CheckStatusResponseBodyStructure Notification, HeartbeatExtensionsStructure SiriExtension)
{
log.Debug("Heartbeat..");
}
void SOAPPort.NotifyEstimatedTimetable(NotifyEstimatedTimetable request)
{
log.Debug("NotifyEstimatedTimetable...");
}
.SVC:
<%@ServiceHost language=c# Debug="true" Service="Test.SiriConsumerService.SiriConsumerServiceImpl"%>
I then use SIRI web service to create a subscription, in the subscription request I specify that I want to recieve heartbeats every 3 minutes.
I can confirm that the heartbeats hits the service, but I do not get any calls to NotifyEstimatedTimetable.
Using wireshark I can confirm that siri is sending us loads of data.
SVC trace log; loads of errors, this one is repeated a lot:
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)</StackTrace><ExceptionString>System.InvalidOperationException: No corresponding start element is open.
at System.Xml.XmlBaseReader.ReadEndElement()