Solved

PhoneGap and XML / cURL

Posted on 2013-02-01
3
579 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
3 Comments
 
LVL 22

Accepted Solution

by:
Kim Walker earned 500 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 109

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Often, people trade privacy and security for convenience. However in today's concrete jungle, this is an extremely foolish decision considering the vast amount of technologies being used against consumer interest. First off, I won't waste any time e…
Owning a franchise can be the dream of a lifetime. It provides a chance for economic growth. You can be as successful as you want.  To make your franchise successful, you need to market it successfully. Here are six of the best marketing strategies …
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…

808 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