Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / September 2005

Tip: Looking for answers? Try searching our database.

Calling a web service from ASP

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Igor - 23 Sep 2005 16:14 GMT
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 - 26 Sep 2005 15:03 GMT
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)))

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.