RunHubRoute - SOAP V4.2

RunHubRoute

Version

Version 4.2

Method Signature

HubRouteResult RunHubRoute(Credentials c, TripLeg HubLocation, TripLeg[] Locations, bool HubIsDestination, RouteMethod RoutingMethod, bool BorderOpen, bool AvoidTollRoads, bool AvoidFerry)

The following is a sample SOAP request and response. The placeholders shown need to be replaced with actual values.

Example Code


    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:com="http://schemas.datacontract.org/2004/07/com.promiles.PRIME.v4_2.Core">
    <soapenv:Header/>
    <soapenv:Body>
        <RunHubRoute>
            <c xmlns:a="http://schemas.datacontract.org/2004/07/com.promiles.PRIME.v4_2.Core" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
                <com:CompanyCode>YOUR_COMPANY_CODE</com:CompanyCode>
                <com:Password>YOUR_PASSWORD</com:Password>
                <com:Username>YOUR_USERNAME</com:Username>
            </c>
            <HubLocation>
                <com:Address></com:Address>
                <com:City></com:City>
                <com:Label></com:Label>
                <com:Latitude>0</com:Latitude>
                <com:LocationProperties></com:LocationProperties>
                <com:LocationText>Mobile AL</com:LocationText>
                <com:Longitude>0</com:Longitude>
                <com:PostalCode></com:PostalCode>
                <com:ProMilesLocationID>0</com:ProMilesLocationID>
                <com:State></com:State>
                <com:Type>PROMILES</com:Type>
                <com:Comments></com:Comments>
                <com:FlatRate>0</com:FlatRate>
                <com:PerMileRate>0</com:PerMileRate>
            </HubLocation>
            <Locations>
                <com:TripLeg>
                    <com:Address>1900 Texas Ave</com:Address>
                    <com:City>Bridge City</com:City>
                    <com:Label></com:Label>
                    <com:Latitude>0</com:Latitude>
                    <com:LocationProperties></com:LocationProperties>
                    <com:LocationText></com:LocationText>
                    <com:Longitude>0</com:Longitude>
                    <com:PostalCode>77611</com:PostalCode>
                    <com:ProMilesLocationID>0</com:ProMilesLocationID>
                    <com:State>TX</com:State>
                    <com:Type>PROMILES</com:Type>
                    <com:Comments></com:Comments>
                    <com:FlatRate>0</com:FlatRate>
                    <com:PerMileRate>0</com:PerMileRate>
                </com:TripLeg>
                <com:TripLeg>
                    <com:Address></com:Address>
                    <com:City></com:City>
                    <com:Label></com:Label>
                    <com:Latitude>0</com:Latitude>
                    <com:LocationProperties></com:LocationProperties>
                    <com:LocationText>Denver CO</com:LocationText>
                    <com:Longitude>0</com:Longitude>
                    <com:PostalCode></com:PostalCode>
                    <com:ProMilesLocationID>0</com:ProMilesLocationID>
                    <com:State></com:State>
                    <com:Type>PROMILES</com:Type>
                    <com:Comments></com:Comments>
                    <com:FlatRate>0</com:FlatRate>
                    <com:PerMileRate>0</com:PerMileRate>
                </com:TripLeg>
                <com:TripLeg>
                    <com:Address></com:Address>
                    <com:City></com:City>
                    <com:Label></com:Label>
                    <com:Latitude>32.42172062951977</com:Latitude>
                    <com:LocationProperties></com:LocationProperties>
                    <com:LocationText></com:LocationText>
                    <com:Longitude>-90.13338547309445</com:Longitude>
                    <com:PostalCode></com:PostalCode>
                    <com:ProMilesLocationID>0</com:ProMilesLocationID>
                    <com:State></com:State>
                    <com:Type>PROMILES</com:Type>
                    <com:Comments></com:Comments>
                    <com:FlatRate>0</com:FlatRate>
                    <com:PerMileRate>0</com:PerMileRate>
                </com:TripLeg>
            </Locations>
            <HubIsDestination>true</HubIsDestination>
            <RoutingMethod>PRACTICAL</RoutingMethod>
            <BorderOpen>true</BorderOpen>
            <AvoidTollRoads>false</AvoidTollRoads>
            <AvoidFerry>false</AvoidFerry>
        </RunHubRoute>
    </soapenv:Body>
