It is impossible.
If you ignore all pieces but the corners, it is equivalent to a 2x2x2 cube. And it is impossible to turn one corner of a 2x2x2.
This is valid for any size, i.e. every NxNxN cube.
Credit goes to william122 who gave this answer first.
It is impossible to build a cube in a cube pattern like this.
On a 3x3 Rubik's Cube, it is not possible to switch two opposite or two adjacent corners.
There is another way to build a cue in a cube pattern on a 3x3.
Just follow this algorithm:
U' L' U' F' R2 B' R F U B2 U B' L U' F U R F'
Check out this page for some explanation on the notation.