Create Route Sync

Creates a RouteSync message body given a route.

Schema
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:m0="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
	<SOAP-ENV:Header>
		<m:AuthHeader xmlns:m="http://www.alk.com">
			<m:Authorization>String</m:Authorization>
			<m:Date>String</m:Date>
		</m:AuthHeader>
	</SOAP-ENV:Header>
	<SOAP-ENV:Body>
		<m:CreateRouteSyncMessage> xmlns:m="http://pcmiler.alk.com/APIs/v1.0">
			<m:Request>
				<m:Header>
					<m:DataVersion>String</m:DataVersion>
					<m:RequestType>String</m:RequestType>
				</m:Header>
				<m:Body>
					<m:OutOfRouteDistance>3.14159265358979E0</m:OutOfRouteDistance>
					<m:Compliance>Strict</m:Compliance>
					<m:IsFirstLegManaged>true</m:IsFirstLegManaged>
					<m:ManagedRoute>
						<m:RouteId>String</m:RouteId>
						<m:Stops>
							<m:StopLocation>
								<m:Address>
									<m:StreetAddress>String</m:StreetAddress>
									<m:City>String</m:City>
									<m:State>String</m:State>
									<m:Zip>String</m:Zip>
									<m:County>String</m:County>
									<m:Country>String</m:Country>
									<m:SPLC>String</m:SPLC>
									<m:CountryPostalFilter>US</m:CountryPostalFilter>
									<m:AbbreviationFormat>FIPS</m:AbbreviationFormat>
								</m:Address>
								<m:Coords>
									<m:Lat>String</m:Lat>
									<m:Lon>String</m:Lon>
								</m:Coords>
								<m:Region>Unknown</m:Region>
								<m:Label>String</m:Label>
								<m:PlaceName>String</m:PlaceName>
								<m:Costs>
									<m:CostOfStop>3.14159265358979E0</m:CostOfStop>
									<m:HoursPerStop>3.14159265358979E0</m:HoursPerStop>
									<m:Loaded>true</m:Loaded>
									<m:OnDuty>true</m:OnDuty>
									<m:UseOrigin>true</m:UseOrigin>
								</m:Costs>
								<m:IsViaPoint>true</m:IsViaPoint>
							</m:StopLocation>
						</m:Stops>
						<m:Options>
							<m:BordersOpen>true</m:BordersOpen>
							<m:ClassOverrides>None</m:ClassOverrides>
							<m:DistanceUnits>Miles</m:DistanceUnits>
							<m:FuelRoute>true</m:FuelRoute>
							<m:HazMatType>None</m:HazMatType>
							<m:HighwayOnly>true</m:HighwayOnly>
							<m:HubRouting>true</m:HubRouting>
							<m:OverrideRestrict>true</m:OverrideRestrict>
							<m:RouteOptimization>None</m:RouteOptimization>
							<m:RoutingType>Practical</m:RoutingType>
							<m:TollDiscourage>true</m:TollDiscourage>
							<m:TruckCfg>
								<m:Axles>0</m:Axles>
								<m:Height>String</m:Height>
								<m:LCV>true</m:LCV>
								<m:Length>String</m:Length>
								<m:Units>English</m:Units>
								<m:Weight>String</m:Weight>
								<m:Width>String</m:Width>
							</m:TruckCfg>
							<m:UseAvoidsAndFavors>true</m:UseAvoidsAndFavors>
							<m:VehicleType>Truck</m:VehicleType>
						</m:Options>
						<m:FuelOptions>
							<m:UserID>String</m:UserID>
							<m:Password>String</m:Password>
							<m:Account>String</m:Account>
							<m:FuelCap>3.14159265358979E0</m:FuelCap>
							<m:Level>3.14159265358979E0</m:Level>
							<m:MPG>3.14159265358979E0</m:MPG>
						</m:FuelOptions>
						<m:AFOptions>
							<m:AFSetIDs>
								<m0:int>0</m0:int>
							</m:AFSetIDs>
							<m:APIKey>String</m:APIKey>
							<m:Tags>
								<m0:string>String</m0:string>
							</m:Tags>
						</m:AFOptions>
					</m:ManagedRoute>
				</m:Body>
			</m:Request>
		</m:CreateRouteSyncMessage>
	</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
             

Request Body Elements

