Take the 2-minute tour ×

Are there any examples that i can find to know access wsdl operations from the jquery? i got an wsdl with 3 operations on it. (add , update , delete) how can i pass the parameters for these operations from the jquery? is there any specific way to do that? Appreciate your guidance. Thank you all in advance.

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

If the web service is not running on the same origin (host:port) as your site it won't work due to same-origin-policy. You can use a serverside script (PHP, Python, etc.) to proxy the requests though.

If the origins are the same, have a look at Simplest SOAP example using Javascript

share|improve this answer
Thanks a lot for your response. yes in my case origins are the same. i am new to webservice technology and i am wondering how can i get the operations that i need to access and pass the parameters to them. according to the example shall i access my service like this http://localhost:8080/test.asmx?op=Add' and another question i am wondering is how can i pass parameters. i need to pass testName(String)` & testId(int) as parameters. appreciate your help. –  Sam Apr 20 '11 at 14:02
I found a solution and i need to access server side proxies to access the webservice. that is because of the domain issue. when service is on domain 1 and my jsp works on domain 2 XMLHttpRequest object will never allow me to access the webservice. (security concerns). so that i need to get the back end webservice access to retrieve the results from the service. –  Sam Apr 22 '11 at 13:52
What happens if i used an Iframe? is this possible? ( access cross domain web service from a java script) –  Sam Apr 26 '11 at 17:49
add comment

Your Answer


