Tried to catch post and write xml but failed