Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
[email protected] webmail now available. Want one? Go here.
Cannot use outlook/hotmail/live here to register as they blocking our mail servers. #microsoftdeez
Obey the Epel!

Paste

Pasted as Java by Arunpandiyan Murugesan ( 12 years ago )
String res=null;
    String SOAP_ACTION = "http://www.webserviceX.NET/GetCitiesByCountry";
    String NAMESPACE ="http://www.webserviceX.NET/";
    String METHOD_NAME = "GetCitiesByCountry";
    String URL = "http://www.webservicex.com/globalweather.asmx";
    SoapObject request = new SoapObject(NAMESPACE,METHOD_NAME);
    request.addProperty("CountryName", c_name[0]);
    Log.e("CountryName", c_name[0]);
    SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
    envelope.setOutputSoapObject(request);
    envelope.dotNet= true;
    HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
    try {
  androidHttpTransport.call(SOAP_ACTION,envelope);
  String result= androidHttpTransport.responseDump;
  if(result!=null){
   //Do Something With the result
  }
  else {
   return null;
       }
    }
    catch (SocketTimeoutException e) {
  Log.e("Exception : ","Socket Time Out Exception");
    }
    catch (Exception e) {
  e.printStackTrace();
  Log.e("Exception Occurred : ",e.getMessage());
    }

 

Revise this Paste

Your Name: Code Language: