Seeedstudio Wifi shield v1.1 Not working with Arduino Mega 2560
The WiFly library provided at the Seeedstudio wiki uses the software serial to communicate with the WiFi shield. All the example files provided by the WiFly library use pins 2 and 3 as the Rx and Tx of the software serial. Moreover, the Wifi shield only allows pins 0-7 to be chosen as Rx and Tx by using different jumper combinations.
The SoftwareSerial library, on the other hand, has the following limitation for the Arduino Mega


  Not all pins on the Mega and Mega 2560 support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 14, 15, 50, 51, 52, 53, A8 (62), A9 (63), A10 (64), A11 (65), A12 (66), A13 (67), A14 (68), A15 (69). 


Thus, as a workaround, I jumped pin 2 of the shiled with pin 10 (Rx of Software Serial) and pin 3 with pin 11 (Tx of Software Serial) using connecting wires and used the jumper setting given on the wiki. Finally I made the following changes in the example code

// Pins' connection
// Arduino       WiFly
//  10    &lt;----&gt;    TX (via connecting pin 2 to 10 on wifi shield)
//  11    &lt;----&gt;    RX (via connecting pin 3 to 11 on wifi shield)


SoftwareSerial uart(10, 11); //change software serial pins for Mega


This allowed the Mega to communicate with the Wifi shield successfully using the WiFly library.