Using Office 2003 Web Services Toolkit, invalid property assignment?

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
 
S

sandal

I've been able to get other webservices to work as expected using the
approach outlined below, but for some reason this particular one errors
out, even tho it is fine if called via browser. It doesn't look like
many have worked with this tech here, just thought I'd share that the
general approach below is ok, just something odd about that particular
webservice, at least as far as the Web Services Toolkit goes.
 
F

Fred Boer

Dear Sandal:

I have little or no expertise to offer you here, but I am currently
floundering around trying to learn how to use web services from within
Access.

I'm wondering if you'd mind corresponding with me on this topic offline...
If so, email me at the unmunged address below:

NO (e-mail address removed)

If you don't really want to be saddled with questions .. just ignore me - I
won't be hurt! ;)

Cheers!
Fred Boer
 

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

Top