I assume you have your 'own a wireless, router. You should have an access code to par the Wii to the router. The router is the machine that acts as if you had connected via a cable. If you are actually trying to connect with any other local connection (neighbor's router), then you will not succeed whilst you do not have their access codes. You can of course connect to remote public access hot spots if you are within range.
a link that may be of use too..connecting