connecting to web service through asp classic

Discussion in 'ASP General' started by lambelly, Mar 19, 2007.

  1. lambelly

    lambelly Guest

    I can connect to a web service via asp.net, but my client is using asp
    classic. In asp.net I do something very simple along the lines of:
    CmsApi cmsService = new CmsApi();
    Authenticate auth = new Authenticate();
    auth.userName = userName.Text;
    auth.passWord = passWord.Text;
    AuthenticateResponse authrep = new AuthenticateResponse();
    authrep = cmsService.Authenticate(auth);
    String response = authrep.@return;
    result.Text = response;

    And I get a valid response. in asp classic I try to do this:
    oSOAP.ClientProperty("ServerHTTPRequest") = True
    oSOAP.mssoapinit("http://www.urltothewebservice.com/webservice?wsdl")
    Set auth = Server.CreateObject("oSOAP.Authenticate")
    auth.userName = ""
    auth.passWord = ""
    results = oSOAP.Authenticate(auth)
    response.write results

    But I get an error saying that server.createobject failed. How do I
    create complex objects like Authenticate and AuthenticateResponse that
    are created automatically for me in .net in asp classic?
    lambelly, Mar 19, 2007
    #1
    1. Advertising

  2. lambelly wrote:
    > I can connect to a web service via asp.net, but my client is using asp
    > classic.


    I've posted some links to relevant articles in the past.
    I seem to recall 4GuysFromRolla had some good articles about it, so you
    may
    want to concentrate your google search on their site. IIRC, searching
    for
    "consume web service from classic asp" (no quotes) will give you some
    relevant links.



    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
    Bob Barrows [MVP], Mar 19, 2007
    #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. lambelly
    Replies:
    1
    Views:
    446
    Mark Rae
    Mar 19, 2007
  2. Celia Leung via .NET 247

    HELP!! Classic ASP and .net web service - service restarted often!

    Celia Leung via .NET 247, Apr 26, 2004, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    270
    Celia Leung via .NET 247
    Apr 26, 2004
  3. Wade

    Using an ASP.NET Web Service from classic ASP?

    Wade, Aug 2, 2005, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    269
    Manohar Kamath
    Aug 3, 2005
  4. jazzydance

    asp.net web service connecting to another web service

    jazzydance, Feb 7, 2010, in forum: ASP .Net Web Services
    Replies:
    3
    Views:
    793
    Mr. Arnold
    Feb 8, 2010
  5. David A. Beck
    Replies:
    10
    Views:
    987
    Scott McNair
    Apr 13, 2004
Loading...

Share This Page