Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 621
  • Last Modified:

PhoneGap and XML / cURL

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
DanteAdmin
Asked:
DanteAdmin
1 Solution
 
Kim WalkerWeb Programmer/TechnicianCommented:
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
 
Ray PaseurCommented:
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
 
DanteAdminAuthor Commented:
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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now