• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Give values to a web service

Hello all,

I'm building an app which connects to various web services via ksoap2. Most of the services provide some sort of response in the form of a string which I use in the app, however one of the services doesn't actually provide a response to be used it simply takes the inputted vales and the .net service updates the relevant DB tables.

Would the set up and call to the service be the same as to the other services that I get information back from? My code is as follows;

SoapObject Request =
new SoapObject(NAMESPACE, METHOD_NAME);

Request.addProperty(
"Sub_Seq",Sub_Seq);

Request.addProperty(
"Start_Time",startDate.toString());

Request.addProperty(
"End_Time",endDate.toString());

Request.addProperty(
"Status",Status_Id);



SoapSerializationEnvelope envelope =
new SoapSerializationEnvelope(SoapEnvelope.VER11);

envelope.
dotNet = true;

envelope.setOutputSoapObject(Request);


aht =
new AndroidHttpTransport(URL);




try {






aht.call(
SOAP_ACTION, envelope);


}

catch (Exception e)

{

e.printStackTrace();




}
 
[...] one of the services doesn't actually provide a response to be used it simply takes the inputted vales and the .net service updates the relevant DB tables.

Is the web service sending back a 200 or 202 HTTP status code in response to the post? According to SOAP 1.2 specification for the SOAP HTTP binding, a 200 ("OK") response implies the response body contains a SOAP envelope. Only a 202 ("Accepted") response may have an empty response body.
 
Back
Top Bottom