Solved

PhoneGap and XML / cURL

Posted on 2013-02-01
3
604 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 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 110

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

You should read OS supplied guidelines before developing. I can't stress that enough. The guidelines will help you understand the reasons mobile app developers do what they do.  Apple is very particular when they review appstore submissions.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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…

729 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