Calling WS from Javascript

  • Thread starter Thread starter Ganesh Ramamurthy
  • Start date Start date
G

Ganesh Ramamurthy

Hi Experts,

I have written a .net Web Service. I want to invoke a web method from the
webservice, pass parameters to the webservice and get the resultant value
from the web service using javascript.

Can anyone tell me how to achieve this task?

Please Help....

Thanking you in advance

Regards
Ganesh
 
I have written a .net Web Service. I want to invoke a web method from the
webservice, pass parameters to the webservice and get the resultant value
from the web service using javascript.
You can use Microsofts WebService Behavior found here:
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/webservice/overview.asp

If you need to pass complex datatypes check out my article on serializing
objects between javascript and an XML webservice here:
http://dotnetjunkies.com/WebLog/anoras/archive/2004/08/13/21962.aspx

You might also be interested in these slides explaining different methods
for javascript based browser -> server communication (including web
services):
http://dotnetjunkies.com/WebLog/anoras/archive/2004/10/27/29972.aspx

Anders Norås
http://dotnetjunkies.com/weblog/anoras
 
Thanx Prateek for your reply.

I tried the same code out

Request format is unrecognized.

Can you tell me what this is??

Thanx in Advance
Regards
Ganesh
 
use webService.htc behavior or xmlhttp. i prefer xmlhttp. you will need to
find more document in msdn spending some time
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top