It looks like you are using the official WiFi Shield library, I don't think it's compatible with Xbee's WiFi.
You could try something like GitHub - Akira-Hayasaka/XBeeWiFi_Arduino: XBeeWiFi library for Arduino. ***work in progress*** (a port of mbed library), but I have not tried it (just using my own implementation). You'd need to switch xbee into API mode for this to work.