It's not too much of a stretch to imagine this thing going bad, though I'd wager the initial conflict would be on the ground.
So let's say the Sultan opts not to accept Raisuli's demands in the hopes that by standing up to the Americans, he could win a bit of prestige on the world stage and advance his position as an independent nation (plausible?).
He issues a declaration fairly early on and Roosevelt is incensed ordering the Marines to seize the various customs houses as per the plan in OTL. This quickly turns bloody, causing the Moroccans to call on the French for aid, French forces engage the Marines, leading to the Marines calling in naval gunfire support from the American fleet. The actions of the American fleet pull the French fleet in and an engagement soon follows, with both sides saying the other shot first.
These actions in Morocco lead to Roosevelt declaring war on France (much to the dismay of Britain) and marshaling additional troops to "protect American interests abroad". Furthermore, feelers are sent out to see if America can gain any allies in the region. I could see Spain joining the US against France in Morocco and with American aid I could see them inflicting several defeats on the French, perhaps with the aid of local chieftains.
Now if Germany jumps on board, that'd be cool too, potentially being enough to start WWI. Germany supports the US/Spanish campaign in Morocco, and declares war on France, this brings in Russia to support France (Perhaps hoping for French aid against Japan?) which subsequently brings in Austria-Hungary on the side of Germany...This being 1904, there's no Schlieffen plan, so probably no invasion of Belgium meaning Britain stays out of this one...for now.