How to call a web method using http get/post?

M

mehdi_mousavi

Hi folks,
Is there anyway to call a web method over an HTTP protocol using the
GET/POST methods (without using the SOAP protocol)???

Any help would be highly appreciated,

Cheers,
Mehdi
 
J

Jonas Knaus

its possible by jusing JavaScript

i guess something likt his should work: (not tested...)

function JavaScriptService()
{
service.useService("http//localhost......");
callOpt = service.createCallotions();
callOpt.async = false;
callOpt.funcName = "JavaScriptService";

and so on....

then...

<form method="post">
<input type="submit" onClick="JavaScriptService() return(false);

<div id="service" style="behavior:url(webservice.htc)"/>

</form>

jonas
 
M

mehdi_mousavi

Oh! Consider a URL indicated in the submit tag of an "VXML". e.g.,

<?xml version="1.0"?>
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">
<form id="3">
<var name="a" expr="5"/>
<var name="b" expr="5"/>
<if cond="a==b">
<submit next="http://myserver/myservice/service1.asmx/Method1"
method="post"/>
</if>
</form>
</vxml>

I just thought that to invoke the Method1 of myservice webservice, I
have to call the following URL, using the post method:

http://myserver/myservice/service1.asmx/Method1

however, this did not work and Method1 is not called either.

Any idea?

Thanks
Mehdi
 
M

mehdi_mousavi

Thanks a lot; the problem is solved. However, the problem actually was
not how to call a web method over HTTP GET/POST. It was how to enable
HTTP GET/POST methods for a web service on .NET Framework 1.1 since the
mentioned protocols have been disabled by default on the mentioned
framework version.

Thanks
Mehdi
 

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top