private static final String WSDL_TARGET_NAMESPACE = "http://cfsdf.ffff.net"; SoapObject request = new SoapObject(WSDL_TARGET_NAMESPACE, FunctionName); try { PropertyInfo p1, p2, p3; p1 = new PropertyInfo(); p2 = new PropertyInfo(); p3 = new PropertyInfo(); p1.setName("username"); p1.setValue(usrname); p2.setName("password"); p2.setValue(password); p3.setName("first_name"); p3.setValue(sixValue); request.addProperty(p1); request.addProperty(p2); request.addProperty(p3); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER11); envelope.setOutputSoapObject(request); HttpTransportSE androidHttpTransport = new HttpTransportSE( WebServiceUrlRegistration); try { androidHttpTransport.call(SoapAction, envelope); SoapObject resultsRequestSOAP = (SoapObject) envelope.bodyIn; Object soapObj = resultsRequestSOAP.getProperty(0); String SoapString = soapObj.toString(); for (int j = 0; j < SoapString.length() && flag == 0; j++) { String tem = SoapString.substring(j, j + 3); if (tem.equals("id=")) { for (int m = j; m < SoapString.length() && flag == 0; m++) { if (SoapString.substring(m, m + 1).equals(";")) { id = SoapString.substring(j + 3, m); flag = 1; idInt = Integer.parseInt(id); } } } } } catch (Exception e) { e.getMessage(); } } catch (Exception e1) { e1.getMessage(); } /////////////////////////to fatch data/////////////////////////// String WebServiceUrlLogin = WebServiceUrl + "getlogin.php"; String FunctionName = "GetLoginInfo"; Boolean isUserValid = false; SoapObject request = new SoapObject(WSDL_TARGET_NAMESPACE, FunctionName); try { PropertyInfo p1, p2; p1 = new PropertyInfo(); p2 = new PropertyInfo(); p1.setName("username"); p1.setValue(UserName); p2.setName("password"); p2.setValue(Password); request.addProperty(p1); request.addProperty(p2); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER11); envelope.setOutputSoapObject(request); // SoapObject response = (SoapObject)this.call(SoapAction + // FunctionName, envelope); HttpTransportSE androidHttpTransport = new HttpTransportSE( WebServiceUrlLogin); try { androidHttpTransport.call(SoapAction, envelope); SoapObject resultsRequestSOAP = (SoapObject) envelope.bodyIn; Object soapObj = resultsRequestSOAP.getProperty(0); String SoapString = soapObj.toString(); for (int j = 0; j < SoapString.length() && flag == 0; j++) { String tem = SoapString.substring(j, j + 3); if (tem.equals("id=")) { for (int m = j; m < SoapString.length() && flag == 0; m++) { if (SoapString.substring(m, m + 1).equals(";")) { id = SoapString.substring(j + 3, m); flag = 1; idInt = Integer.parseInt(id); } } } } if (idInt != 0) { isUserValid = true; } PollMain.userId = id; ServiceCaller.UserInfoService = null; ServiceCaller.cityservicecaller = null; SurveyModuleActivity.userId=idInt; //PollMain.userId = "32"; // SoapPrimitive c // =(SoapPrimitive)resultsRequestSOAP.getProperty(0); // isUserAdd =new Boolean(c.toString()); } catch (Exception e) { e.printStackTrace(); } } catch (Exception e) { e.getMessage(); }