请教:如何用vb6.0调用web service?web service试用c#编的

year81s 2003-08-19 02:20:07
谢谢
...全文
47 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
wolflifeng 2003-08-28
  • 打赏
  • 举报
回复
我的方法没有问题,是测试过的 ,为什么不给我分?!
goodchen8 2003-08-22
  • 打赏
  • 举报
回复
免费电影告诉下载
http://free.dlmovie.net/movie/freemovie.asp?userid=zscsichen
year81s 2003-08-22
  • 打赏
  • 举报
回复
up
wolflifeng 2003-08-22
  • 打赏
  • 举报
回复
Dim s As String
Dim strA As String '采用异步调用web server 的方法
Dim oCls As clscalback2

On Error Resume Next
Set http1 = New MSXML2.XMLHTTP
strA = "submit1=Submit&verid=" + verid '参数头
http1.open "post", "http://211.138.14.167/version/Service1.asmx/getvertion", True
http1.setRequestHeader "Content-Length", Len(strA) '参数头
http1.setRequestHeader "CONTENT-TYPE", "application/x-www-form-urlencoded" '通过查询web server获得

Set oCls = New clscalback2
http1.onreadystatechange = oCls
http1.send (strA)


以下是类的默认函数,必须将该函数设成默认。
Public Function Foo1() '回调函数

Dim s As String
Dim s1 As String


If http1.ReadyState = 4 Then

s = http1.responseText
s = Mid(s, 1, Len(s) - 10)
For i = Len(s) To 1 Step -1
If Mid(s, i, 1) = ">" Then
Exit For
End If
Next i
s1 = Mid(s, i + 1)
FrmMain.Timer1.Enabled = False

If s1 <> "0" Then

Dim a As Integer

a = MsgBox("有最新的版本,要升级吗?", vbExclamation + vbYesNo, "是否升级")
If a = 6 Then

Shell "c:\windows\system32\ShengJi.exe", vbNormalFocus

End If

End If

End If



End Function


year81s 2003-08-21
  • 打赏
  • 举报
回复
我用的事api函数,socket,send,recv

用这些函数怎么调用web service 阿
starky 2003-08-20
  • 打赏
  • 举报
回复
参考:
http://expert.csdn.net/Expert/FAQ/FAQ_Index.asp?id=166594
online 2003-08-20
  • 打赏
  • 举报
回复
http://www.csdn.net/develop/read_article.asp?id=16406

12,162

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 Web Services
社区管理员
  • Web Services社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