If you want us to help you, then you need to provide the information that's necessary to do so:
I take it you have made sure by some means that all code -up to and including line 47- are actually executed?
have you ever gotten [ the emulator ] to send a successful request via XMLHttpRequest, in any context?