LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 04-26-2012, 03:13 PM   #1
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Rep: Reputation: 83
PhoneGap/Android - requestXML is null


Hi!

I just developed a veeeeery simple application that uses SOAP. The js soap librery is here: http://www.codeproject.com/Articles/...pt-SOAP-Client

Now, I had to do some small changes to the implementation cause I think it was a little broken.

Anyway, the thing is that the wsdl file I'm using is retrieved from the web server but then responseXML is null (even though I set up apache to return that the file type is text/xml (and I'm checking that's the content-type by checking with wget).

Code:
---response begin---
HTTP/1.1 200 OK
Date: Thu, 26 Apr 2012 20:08:25 GMT
Server: Apache/2.2.20 (Ubuntu)
Last-Modified: Thu, 26 Apr 2012 19:35:12 GMT
ETag: "3e4944-9b8-4be9a161bbc00"
Accept-Ranges: bytes
Content-Length: 2488
Vary: Accept-Encoding
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/xml

---response end---
I checked and in responseText I get the content of the wsdl file.

So.... what's going on? Why is it not parsed as an xml file? Or how can I do the debuggin for it?

Thanks in advance.
 
Old 04-27-2012, 11:02 AM   #2
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Original Poster
Rep: Reputation: 83
I was just wondering that the problem could be not in phonegap but in lower layers, right? I mean, I just looked at the phonegap src for android and there's no ajax code wihich leads me to believe that phonegap is using android APIs for ajax processing.... which leads me to this questions:

How can I see what android is doing to do the ajax processing? are there ways to do this kind of debugging somehow? Thanks in advance.
 
Old 04-27-2012, 12:18 PM   #3
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Original Poster
Rep: Reputation: 83
I've been able to move on (at least a little bit) by checking if responseXML is null. If it is, I could parse again responseText using DOMParser.parseFromString(responseText, "text/xml");

I'm facing other problems now with the result of the parsing process. Let's see how far I can get.
 
Old 05-02-2012, 10:23 AM   #4
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Original Poster
Rep: Reputation: 83
I think it's solved. The thing is that if requestXML is null, yoy can still ask a DOMParser to do the parsing for you by hand, liek this:

Code:
var parser = new DOMParser();
newResponseXML = parser.parseFromString(req.responseText, "text/xml");
That should be enough.
 
  


Reply

Tags
phonegap, responsexml, soap, wsdl, xml


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Android App Build Environment Setup With Eclipse, PhoneGap (Ubuntu 11.04) LXer Syndicated Linux News 0 06-28-2011 08:50 AM
LXer: Setting Up An Android App Build Environment With Eclipse, Android SDK, PhoneGap (Debian Squeez LXer Syndicated Linux News 0 03-07-2011 10:50 PM
LXer: Android App Build Environment With Eclipse, Android SDK, PhoneGap (Fedora 14) LXer Syndicated Linux News 2 02-01-2011 11:11 AM
LXer: Setting Up An Android App Build Environment With Eclipse, Android SDK, PhoneGap (Ubuntu 10.10) LXer Syndicated Linux News 0 01-27-2011 11:30 AM
fstab-sync: error: libhal_ctx_init_direct: (null): (null) rpz Linux - Hardware 1 11-01-2005 05:42 AM


All times are GMT -5. The time now is 10:39 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration