任何人都可以帮助我使用SOAP web service编写注册页面的代码。开发一个患者检查应用程序,其中第一个用户必须注册。 PLZ帮助我任何人对此有任何想法。谢谢你提前。
答案 0 :(得分:0)
查看此链接,对您非常有用:
http://www.c-sharpcorner.com/UploadFile/88b6e5/how-to-call-web-service-in-android-using-soap/
答案 1 :(得分:0)
您可以使用Ksoap2
将数据发送到您的网络服务并记录您的用户。这里有一个关于使用这个库从webservice获取数据的初学者教程(了解基础知识)communicate between asp net webservice an android app using ksoap2
答案 2 :(得分: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;
我认为您的问题将通过此代码解决,否则我会简要地给您 描述