Gets or sets the request body which contains specific information associated with creating a RouteSync message body. Represents the request body of a MapRouteRequest allowing the user to control various settings relevant to creating a map.

Element Definition Required
Compliance An enumeration of OutOfRouteCompliance.
Member name Value Description
Strict 0 Strict RouteSync of route compliance
Moderate 1 Moderate RouteSync of route compliance
None 2 No RouteSync out of route compliance

Usage: Compliance = OutOfRouteCompliance.Modderate
N
IsFirstLegManaged A boolean value indicating whether or not the first leg of the route is managed. The default is true.

Usage: IsFirstLegManaged = "true"
N(default will be sent if not specified)
OutOfRouteDistance A decimal value. The maximum allowable out of route distance. The default is 0.2 miles.

Usage: OutOfRouteDistance = 5
N(default will be sent if not specified)
ManagedRoute A Route object. Sets the route to create the RouteSync message from an array of routes.

Usage: ManagedRoute = route
Y
Route A system object. Represents a route and all its associated information from the standpoint of a request either mapping or report.

Usage: Route route = new Route(){

RouteId = "123",

Stops = stops

};

Y
Calling CreateRoutesyncMessage
var stops = new StopLocation[2];
    stops[0] = new StopLocation()
    {
       Address = new Address
       {
         Zip = "19123"
       },
       Region = DataRegion.NA,
       RegionSpecified = true
    };
    stops[1] = new StopLocation()
    {
      Address = new Address
      {
        Zip = "08540"
      },
      Region = DataRegion.NA,
      RegionSpecified = true
    };

    Route route = new  Route()
    {
      RouteId = "123",
      Stops = stops,
      Options = new RouteOptions()
      {
        HighwayOnly = true,
        HighwayOnlySpecified = true,
        BordersOpen = true,
        BordersOpenSpecified = true,
        TollDiscourage = true
      }

    };
    CreateRouteSyncMsgRequestBody routeBody = new CreateRouteSyncMsgRequestBody()
    {
      Compliance = OutOfRouteCompliance.Moderate,
      ComplianceSpecified = true,
      IsFirstLegManaged = true,
      IsFirstLegManagedSpecified = true,
      OutOfRouteDistance = 5,
      OutOfRouteDistanceSpecified = true,
      ManagedRoute = route             
    };
    CreateRouteSyncMsgRequest req = new CreateRouteSyncMsgRequest()
    {
      Body = routeBody,
      Header = new RequestHeader()
      {
        DataVersion = DataVersion.ToString(),
        RequestType = "CreateRouteSyncMessage"
      }
    };
                             
    // Create the authentication and authorization header
    AuthHeader soapHeader = GenerateAuthHeader(APIName);

    // Create the service client
    ServiceClient service = new ServiceClient();
                    

    CreateRouteSyncMsgResponse response = service.CreateRouteSyncMessage(soapHeader, req);        
            

Request

Represents a request to draw a map, optionally with routes on it.

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header>
    <Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://pcmiler.alk.com/APIs/v1.0/IService/CreateRouteSyncMessage</Action>
    <h:AuthHeader xmlns="http://www.alk.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:h="http://www.alk.com">
      <Authorization>A77097D2D202A743BB1660E15794D7CA</Authorization>
      <Date>Thu, 21 Aug 2014 16:23:26 GMT</Date>
    </h:AuthHeader>
  </s:Header>
  <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <CreateRouteSyncMessage xmlns="http://pcmiler.alk.com/APIs/v1.0">
      <Request>
        <Header>
          <DataVersion>current</DataVersion>
          <RequestType>CreateRouteSyncMessage</RequestType>
        </Header>
        <Body>
          <Compliance>Moderate</Compliance>
          <IsFirstLegManaged>true</IsFirstLegManaged>
          <ManagedRoute>
            <RouteId>routeSync</RouteId>
            <Stops>
              <StopLocation>
                <Address>
                  <StreetAddress xsi:nil="true" />
                  <City xsi:nil="true" />
                  <State xsi:nil="true" />
                  <Zip>19123</Zip>
                  <County xsi:nil="true" />
                  <Country xsi:nil="true" />
                  <SPLC xsi:nil="true" />
                </Address>
                <Coords xsi:nil="true" />
                <Region>NA</Region>
                <Label xsi:nil="true" />
                <PlaceName xsi:nil="true" />
                <Costs xsi:nil="true" />
              </StopLocation>
              <StopLocation>
                <Address>
                  <StreetAddress xsi:nil="true" />
                  <City xsi:nil="true" />
                  <State xsi:nil="true" />
                  <Zip>08540</Zip>
                  <County xsi:nil="true" />
                  <Country xsi:nil="true" />
                  <SPLC xsi:nil="true" />
                </Address>
                <Coords xsi:nil="true" />
                <Region>NA</Region>
                <Label xsi:nil="true" />
                <PlaceName xsi:nil="true" />
                <Costs xsi:nil="true" />
              </StopLocation>
            </Stops>
            <Options>
              <BordersOpen>true</BordersOpen>
              <HighwayOnly>true</HighwayOnly>
              <TruckCfg xsi:nil="true" />
            </Options>
            <FuelOptions xsi:nil="true" />
            <AFOptions xsi:nil="true" />
          </ManagedRoute>
        </Body>
      </Request>
    </CreateRouteSyncMessage>
  </s:Body>
</s:Envelope>
                

Response

Represents the output response for generating a Routesync message. The CreateRouteSyncMsgResponse Body gets or sets the response body which contains the RouteSync message bytes. Represents the request body of the CreateRouteSyncMsgResponse encapsulating the RouteSync message bytes.

CreateRouteSyncResponseBody Members
Element Definition
MessageBytes A byte[] value. Gets or sets the RouteSync message bytes.

Sample response
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header />
  <s:Body>
    <CreateRouteSyncMessageResponse xmlns="http://pcmiler.alk.com/APIs/v1.0">
      <CreateRouteSyncMessageResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
        <Header>
          <Type>CreateRouteSyncMessage</Type>
          <Success>true</Success>
          <DataVersion>28.0.24.5492</DataVersion>
          <Errors />
        </Header>
        <Body>       
             <MessageBytes>ACAA8f//////////AAAAANUFAAAUAFRNYW5hZ2VkUm91dGVEYXRhX3YyAAAAALz+5UEBABAAAAAAAIWdMwoBAIwOAAAAAIs25AkBAHwOAAAAAKmphw4BANAAAAAAALsWvMoCACwAAAAAAOWtCCYBAAgAAAAAALsWvMoCACwAAAAAAOWJpTQBABAAAAAAAIn5GhQBACAAAAAAALsWvMoCACwAAAAAAIn5GhQBACAAAAAAALsWvMoCACwAAAAAAIn5GhQBACAAAAAAALK/N1YCAMgEAAAAALsWvMoCACwAAAAAALK/N1YCAMgEAAAAAIn5GhQBACwAAAAAAIn5GhQBACwAAAAAAKHcmisBAAgACQAAAP//////////AABTCgAAAAEIAAAAAAwOAAC6BAAACAAAAAAAtdZ9TFV1GAfw330uKAiJXpmAVxFNVEyRVwFx8mo2inYt1LZqec7lHLiNRG6YuXxtneO9wMo2e9NAt+ZwmhmzdOlW9iY4X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+sIHeEVdLJ0UFe01lJ+x8L8oZ8jS6oQd42W6MILciXCjWqWxnkTU0afVgf5CNunVbvD/LlHJ2mnAjy2AKdkr8N8qm5OlFXkJvLdTpf3MA/Nut09WgDbzqo0/KzDdzeodOK2EbefVSnRyob+el9Ou3e0sjH9+j0685Gdkk3v9vInW06uWX+wTs6ZaU1cVlxFV17u4kdrVWUvLeJw3ZUUf/dUIiQ+94T7mgfZxkJT5PtF/Ak7II/wXOwEx6BR+Ex+BLcAFvhdtgMX4ctcDOc5LSdDFPgROgSluTJJ9uZMAtmwgyYBtNhDsyFed2K9VecttnCNstyhli/02m7C34KD8J22AEfCLMth+dRPwdPw6/g1/AM/B5ehj/AK/A6ZBiCI9AvAY7qNsqz0mG7Sjrgs9b93YgUeanpGanpWanyR4lj42vWOFTwOw==</MessageBytes>
        </Body>
      </CreateRouteSyncMessageResult>
    </CreateRouteSyncMessageResponse>
  </s:Body>
</s:Envelope>