473,800 Members | 2,368 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Android: Reading xml from .NET webservice

Sl1ver
196 New Member
Hi

I found a perfect example of using a web service

http://wowjava.wordpre ss.com/2011/01/16/login-application-for-android/

Really good tutorial.

I have implemented this and it works perfect the only problem is that once I get a response back the string reads the whole XML response created by the webservice.

Expand|Select|Wrap|Line Numbers
  1. try
  2.                 {
  3.                     response = CustomHttpClient.executeHttpPost("http://jonathan.dev.pushplay.co.za/ppws.asmx/signIn", postParameters);
  4.                     String res = response.toString();
  5.                     res= res.replaceAll("\\s+","");
  6.                     if (res.equals("true"))
  7.                     {
  8.                         set.setText("Logged in achieved");
  9.                     }else
  10.                     {
  11.                         set.setText("boom");
  12.                     }
  13.                 }catch(Exception ex)
  14.                 {
  15.                     Log.e(response, ex.toString());
  16.                 }
  17.  
here is what the string consists of once executed

<boolean xmlns="http://www.pushplay.co .za/webservice">fal se</boolean>

How do I get it just to use the variable that I need which is only the false.
Oct 21 '11 #1
0 1870

Sign in to post your reply or Sign up for a free account.

Similar topics

6
4330
by: MA | last post by:
Hi all! I know there is other newsgroups for webservices, but I don´t get any answers on those. I have developed a webservice that writeing and reading files in different folders. Question 1: I need to be able to stop this service by using a web interface
8
4195
by: Topper | last post by:
Hello. I have simple web folders structure: -ROOT - BIN WebService.dll WebService.asmx I need to use my WebService.dll not in bin folder - for example, in ROOT. How do i this? How can i do this without .config file only with some configuration
0
2141
by: asgars | last post by:
hi friends, i have a little problem while accessing the attributes returned through xml webservice. i am getting an XMLNode which i need to get into a dataset. Currently i am using this method: 1) Creating a Dataset ds and XMLNode node. 2) Reading from XMLNode into XMLNodeReader, reader. 3) Then getting data into dataset by ds.ReadXML(reader). I am able to fetch all the details.
0
1329
by: rakeshkumawat | last post by:
I am facing a problem while reading the result which is loaded in DOMDocument. In which I am sending a request to web service and getting a record of Single Order. This is my VB Code which is i am using.... ........................ Dim Connector As SoapConnector30 ' To connect to webservice Dim Serializer As SoapSerializer30 ' To serialize the XML data Dim Reader As SoapReader30 ' To read the Webservice...
0
1995
by: devidasari | last post by:
I have to interface the gprs modem to the serial port of beagle board before that i have to add gprs application program in the android OS. From where we get the gprs interfacing application. we get this from sites or i have to write the interfacing app?
0
1922
by: npm | last post by:
I'm trying to find out why the android browser won't load and/or display my XML data. It works fine on computer browsers (FF, IE, Safari, Chrome, Opera) and even in iPhone's Safari, but when I view the same page in my android's browser, nothing is displayed...it's just blank. <html> <head> <script type="text/javascript"> function loadXMLDoc(dname) { var xmlDoc; if (window.XMLHttpRequest) { xmlDoc = new window.XMLHttpRequest();...
0
2126
rahuljaiswal1987
by: rahuljaiswal1987 | last post by:
Hi all, I have a web service hosted in my network which is SOAP SECURED. I want to access it from my Android client application. I am using ksoap2 api to make android client to consume the service. I am able to access the service which is not secure but using soap api. But i am not able to call the secure service. Please tell me how to call a SOAP SECURED web service from ksoap2 client or tell me some other API on the place of ksoap2 which i...
1
3110
by: npm | last post by:
I'm trying to find out why the android browser won't load and/or display my XML data. This javascript works fine on computer browsers (FF, IE, Safari, Chrome, Opera) and even in iPhone's Safari, but when I view the same page in my android's browser, nothing is displayed...it's just blank. Is it a javascript bug in the android browser? <html> <head> <script type="text/javascript"> function loadXMLDoc(dname) { var xmlDoc; if...
0
9551
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10505
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10276
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10253
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7580
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6813
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5471
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4149
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.