S
sandal
I'm trying to test out the office 2003 web services toolkit. I'm
referencing an article at
http://www.officezealot.com/Upload/Gunderloy_WebService_Article/Gunderlo
y_Webservice.aspx
which includes a demo of this technology, amoung other things.
I'm attempting to pull data from
http://www.webservicex.com/uszip.asmx
which does return data via browser.
I used the toolkit to create the various classes. The code attempts to
assign the discovered data to a textbox but it does not get that far.
The puzzling error message is 'wrong number of arguments or invalid
property assignment". There is one arg, string, so that does not seem to
be the issue. Per the example in the article it should work...this seems
to be a little used tech here but I'm hoping someone can spot what the
issue is.
Private Sub cmdTestUSAZip_Click()
Dim wsUSZip As New clsws_USZip
Dim varData As Variant
varData = wsUSZip.wsm_GetInfoByZIP("94111")
txtData01 = varData
End Sub
The class:
Public Function wsm_GetInfoByZIP(ByVal str_USZip As String) As
MSXML2.IXMLDOMNodeList
'*****************************************************************
'Proxy function created from http://www.webservicex.com/uszip.asmx?
wsdl.
'
'"wsm_GetInfoByZIP" is defined as XML. See Complex Types: XML
Variables in
'Microsoft Office 2003 Web Services Toolkit Help for details on
implementing XML variables.
'*****************************************************************
'Error Trap
On Error GoTo wsm_GetInfoByZIPTrap
Set wsm_GetInfoByZIP = sc_USZip.GetInfoByZIP(str_USZip)
Exit Function
wsm_GetInfoByZIPTrap:
USZipErrorHandler "wsm_GetInfoByZIP"
End Function
referencing an article at
http://www.officezealot.com/Upload/Gunderloy_WebService_Article/Gunderlo
y_Webservice.aspx
which includes a demo of this technology, amoung other things.
I'm attempting to pull data from
http://www.webservicex.com/uszip.asmx
which does return data via browser.
I used the toolkit to create the various classes. The code attempts to
assign the discovered data to a textbox but it does not get that far.
The puzzling error message is 'wrong number of arguments or invalid
property assignment". There is one arg, string, so that does not seem to
be the issue. Per the example in the article it should work...this seems
to be a little used tech here but I'm hoping someone can spot what the
issue is.
Private Sub cmdTestUSAZip_Click()
Dim wsUSZip As New clsws_USZip
Dim varData As Variant
varData = wsUSZip.wsm_GetInfoByZIP("94111")
txtData01 = varData
End Sub
The class:
Public Function wsm_GetInfoByZIP(ByVal str_USZip As String) As
MSXML2.IXMLDOMNodeList
'*****************************************************************
'Proxy function created from http://www.webservicex.com/uszip.asmx?
wsdl.
'
'"wsm_GetInfoByZIP" is defined as XML. See Complex Types: XML
Variables in
'Microsoft Office 2003 Web Services Toolkit Help for details on
implementing XML variables.
'*****************************************************************
'Error Trap
On Error GoTo wsm_GetInfoByZIPTrap
Set wsm_GetInfoByZIP = sc_USZip.GetInfoByZIP(str_USZip)
Exit Function
wsm_GetInfoByZIPTrap:
USZipErrorHandler "wsm_GetInfoByZIP"
End Function