Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

PhoneGap and XML / cURL

Posted on 2013-02-01
3
Medium Priority
?
616 Views
Last Modified: 2013-02-08
I'm trying to access our web service through a PhoneGap development but haven't been able to figure out how to start and hoping that someone can point me in the right directon

I can get the web service to return an XML structure by posting this command as one example:
curl -d "method=showUser&userPhoneNo=987654321" http://localhost:8080/WhyQ/WhyQAppServlet

Open in new window


and to get it from a web page I use PHP and this command:
$ch = curl_init("http://URL:8080/WhyQ/WhyQAppServlet?method=showUser&userPhoneNo=0987654321");

Open in new window


Now in PhoneGap I can't use PHP but have learnt from research I can use Javascript to achieve this ... but I can't figure out how to do it after several hours of reading incl trial / error...

I would be very greatful if someone can point me in the right direction with a code snippet illustrating what commands would work to have this data displayed in PhoneGap

After doing research I've realised there might be something more required for me to host on the server where the web service is located or is that not necessary ?

I have access to the web server the web service is running

Many thanks,
Markus
0
Comment
Question by:DanteAdmin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 22

Accepted Solution

by:
Kim Walker earned 1500 total points
ID: 38850833
I am totally unfamiliar with PhoneGap so I can only make a suggestion here which is to search the internet for AJaX. AJaX stands for Asynchronous JavaScript and XML. In a nutshell you would use AJaX to send a request to a PHP script on the server which returns an XML structured set of data. Then you would use JavaScript on the client side to process that data into the web page. The entire process is much too complicated for this forum, but once you get familiar with the concept and begin to develop the process, you could post specific questions here for the experts to help you with.
0
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 38867715
To our fellow experts... Please see this other question before you devote a meaningful amount of time to this question.
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/Q_28023561.html#a38867701
0
 

Author Comment

by:DanteAdmin
ID: 38867792
Hi Ray_Paseur

I'm not sure what your grudge is against us but if you're annoyed for not being awarded points then I stand behind my last message to you, which was:

If you think I should've done it in a different way then I did please explain what you suggest I should have done ?

If none of the answers provide a solution to my question, would it not be misleading for others that are looking for a solution to a similar problem to Accept a Solution just because you want points ?

I closed that thread and linked to a question where the solution was posted.

Again, instead of trying to smudge our account, explain to me what you would've liked us to do different.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to use a free utility called 'Parkdale' to easily test the performance and benchmark any Hard Drive(s) installed in your computer. We also look at RAM Disks and their speed comparisons.
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
This video is in connection to the article "The case of a missing mobile phone (https://www.experts-exchange.com/articles/28474/The-Case-of-a-Missing-Mobile-Phone.html)". It will help one to understand clearly the steps to track a lost android phone.

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question