-
May 12th, 2011, 11:12 PM
#1
Thread Starter
Hyperactive Member
How to use web services?
Hi guys. Im planing to transfer 1 data entry in my database to the server using web services, is this possible? how to do it? i have no idea.
The client computer and server are not connected on LAN, my data transfer is via net.
Thanks
-
May 13th, 2011, 12:53 AM
#2
Re: How to use web services?
To consume a web service from a vb6 app, you could use the SOAP Toolkit 3.0
The web service in the server can be developed using vb6 or vb.net
JG
-
May 13th, 2011, 01:56 AM
#3
Thread Starter
Hyperactive Member
Re: How to use web services?
do you have samples?
what im planing is my current vb6 application will send a delimited string to the web service then the web service will process this and save to the server database, then response if successful or failed.
-
May 13th, 2011, 11:37 AM
#4
Re: How to use web services?
-
May 13th, 2011, 11:57 PM
#5
Thread Starter
Hyperactive Member
Re: How to use web services?
Im not familiar with it, and i guess it will take some time for me create another module for soap. Is there a way that vb6 can call a asp classic web services?
-
May 14th, 2011, 12:40 AM
#6
Thread Starter
Hyperactive Member
Re: How to use web services?
Code:
<!--#include file="db.asp"-->
<!--#include file="FUNCTIONS.asp"-->
<%
Dim strValue
dim aResult, mResult
strValue = Request.Querystring("strValue")
Select Case lcase(strValue)
Case "autosync"
aResult = LookUp("Status","MAINTENANCE","Code = 'AutoImport'")
mResult = Lookup("Status","MAINTENANCE","Code = 'ManualImport'")
If aResult = 1 or mResult = 1 then
response.write "RUNNING"
Else
response.write "OK"
End if
Case "masterdatasync"
If LookUp("Status","MAINTENANCE","Code = 'MasterDataSync'") = 1 then
response.write "ON"
Else
response.write "OFF"
End if
Case "productsync"
If LookUp("Status","MAINTENANCE","Code = 'ProductSync'") = 1 then
response.write "ON"
Else
response.write "OFF"
End if
End Select
I have this asp file, how can i call it in my vb6 application?
-
May 14th, 2011, 06:29 AM
#7
Re: How to use web services?
Did you read the article inside the link in post #4 ?
In a vb6 app, once referenced SOAP toolkit, with 3 lines max you can call the web service and recieve response
JG
-
May 14th, 2011, 12:52 PM
#8
Re: How to use web services?
"Web Service" can be a vague term.
SOAP is just one form they can take. Using the SOAPClient30 in a mindless fashion can work but only when nothing but simple data types are involved, and it still requires a hosted WSDL at the server site.
Using any of this in a copy/paste fashion is going to lead to lots of trial and error. You might try learning how it works first. For what you want the SOAP Toolkit is no help at all.
You have a simple HTTP GET to do here passing your strValue as a query string. No SOAP at all, and not even REST. For this you could use the AsyncRead method in VB6, the INet control, an XMLHTTPRequest object, a WinHTTPRequest object, the list goes on and on.
Example:
Code:
Private Function Request(ByVal URL As String, ByVal Value As String) As String
With New WinHttp.WinHttpRequest
.Open "GET", URL & "?strValue=" & Value, False
.Send
Request = .ResponseText
End With
End Function
See: WinHttpRequest Object
-
May 16th, 2011, 10:20 PM
#9
Thread Starter
Hyperactive Member
Re: How to use web services?
How to add WinHttp.WinHttpRequest?
-
May 17th, 2011, 11:05 AM
#10
Re: How to use web services?
Microsoft WinHTTP Services, version 5.1
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|