Solved

How do I address a specific function in a web service using AJAX?

Posted on 2011-02-25
3
357 Views
Last Modified: 2012-05-11
Dear Experts!

I am trying to call a SOAP based web service using AJAX.

How do I address a specific function/method in the web service?

And which parameter name should be used for the POST of the SOAP XML?

I do not want to use any js libs.

I expect I should use a parameter for the name of the function/method in the web service, but which name should this parameter have?

The web service is PHP based.

The WS is entirely SOAP based, only using a SOAP request XML message and SOAP reponse XML message.

In anticipation
Thank you

Best regards,
Henrik
0
Comment
Question by:Henrik_Nyholm
[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
  • 2
3 Comments
 
LVL 13

Accepted Solution

by:
devlab2012 earned 500 total points
ID: 34980647
you can address a specific as:

http://your_web_service_uri/method_name

see the following link for passing parameters using POST:
http://beradrian.wordpress.com/2007/07/19/passing-post-parameters-with-ajax/

name of parameters should be same as the names used in your web service.
0
 

Author Comment

by:Henrik_Nyholm
ID: 34980840
Dear devlab2012!

Thanks for reply.

Anyway, then how do I make a PHP file accepting '/method_name' as query string?

Thank you,

Henrik
0
 
LVL 13

Expert Comment

by:devlab2012
ID: 34986830
I am not very sure about how it works in PHP, but you can try passing it as a query string variable as follows:

http://mydomain.com/my_web_service.php?MethodName=MyTestMethod

In your php file, you can check the value of MethodName using $_GET["MethodName"] and do the processing accordingly.

Also, check the following link for creating a basic web service in PHP:
http://davidwalsh.name/web-service-php-mysql-xml-json
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

New Relic recently released its Synthetics product that allows for the creation of performance monitors that periodically test a site's performance. If you wish to test an interactive workflow New Relic employs Selenium WebDriverJS to run those test…
In order to have all security and back ups taken care of, WordPress users can sign up for services with WP Engine.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…

691 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