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

Discussion in 'ASP .Net Web Services' started by mehdi_mousavi, May 2, 2005.

  1. 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
    mehdi_mousavi, May 2, 2005
    #1
    1. Advertising

  2. mehdi_mousavi

    Jonas Knaus Guest

    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

    "mehdi_mousavi" <> schrieb im Newsbeitrag
    news:...
    > 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
    >
    Jonas Knaus, May 2, 2005
    #2
    1. Advertising

  3. 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
    mehdi_mousavi, May 2, 2005
    #3
  4. Yunus Emre ALPÖZEN [MCAD.NET], May 2, 2005
    #4
  5. 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
    mehdi_mousavi, May 3, 2005
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    6
    Views:
    4,778
    Tor Iver Wilhelmsen
    Aug 29, 2005
  2. rup
    Replies:
    10
    Views:
    696
    CBFalconer
    Jan 7, 2007
  3. serge calderara

    HTTP GET vs HTTP POST protocol

    serge calderara, Nov 4, 2005, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    565
  4. n3d!m

    Http post and http get

    n3d!m, Jan 25, 2012, in forum: Python
    Replies:
    2
    Views:
    331
    n3d!m
    Feb 6, 2012
  5. Fred
    Replies:
    17
    Views:
    235
Loading...

Share This Page