Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

SIRI consumer endpoint using .NET / C#

428 views
Skip to first unread message

Lars Halvor Anundskås

unread,
Oct 17, 2015, 12:09:50 PM10/17/15
to SIRI Developers

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()



Johann Nadalutti

unread,
Feb 2, 2016, 3:44:21 AM2/2/16
to SIRI Developers
Hi,
 I have the same error with NotifyStopMonitoring , have you find a solution ?

  What is your "OperationContract" signature for "NotifyEstimatedTimetable" ?

Thanks.

Lars Halvor Anundskås

unread,
Feb 28, 2016, 5:41:59 PM2/28/16
to SIRI Developers
Hi Johan,

I ended up solving this with a generic wcf service metnod accepting any soap message and filtering on the soap action.

Lars
Reply all
Reply to author
Forward
0 new messages