Football Fans: Download the 2012 Schedule App from Google Play!


Go Back   Android Forums > Android Development > Application Development > Developer 101

Developer 101 101 Tutorials



Reply
 
LinkBack Thread Tools
Old November 30th, 2011, 07:16 AM   #1 (permalink)
Junior Member
 
Join Date: Oct 2011
Posts: 21
 
Device(s):
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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();




}

the phantom is offline  
Reply With Quote
Sponsors
Old November 30th, 2011, 02:13 PM   #2 (permalink)
Premium Member
 
Join Date: Oct 2011
Location: Sydney, Australia
Posts: 193
 
Device(s): Galaxy Nexus GSM
Thanks: 2
Thanked 37 Times in 33 Posts
Default

Quote:
Originally Posted by the phantom View Post
[...] 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.
jiminaus is offline  
Last edited by jiminaus; November 30th, 2011 at 02:23 PM. Reason: Re-did the response after delving further into the SOAP HTTP binding
Reply With Quote
Reply

Bookmarks


Go Back   Android Forums > Android Development > Application Development > Developer 101 User CP
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -5. The time now is 08:17 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Custom vBulletin Skins by: Relivo