This is my SOAP webservice.i have donn. Bt it got error.This is my code.Can anyone help me.how to parse string in android. int string int int string string Thanks in advance.
public boolean callwebservice() {
boolean result = false;
int patid = 1;
String xml = "";
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
request.addProperty("PatientId", patid);
request.addProperty("AppointMentDate", appdate);
request.addProperty("TimeFrom", apptimeto);
request.addProperty("TimeTo", appfrom);
request.addProperty("ReasonForAppointMent", appreason);
request.addProperty("strxml", xml);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(request);
HttpTransportSE httpTransport = new HttpTransportSE(URL);
httpTransport.debug = true;
try {
httpTransport.call(SOAP_ACTION, envelope);
httpTransport
.setXmlVersionTag("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
// SoapObject response = (SoapObject) envelope.bodyIn;
SoapPrimitive response = (SoapPrimitive) envelope.getResponse();
System.out.println("myApp" + response.toString());
System.out.println("response" + response);
if (response.toString().equalsIgnoreCase("false")) {
result = true;
}
} catch (SocketException ex) {
System.out.println("Error : " + "Error on soapPrimitiveData() "
+ ex.getMessage());
ex.printStackTrace();
} catch (Exception e) {
System.out.println("Error : " + "Error on soapPrimitiveData() "
+ e.getMessage());
e.printStackTrace();
}
return result;