Coilguns sound the safest bet now. As long as that's okay of course!Coilguns are power hogs and generally unsafe to use at ww2 level tech, though.
How about having a strange fantasy metal which acts like a memory polymer when you run a current through it?
Basically you have a gun with internals which rapidly deform to electricity in order to launch projectiles.
You have a "railgun" which uses mechanism akin to airguns and crossbows to launch projectiles by electricity. Rapid fire will be straining on the "memory metal" but on the other hand your shots will be considerably more powerful, depending on which setting you use.
At low end your bullets are akin to rifles from the last century while at higher power they'll be comparable to 12-15mm anti-tank rifles. For the better efficiency you'll be also carrying different ammo for the different roles. So the anti-tank rounds will be larger to make better use of the weapon. You can mix the loads and power settings for specialized purposes but it's usually not recommended.
Its issues will be the sensitivity to mud an dirt at the battery part (you'll insert D-size non-reusable batteries) and well, the whole fact it needs two kinds of "ammo". So logistics will be difficult outside your borders.
How does it sound?
Your nation will be the only place where they found this "memory metal" yet. And you traditionally refuse to sell this to anyone. Of course you should give it a better sounding fantasy name than "memory metal".
:p