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

Posted on 2011-02-25
Medium Priority
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,
Question by:Henrik_Nyholm
  • 2
LVL 13

Accepted Solution

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


see the following link for passing parameters using POST:

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

Author Comment

ID: 34980840
Dear devlab2012!

Thanks for reply.

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

Thank you,

LVL 13

Expert Comment

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:


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:

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
This holiday season, we’re giving away the gift of knowledge—tech knowledge, that is. Keep reading to see what hacks, tips, and trends we have wrapped and waiting for you under the tree.
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…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

587 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