Actually RAW mode and network protocol (IPP, LPD, AppSocket/JetDirect) are two separate things.
The possible combinations are RAW+IPP, RAW+LPD, RAW+AppSocket, GenericPPD+IPP, GenericPPD+LPD and GenericPPD+AppSocket.
According to this post ("Printing remotely via CUPS isn't working - Prints @PJS Information") on UbuntuForums, when I get the "-12345X@PJL JOB" code, it is because CUPS tries to process the received data whereas it as already be processed by the Windows driver (thus the visible PJL code and the fact that it works when configuring the printer queue as RAW).
What I don't understand is why it works with "Standard" profile but does not with "Xerox WorkCentre 7845": the Windows driver changes his way of working (sends unprocessed when on "Standard" and sends processed when on "Xerox WorkCentre 7845")?!