Go Back   CodingForums.com > :: Client side development > JavaScript programming > Ajax and Design

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-04-2012, 03:02 PM   PM User | #1
deniska
New to the CF scene

 
Join Date: Apr 2012
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
deniska is an unknown quantity at this point
Calling webservice from javascript.

I have a php web service on the web and a corresponding .wsdl file.

Now I want to send a request, pass a parameter and receive the result from that php webservice. Tried looking for XMLHttpRequest examples, but I still can't figure out how do wrap up a call to a service, or to be more precise I still don't see how WSDL is passed.

Would appreciate some help.
Thanks.
deniska is offline   Reply With Quote
Old 04-04-2012, 04:28 PM   PM User | #2
rnd me
Senior Coder

 
rnd me's Avatar
 
Join Date: Jun 2007
Location: Urbana
Posts: 3,469
Thanks: 9
Thanked 466 Times in 450 Posts
rnd me is a jewel in the roughrnd me is a jewel in the roughrnd me is a jewel in the rough
yeah, nobody really uses soap for ajax, it's all about json now...
soap is really more for backend to backend systems, whereas ajax pretty much expects displayable or near-displayable data for the purpose of human consumption.
in practice, soap is just too much to use as a decent client/server interchange.


wsdl is a nice idea given the state of heterogeneous jsonp apis, but the fact remains that it hasn't really taken off in the js community.



there are not great xml tools for JS. jQuery has some, plus a lot of ajax tools that will help you get started.

i would forget about the wsdl and just worry about interfacing with the php on an as-needed basis defined by your apps needs.
__________________
my site (updated 5/13)
STATS (2013/5) HTML5:90.2% MOB:14% IE7:0.5% IE8:8.6% IE9:9.8% IE10:10%

Last edited by rnd me; 04-04-2012 at 04:35 PM..
rnd me is offline   Reply With Quote
Old 04-04-2012, 05:27 PM   PM User | #3
deniska
New to the CF scene

 
Join Date: Apr 2012
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
deniska is an unknown quantity at this point
Well it doesn't really matter for me. All I need is a web service written in PHP that receives a string and returns a string and a way to call it from JS. If you can point me to such an example, I'd be more than greatful.
deniska is offline   Reply With Quote
Reply

Bookmarks

Tags
java script, web services

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:30 AM.


Advertisement
Log in to turn off these ads.