Creating new account for other users by sending <iq/> packets

I read in an other posting that it should be possible to register other users by sending (logged in as admin) iq registration packets like:

test2

test2

but I receive errors doing this.

We would like to have the server closed for registration but possible for the admin user to create new accounts trough the xmpp protocoll.

Am I doing somthing wrong?

Many thanks!

Guido