1
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
                    //Property which holds input parameters
                    PropertyInfo celsiusPI = new PropertyInfo();
                    //Set Name
                    celsiusPI.setName("userotp");
                    //Set Value
                    celsiusPI.setValue(number);
                    //Set dataType
                    celsiusPI.setType(String.class);
                    //Add the property to request object
                    request.addProperty(celsiusPI);
                    //Create envelope
                    SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
                            SoapEnvelope.VER11);
                    envelope.dotNet = true;
                    //Set output SOAP object
                    envelope.setOutputSoapObject(request);
                    //Create HTTP call object
                    HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
                    try {
                        //Invole web service+   
                        androidHttpTransport.call(SOAP_ACTION, envelope);
                        //Get the response
                        output="Envelop";
                        SoapPrimitive response = (SoapPrimitive) envelope.getResponse();// error at these line
                        //Assign it to fahren static variable
                    } catch (Exception e) {
                        output=e.getMessage();
                        e.printStackTrace();
                    }

This is my code. problem is at creating object of soapPrimitve class with the help of getresponse method. while debugging it is going to catch block but not giving any exception. Please help me.

xyz
  • 21
  • 2

0 Answers0