Link to home
Start Free TrialLog in
Avatar of Henrik_Nyholm
Henrik_NyholmFlag for Thailand

asked on

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

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
ASKER CERTIFIED SOLUTION
Avatar of devlab2012
devlab2012
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Henrik_Nyholm

ASKER

Dear devlab2012!

Thanks for reply.

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

Thank you,

Henrik
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