2013-04-11 58 views
0

任何人都可以幫助我使用SOAP Web服務編寫註冊頁面的代碼。我正在開發一個患者檢查應用程序,其中第一個用戶必須註冊。請幫助我任何人有任何關於此的想法。提前感謝。Android註冊並使用soap web服務登錄

回答

0

可以使用Ksoap2將數據發送到您的互聯網服務和記錄用戶。這裏有關使用該庫從Web服務獲取數據初學者教程(以理解的基礎知識)communicate between asp net webservice an android app using ksoap2

+0

任何人有任何教程註冊頁面使用SOAP Web服務 – 2013-04-15 06:07:44

+0

這個問題可能會幫助你[鏈接](http://stackoverflow.com/questions/12208875/how-to-create-login-page-in-android-use -ksoap2-web-service-sharepoint) – 2013-04-15 07:57:11

+0

你的鏈接對我沒有用,它有錯誤。如果你有任何其他的鏈接,然後讓我知道。提前感謝。 – 2013-04-15 10:41:17

0
  SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME1);   

     request.addProperty("userFirstname",sFirstName); 
     request.addProperty("userLastname",sLastName); 
     request.addProperty("dob",sBOD); 
     request.addProperty("gender",spinnersex.getSelectedItem().toString()); 
     request.addProperty("address",sAddress); 
     request.addProperty("city",sCity); 
     request.addProperty("state", sState); 
     request.addProperty("pincode",sAreaCode); 
     request.addProperty("mobile",sPhoneNo); 
     request.addProperty("mailid",sEmailId); 
     request.addProperty("bg",spinnerBloodgroup.getSelectedItem().toString()); 
     // request.addProperty("date",Date.getText().toString()); 
     request.addProperty("weight",sweight); 

     //Declare the version of the SOAP request 
     SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);  
     envelope.setOutputSoapObject(request); 
     envelope.dotNet = true; 
     try { 

      HttpTransportSE androidHttpTransport = new HttpTransportSE(URL); 

      //this is the actual part that will call the webservice 
      androidHttpTransport.call(SOAP_ACTION1, envelope); 
      Log.e("ressult","data"+ re); 

     SoapObject result = (SoapObject)envelope.getResponse(); 
      Log.e("value of result", " result"+result); 
      if(result!= null) 
      { 
       Toast.makeText(getApplicationContext(), "successfully register ", 2000).show() ; 
      } 
      else { 

       Toast.makeText(getApplicationContext(), "Try Again..", 2000).show() ; 
      } 

     } catch (Exception e) { 
      e.printStackTrace(); 
     } 

     return null; 

我覺得你的問題將這段代碼被解決,否則我給你簡要 描述