Calling a web service from ASP

I

Igor

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?
 
I

Igor

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)))
 

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,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top