Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4607058
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T00:39:00+00:00 2026-05-22T00:39:00+00:00

I want to access open API through ajax in mobile application, its work fine

  • 0

I want to access open API through ajax in mobile application, its work fine in iphone but does not working in Android phonegap application:

returning error->"error message-null,typeerror-Result of expression 'data'[null] is not an object and error status-parsererror"

Is there any browser setting need to follow.

I want to call the web service in android-phonegap application:

$.ajax({  
   url:'stringURL',  
   beforeSend: function(x) {      
     x.setRequestHeader('Authorization','username/pwd');  
   },  
   dataType:"xml",  
   contentType:'application/xml',  
   timeout:10000,  
   type:'POST',  
   success:function(data) {  
     alert(data);  
   },  
   error:function(XMLHttpRequest,textStatus, errorThrown) {     
     alert("Error status :"+textStatus);  
     alert("Error type :"+errorThrown);  
     alert("Error message :"+XMLHttpRequest.responseXML);  
   }
});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T00:39:00+00:00Added an answer on May 22, 2026 at 12:39 am

    It seems that there is a parse error on the data fetched. You want the XMLHttpRequest to parse XML data, so the fetched URL has to return valid XML. There are several possible reasons why that works on one but fails on another platform:

    -The browser request headers may be different, resulting in a different server answer. Some servers may give HTTP 200 status answers with some error message in case of problems, which doesn’t parse to valid XML.

    -The returned XML may be problematic and parses well on the iPhone due to quirks in the browser there but fail on another WebKit version / variant the Android uses.

    -The fetched data is damaged due to other request headers, provider, proxy or other effects. For example some proxys only handle HTTP/1.0 requests, and bad behaving servers serve HTTP/1.1 with chunked encoding every time, so the XML will be damaged by the chunk headers.

    For debugging purposes you can change the request to a text request and show the fetched data, or even save it to the devices SD card if possible in your application. You can then verify it has arrived intact and is in fact valid XML.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to access from my application to youtube to open a channel. I've
How can I deny access to a file I open with fstream? I want
I want to access the call stack at runtime in a Native C++ application.
I want to access MySQL through ruby on a shared linux server. I figure
I have want to allow open access to the home page of a CakePhp
I use twill (0.9) and I want to also access its builtin mechanize distribution
I'm working through the Facebook API for my iPhone app, and have two questions:
I want to open Outlook from Javascript, it's for an internal application, nothing that
I have api keys which i don't want to show in public but still
I have an Access application that's currently using the fhandlefile() procedure here: http://access.mvps.org/access/api/api0018.htm ...to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.