VB 6.0 如何调用 java web services
请各位大侠帮帮小弟,在vb 6.0 中如何调用 java 写的 web services 服务?不胜感激! --------------------编程问答-------------------- 我用的DOMDocument对象方法Dim xmlDoc As New DOMDocument
Dim xmlRootElement As IXMLDOMElement
xmlDoc.async = False
xmlDoc.validateOnParse = True
strPara = "http://localhost/soaplisten/TestSurvey.WSDL"
success = xmlDoc.Load(strPara)
If success = True Then
Set xmlRootElement = xmlDoc.documentElement
text1.text=xmlRootElement.text
endif --------------------编程问答-------------------- 多谢,我这个比较特殊,调用的是java xfire 写的web services 不知这个大侠做过吗?最好能贴上vb代码,感激不激! --------------------编程问答-------------------- 肥皂? --------------------编程问答--------------------
用什么做的web services 不是都一样吗?之前用过SoapClient和XMLHTTP的get方法也弄过
发小段代码你参考下吧
Private Sub Command1_Click()--------------------编程问答--------------------
Dim xHttp As New MSXML2.XMLHTTP
xHttp.open "get", "http://192.168.0.238:7777/JL238/services/IFMwebservice?method=getRateByFD&ConditionStr=1", False
xHttp.setRequestHeader "Content-Type", "xml; charset=utf-8"
xHttp.send
Text1.Text = xHttp.responseXML.Text
'Text1.Text = xHttp.responseXML.documentElement.Text
End Sub
Dim SoapC As SoapClient30--------------------编程问答-------------------- 用WebBrowser也可以,不过要处理多余的字符. 别的方法我就没了.
Set SoapC = New SoapClient30
Call SoapC.mssoapinit("http://192.168.1.12/good1/services/webservice1?wsdl")
Label1.Caption = SoapC.GetInfo("XXX")
Set SoapC = Nothing
补充:VB , 网络编程