Skip to main content

I read this https://knowledge.safe.com/articles/45314/working-with-soap-services.html  to try to wrap my head around SOAP (yes, its a horrible technology!)

I`m testing against: https://www.atb.no/sanntid/#collapse-article_2 

And the stopmonitoring: 

http://st.atb.no:90/SMWS/SMService.svc?wsdl

 

I use the SoapUI to generate the request:

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:siri="http://www.siri.org.uk/siri">
   <soapenv:Header/>
   <soapenv:Body>
      <siri:GetStopMonitoring>
         <ServiceRequestInfo>
            <!--Optional:-->
            <siri:ServiceRequestContext>
               <!--Optional:-->
               <siri:CheckStatusAddress>?</siri:CheckStatusAddress>
               <!--Optional:-->
               <siri:SubscribeAddress>?</siri:SubscribeAddress>
               <!--Optional:-->
               <siri:ManageSubscriptionAddress>?</siri:ManageSubscriptionAddress>
               <!--Optional:-->
               <siri:GetDataAddress>?</siri:GetDataAddress>
               <!--Optional:-->
               <siri:StatusResponseAddress>?</siri:StatusResponseAddress>
               <!--Optional:-->
               <siri:SubscriberAddress>?</siri:SubscriberAddress>
               <!--Optional:-->
               <siri:NotifyAddress>?</siri:NotifyAddress>
               <!--Optional:-->
               <siri:ConsumerAddress>?</siri:ConsumerAddress>
               <!--Optional:-->
               <siri:DataNameSpaces>
                  <!--Optional:-->
                  <siri:StopPointNameSpace>?</siri:StopPointNameSpace>
                  <!--Optional:-->
                  <siri:LineNameSpace>?</siri:LineNameSpace>
                  <!--Optional:-->
                  <siri:ProductCategoryNameSpace>?</siri:ProductCategoryNameSpace>
                  <!--Optional:-->
                  <siri:ServiceFeatureNameSpace>?</siri:ServiceFeatureNameSpace>
                  <!--Optional:-->
                  <siri:VehicleFeatureNameSpace>?</siri:VehicleFeatureNameSpace>
               </siri:DataNameSpaces>
               <!--Optional:-->
               <siri:Language>?</siri:Language>
               <!--You have a CHOICE of the next 2 items at this level-->
               <siri:WgsDecimalDegrees>?</siri:WgsDecimalDegrees>
               <siri:GmlCoordinateFormat>?</siri:GmlCoordinateFormat>
               <!--Optional:-->
               <siri:DataHorizon>?</siri:DataHorizon>
               <!--Optional:-->
               <siri:RequestTimeout>?</siri:RequestTimeout>
               <!--Optional:-->
               <siri:DeliveryMethod>direct</siri:DeliveryMethod>
               <!--Optional:-->
               <siri:MultipartDespatch>false</siri:MultipartDespatch>
               <!--Optional:-->
               <siri:ConfirmDelivery>false</siri:ConfirmDelivery>
               <!--Optional:-->
               <siri:MaximimumNumberOfSubscriptions>9999</siri:MaximimumNumberOfSubscriptions>
               <!--Optional:-->
               <siri:AllowedPredictors>anyone</siri:AllowedPredictors>
               <!--Optional:-->
               <siri:PredictionFunction>?</siri:PredictionFunction>
            </siri:ServiceRequestContext>
            <siri:RequestTimestamp>?</siri:RequestTimestamp>
            <!--Optional:-->
            <siri:Address>?</siri:Address>
            <siri:RequestorRef>?</siri:RequestorRef>
            <!--Optional:-->
            <siri:MessageIdentifier>?</siri:MessageIdentifier>
         </ServiceRequestInfo>
         <Request version="1.4">
            <siri:RequestTimestamp>?</siri:RequestTimestamp>
            <!--Optional:-->
            <siri:MessageIdentifier>?</siri:MessageIdentifier>
            <!--Optional:-->
            <siri:PreviewInterval>?</siri:PreviewInterval>
            <!--Optional:-->
            <siri:StartTime>0001-01-01T00:00:00</siri:StartTime>
            <siri:MonitoringRef>?</siri:MonitoringRef>
            <!--Optional:-->
            <siri:OperatorRef>?</siri:OperatorRef>
            <!--Optional:-->
            <siri:LineRef>?</siri:LineRef>
            <!--Optional:-->
            <siri:DirectionRef>?</siri:DirectionRef>
            <!--Optional:-->
            <siri:DestinationRef>?</siri:DestinationRef>
            <!--Optional:-->
            <siri:StopVisitTypes>all</siri:StopVisitTypes>
            <!--Optional:-->
            <siri:Language>?</siri:Language>
            <!--Optional:-->
            <siri:MaximumStopVisits>0</siri:MaximumStopVisits>
            <!--Optional:-->
            <siri:MinimumStopVisitsPerLine>0</siri:MinimumStopVisitsPerLine>
            <!--Optional:-->
            <siri:MaximumTextLength>0</siri:MaximumTextLength>
            <!--Optional:-->
            <siri:StopMonitoringDetailLevel>normal</siri:StopMonitoringDetailLevel>
            <!--Optional:-->
            <siri:MaximumNumberOfCalls>
               <!--Optional:-->
               <siri:Previous>0</siri:Previous>
               <!--Optional:-->
               <siri:Onwards>0</siri:Onwards>
            </siri:MaximumNumberOfCalls>
         </Request>
         <RequestExtension>
            <!--You may enter ANY elements at this point-->
         </RequestExtension>
      </siri:GetStopMonitoring>
   </soapenv:Body>
</soapenv:Envelope>

 

However I can not see what to change in this request - and how to get a list of valid stops. Any idea? I`m guessing I can remove all the "optional" and simplify it to this:

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:siri="http://www.siri.org.uk/siri">
   <soapenv:Header/>
   <soapenv:Body>
      <siri:GetStopMonitoring>
         <ServiceRequestInfo>
            <!--Optional:-->
            <siri:ServiceRequestContext>
               <!--You have a CHOICE of the next 2 items at this level-->
               <siri:WgsDecimalDegrees>1</siri:WgsDecimalDegrees>
            </siri:ServiceRequestContext>
            <siri:RequestTimestamp>?</siri:RequestTimestamp>
            <siri:RequestorRef>?</siri:RequestorRef>
         </ServiceRequestInfo>
         <Request version="1.4">
            <siri:RequestTimestamp>?</siri:RequestTimestamp>
            <siri:MonitoringRef>?</siri:MonitoringRef>
         </Request>
         <RequestExtension>
            <!--You may enter ANY elements at this point-->
         </RequestExtension>
      </siri:GetStopMonitoring>
   </soapenv:Body>
</soapenv:Envelope>

However it does not work.

 

Any help appreciated!

 

 

When I have to deal with SOAP (yes, I agree with your sentiment) I usually start up with SoapUI, which can ingest the WSDL and create sample requests for you. It will also allow you to run the requests and look at the XML responses.

Regarding your simplified request, have you tried with valid query parameters and not only the placeholder values (e.g. "?") ?


When I have to deal with SOAP (yes, I agree with your sentiment) I usually start up with SoapUI, which can ingest the WSDL and create sample requests for you. It will also allow you to run the requests and look at the XML responses.

Regarding your simplified request, have you tried with valid query parameters and not only the placeholder values (e.g. "?") ?

The issue is there is no documentation so I dont know the valid values... :(


The issue is there is no documentation so I dont know the valid values... :(

That's not cool :-( Are there any applications already using the API where you could possibly intercept the communication using e.g. Fiddler?