</soapenv:Envelope>


    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Body>
        <RunHubRouteResponse>
            <RunHubRouteResult xmlns:a="http://schemas.datacontract.org/2004/07/com.promiles.PRIME.v4_2" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
                <a:AvoidFerry>false</a:AvoidFerry>
                <a:AvoidTollRoads>false</a:AvoidTollRoads>
                <a:BorderOpen>true</a:BorderOpen>
                <a:HubIsDestination>true</a:HubIsDestination>
                <a:HubLocation xmlns:b="http://schemas.datacontract.org/2004/07/com.promiles.PRIME.v4_2.Core">
                    <b:Address/>
                    <b:City/>
                    <b:Label/>
                    <b:Latitude>30.6941930212965</b:Latitude>
                    <b:LocationProperties/>
                    <b:LocationText>Mobile AL</b:LocationText>
                    <b:Longitude>-88.0431064579003</b:Longitude>
                    <b:PostalCode/>
                    <b:ProMilesLocationID>0</b:ProMilesLocationID>
                    <b:State/>
                    <b:Type>PROMILES</b:Type>
                    <b:Comments/>
                    <b:FlatRate>0</b:FlatRate>
                    <b:PerMileRate>0</b:PerMileRate>
                </a:HubLocation>
                <a:HubRouteFailures>0</a:HubRouteFailures>
                <a:HubRouteSuccesses>3</a:HubRouteSuccesses>
                <a:HubTrips>
                    <a:HubRouteTrip>
                        <a:HubLocation xmlns:b="http://schemas.datacontract.org/2004/07/com.promiles.PRIME.v4_2.Core">
                            <b:Address/>
                            <b:City/>
                            <b:Label/>
                            <b:Latitude>30.6941930212965</b:Latitude>
                            <b:LocationProperties/>
                            <b:LocationText>Mobile AL</b:LocationText>
                            <b:Longitude>-88.0431064579003</b:Longitude>
                            <b:PostalCode/>
                            <b:ProMilesLocationID>0</b:ProMilesLocationID>
                            <b:State/>
                            <b:Type>PROMILES</b:Type>
                            <b:Comments/>
                            <b:FlatRate>0</b:FlatRate>
                            <b:PerMileRate>0</b:PerMileRate>
                        </a:HubLocation>
                        <a:Index>0</a:Index>
                        <a:IsRouted>true</a:IsRouted>
                        <a:LegLocation xmlns:b="http://schemas.datacontract.org/2004/07/com.promiles.PRIME.v4_2.Core">
                            <b:Address>1900 Texas Ave</b:Address>
                            <b:City>Bridge City</b:City>
                            <b:Label/>
                            <b:Latitude>30.033469</b:Latitude>
                            <b:LocationProperties/>
                            <b:LocationText/>
                            <b:Longitude>-93.833206</b:Longitude>
                            <b:PostalCode>77611</b:PostalCode>
                            <b:ProMilesLocationID>0</b:ProMilesLocationID>
                            <b:State>TX</b:State>
                            <b:Type>PROMILES</b:Type>
                            <b:Comments/>
                            <b:FlatRate>0</b:FlatRate>
                            <b:PerMileRate>0</b:PerMileRate>
                        </a:LegLocation>
                        <a:Message>OK</a:Message>
                        <a:Miles>369.78</a:Miles>
                        <a:TripMinutes>308</a:TripMinutes>
                    </a:HubRouteTrip>
                    <a:HubRouteTrip>
                        <a:HubLocation xmlns:b="http://schemas.datacontract.org/2004/07/com.promiles.PRIME.v4_2.Core">
                            <b:Address/>
                            <b:City/>
                            <b:Label/>
                            <b:Latitude>30.6941930212965</b:Latitude>
                            <b:LocationProperties/>
                            <b:LocationText>Mobile AL</b:LocationText>
                            <b:Longitude>-88.0431064579003</b:Longitude>
                            <b:PostalCode/>
                            <b:ProMilesLocationID>0</b:ProMilesLocationID>
                            <b:State/>
                            <b:Type>PROMILES</b:Type>
                            <b:Comments/>
                            <b:FlatRate>0</b:FlatRate>
                            <b:PerMileRate>0</b:PerMileRate>
                        </a:HubLocation>
                        <a:Index>1</a:Index>
                        <a:IsRouted>true</a:IsRouted>
                        <a:LegLocation xmlns:b="http://schemas.datacontract.org/2004/07/com.promiles.PRIME.v4_2.Core">
                            <b:Address/>
                            <b:City/>
                            <b:Label/>
                            <b:Latitude>39.7391922839477</b:Latitude>
                            <b:LocationProperties/>
                            <b:LocationText>Denver CO</b:LocationText>
                            <b:Longitude>-104.984193155133</b:Longitude>
                            <b:PostalCode/>
                            <b:ProMilesLocationID>0</b:ProMilesLocationID>
                            <b:State/>
                            <b:Type>PROMILES</b:Type>
                            <b:Comments/>
                            <b:FlatRate>0</b:FlatRate>
                            <b:PerMileRate>0</b:PerMileRate>
                        </a:LegLocation>
                        <a:Message>OK</a:Message>
                        <a:Miles>1378.91</a:Miles>
                        <a:TripMinutes>1194</a:TripMinutes>
                    </a:HubRouteTrip>
                    <a:HubRouteTrip>
                        <a:HubLocation xmlns:b="http://schemas.datacontract.org/2004/07/com.promiles.PRIME.v4_2.Core">
                            <b:Address/>
                            <b:City/>
                            <b:Label/>
                            <b:Latitude>30.6941930212965</b:Latitude>
                            <b:LocationProperties/>
                            <b:LocationText>Mobile AL</b:LocationText>
                            <b:Longitude>-88.0431064579003</b:Longitude>
                            <b:PostalCode/>
                            <b:ProMilesLocationID>0</b:ProMilesLocationID>
                            <b:State/>
                            <b:Type>PROMILES</b:Type>
                            <b:Comments/>
                            <b:FlatRate>0</b:FlatRate>
                            <b:PerMileRate>0</b:PerMileRate>
                        </a:HubLocation>
                        <a:Index>2</a:Index>
                        <a:IsRouted>true</a:IsRouted>
                        <a:LegLocation xmlns:b="http://schemas.datacontract.org/2004/07/com.promiles.PRIME.v4_2.Core">
                            <b:Address/>
                            <b:City/>
                            <b:Label/>
                            <b:Latitude>32.42172062951977</b:Latitude>
                            <b:LocationProperties/>
                            <b:LocationText/>
                            <b:Longitude>-90.13338547309445</b:Longitude>
                            <b:PostalCode/>
                            <b:ProMilesLocationID>0</b:ProMilesLocationID>
                            <b:State/>
                            <b:Type>PROMILES</b:Type>
                            <b:Comments/>
                            <b:FlatRate>0</b:FlatRate>
                            <b:PerMileRate>0</b:PerMileRate>
                        </a:LegLocation>
                        <a:Message>OK</a:Message>
                        <a:Miles>201.4</a:Miles>
                        <a:TripMinutes>199</a:TripMinutes>
                    </a:HubRouteTrip>
                </a:HubTrips>
                <a:ResponseMessage i:nil="true"/>
                <a:ResponseStatus>SUCCESS</a:ResponseStatus>
                <a:RoutingMethod>PRACTICAL</a:RoutingMethod>
            </RunHubRouteResult>
        </RunHubRouteResponse>
    </s:Body>
</s:Envelope>

Related

HubRouteResultCredentialsTripLegRouteMethod