Hi smit, first of all I was asking for connecting to a webserver hosted on localhost. When accessing 127.0.0.1 from your app inside the emulator the localhost is, in fact, the emulator.
To let the emulator access the webserver hosted on you PC you have to use 10.0.2.2. So for example if you are trying two builds of your app, one for Win32 and one for Android, you can do this:
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
curl_easy_setopt(curl, CURLOPT_URL, "http://127.0.0.1:9876/ts?wsdl");
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
curl_easy_setopt(curl, CURLOPT_URL, "http://10.0.2.2:9876/ts?wsdl");
Hope it helps.