Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Apr 2012
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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.

  • #2
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,277
    Thanks
    10
    Thanked 581 Times in 562 Posts
    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.
    Last edited by rnd me; 04-04-2012 at 04:35 PM.
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/5/28) IE7:0.1, IE8:5.3, IE11:8.4, IE9:3.2, IE10:3.2, FF:18.2, CH:46, SF:7.9, NON-MOUSE:32%

  • #3
    New to the CF scene
    Join Date
    Apr 2012
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •