eslamabdalgwadmohamed / ksoap2-android

Automatically exported from code.google.com/p/ksoap2-android
0 stars 0 forks source link

soap web service from android #49

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
public void CelsiusToFahrenheit() {  

    String SOAP_ACTION= "http://tempuri.org/CelsiusToFahrenheit";  
    String METHOD_NAME = "CelsiusToFahrenheit";    
    String NAMESPACE = "http://tempuri.org/";  
    String URL= "http://www.w3schools.com/webservices/tempconvert.asmx";

    SoapObject Request = new SoapObject(NAMESPACE, METHOD_NAME);    
    Request.addProperty("Celsius", "32");   
    SoapSerializationEnvelope soapEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);   
  soapEnvelope.dotNet = true;  
  soapEnvelope.setOutputSoapObject(Request); 
    AndroidHttpTransport httpTransport = new AndroidHttpTransport(URL);  
        try     {   
            httpTransport.call(SOAP_ACTION, soapEnvelope);   
            SoapPrimitive resultString = (SoapPrimitive)soapEnvelope.getResponse();   
            String res = resultString.toString(); 
        }   
        catch (Exception e)
        {        
            e.printStackTrace();
        } 

    } 

here i am getting SOCKET Exception.....Operation timed out...i am using
 "ksoap2-android-assembly-2.4-jar-with-dependencies.jar"

Original issue reported on code.google.com by shivha...@gmail.com on 7 Apr 2011 at 6:42

GoogleCodeExporter commented 8 years ago
Try with the latest version from this project, which is 2.5.4 and report back.

Original comment by mosa...@gmail.com on 7 Apr 2011 at 6:51

GoogleCodeExporter commented 8 years ago
Hi, I've tried with ksoap2-2.5.4-with-dependencies.jar, but still the 
httpTransport.call() giving operation timed out error! is there anything we 
need to do at sharepoint or is it possible to solve it from client itself. 
Please help me :)

Original comment by manju26...@gmail.com on 1 Jun 2011 at 4:01

GoogleCodeExporter commented 8 years ago
Its probably a networking issue. Check that your emulator/device can access the 
url. Also see http://code.google.com/p/ksoap2-android/wiki/Links

Original comment by mosa...@gmail.com on 6 Jun 2011 at 7:26

GoogleCodeExporter commented 8 years ago

Original comment by mosa...@gmail.com on 6 Jun 2011 at 10:45

GoogleCodeExporter commented 8 years ago
emulator can access this url..but still it gives that error..operation...does 
it because of https

Original comment by shivha...@gmail.com on 8 Jun 2011 at 9:46

GoogleCodeExporter commented 8 years ago
The url does not seem to be https. If it is ... jsut use a https transport 
class..

Original comment by mosa...@gmail.com on 8 Jun 2011 at 8:18

GoogleCodeExporter commented 8 years ago
Closing since there is no activity from requestor.

Original comment by mosa...@gmail.com on 23 Aug 2011 at 5:15