During WWII, the U.S. Army asked Harley-Davidson to design a specification of a motorcycle much like the BMWs used by German forces, with shaft drive, a boxer engine, and several other features that made the BMWs exceptionally reliable and low-maintenance machines. Harley was already producing the WLA, based on its traditional 45-degree V-twin but the army specifically wanted the one feature that the WLA didn’t have: shaft drive. So the company produced the XA, whose engine and drivetrain were based on the flathead BMW R71 versus the overhead valveBMW R75. 1000 XAs were produced for evaluation. By the time production had begun, it was clear that the Jeep was the Army's general purpose vehicle of choice. No more XAs were ordered after the initial order of 1000. The less advanced but cheaper WLA was considered sufficient for its limited roles. In 1943, the XA's leading link fork was replaced with Harley-Davidson's first telescopic fork.
Similar motorcycles in other countries
From 1942, the BMW R71 would serve as the basis for the IMZ-Ural and KMZ-Dnepr M72, and from 1956 the Chang Jiang CJ750 which likewise pressed it into military service though parts should not be considered interchangeable across marques despite visual similarities.
Cooling
According to the American Motorcyclist Association's Motorcycle Hall of Fame Museum, regarding the World-War-II-vintage Harley-Davidson XA, which has an opposed twin engine — "Mechanically, the large cooling fins stuck straight out in the breeze, reportedly keeping the XA’s oil temperature 100 F° cooler than a standard Harley 45." The latter was a transversely mounted V-twin, in which the air stream cannot reach the cylinders, especially the rear cylinder, as efficiently as on longitudinally mounted flat twin.
Related projects
Though the XA motorcycle was "dead" as far as the military was concerned for full-blown production, both the side-valve and overhead-valve versions of the XA engine were explored according to Jerry Hatfield in his book "Inside Harley-Davidson" 1990 published by Motorbooks International. A overhead-valve version XA motor was sent to Detroit Wax Paper for testing as a generator set. OHV XA motors of, with transmissions, were sent to Willys-Overland for testing as well as two blower-cooled XA motors for generators to be tested on tanks in 1943. There was even a Servi-Car prototype made called "The Model K" using the XA engine instead of the G motor planned for the 1946 model year.