Calling a web service from ASP

Discussion in 'ASP .Net Web Services' started by Igor, Sep 23, 2005.

  1. Igor

    Igor Guest

    Hello y'all.
    I've been hitting my head against the monitor for the last two days
    trying to figure out the following.
    I have a perfectly good web service that I can call from VB.Net and it
    works like a charm.
    Now I am trying to transfer this call to classic ASP and run into
    problems.
    I am attempting to use XMLHTTP object in the following code:
    Dim objXMLHTTP, strReturn
    objXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP")
    objXMLHTTP.Open("GET", strURL, False)
    objXMLHTTP.Send()
    strReturn = objXMLHTTP.responseText
    objXMLHTTP = Nothing
    GetHTML = strReturn
    and here is strUrl:
    http://server/folder/webservice.asmx/method?parameter


    This works fine on other people's web services, (for example:
    "http://www5dev.nau.edu/asd/webservices/randomchars/randomchars.asmx/R...")

    however, when I am trying to pass parameters, it's crashing on the
    first / after .asmx
    ".....webservice.asmx/methodName?parameter1=..." throwing the message
    that it can not find the method.
    Question:
    Do I have to configure my webservice in some way to allow it to accept
    parameters?
    Do I need to use command line arguments?
     
    Igor, Sep 23, 2005
    #1
    1. Advertising

  2. Igor

    Igor Guest

    I just got an e-mail from the developer who originaly posted this code.

    Here is the solution:
    In the Web.Config post this:
    <webServices>
    <protocols>
    <add name="HttpSoap"/>
    <add name="HttpGet"/>
    <add name="HttpPost"/>
    </protocols>
    </webServices>

    And voila - you got yourself a soapless call to a webservice.
    I love being a developer!!!...:0)))
     
    Igor, Sep 26, 2005
    #2
    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. hocho888
    Replies:
    1
    Views:
    661
  2. Michael Averstegge
    Replies:
    0
    Views:
    4,277
    Michael Averstegge
    Jan 10, 2006
  3. Replies:
    1
    Views:
    245
    Joe Kaplan \(MVP - ADSI\)
    Jun 14, 2006
  4. JC

    Calling a web service from a web service

    JC, Aug 16, 2003, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    126
    Tom Vande Stouwe MCSD.net
    Aug 20, 2003
  5. Mr. x

    calling web-service from another web-service

    Mr. x, Sep 29, 2003, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    131
    Mr. x
    Sep 29, 2003
Loading...

Share This Page