Alternative for MS SOAP

V

Vinod

Hi Team,

I just want to know whether any alternative is there to access Web Service
Method than using SOAP Tool kit & Call.

Early reply is greatly appreciated.

-Vinod
 
N

Nakul Joshi

Hi,

Yes there are other ways to call a webservice:

1. You can use MSXML object to fire a HTTP get/post
request on the webservice.(ASP and VB 6.0 can use this)

2. In .NET you use WebRequest class in System.Net to fire
post/get request on the web service. please see the sample
code

Dim req As WebRequest = WebRequest.Create(txtURI.Text)

Try
Dim result As WebResponse = req.GetResponse()
Dim ReceiveStream As Stream =
result.GetResponseStream()

Dim read() as Byte = new Byte(512) {}
Dim bytes As Integer = ReceiveStream.Read(read,
0, 512)

txtHTML.InnerHtml = ""
While (bytes > 0)
Dim encode As Encoding =
System.Text.Encoding.GetEncoding("utf-8")
txtHTML.InnerHtml = txtHTML.InnerHtml &
encode.GetString(read, 0, bytes)
bytes = ReceiveStream.Read(read, 0, 512)
End While
Catch Exc As Exception
txtHTML.InnerHtml = "Error retrieving page"
End Try

Incase u need any futher help please get back to me.

Thanks
Nakul
 
N

Nakul Joshi

Here's a Sample code for ASP 3.0

Dim objXmlHttp
Dim strHTML
Set objXmlHttp = Server.CreateObject("Msxml2.XMLHTTP")
objXmlHttp.open "GET", URL, False
objXmlHttp.send
strHTML = objXmlHttp.responseText

Hope this would help

Nakul
 
V

Vinod

Hi,

Please do suggest a solution for the below.

My Code Given Below:

Dim oXml
dim url
Dim sContent

url = "http://..../..../Infows.asmx/"
url = url & "DoBudgetSearch?intVillaOnly=1"

Set oXml = Server.CreateObject("Microsoft.XMLHTTP")
oXml.Send

sContent = oXml.responseText

Response.Write sContent

Set oXml = Nothing


The above works OK. But in my case, I have only ".wsdl" file in my url.
e.g. url = "http://..../..../Infows.wsdl/"

Please suggest whether any method is there to directly pass values to a
"wsdl" file & get the out put, other than using "SOAP object".

Thanks in Advance

-Vinod
 

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

Forum statistics

Threads
474,262
Messages
2,571,056
Members
48,769
Latest member
Clifft

Latest Threads

Top