We are calling a web service and the web service returns an array of strings (in a Variant data type). We cannot determine how to convert the variant into a usable data type. Has anybody done anything similar?
If the service returns an array of strings, why not return it as an array of strings? One of the main benefits of web services is the ability to access them from other systems. By returning a Variant you are effectively making your web service a VB6/A - only tool.
Now that I'm off my soap box though, how are you trying to call this service at the moment?
[small]----signature below----[/small]
You can't fit a square data in a round table
Our web service is not returning a variant - that is how access interprets a complex type. Below is a snippet of the web service call from access (using a Microsoft tool to generate):
'Proxy function
'
'"wsm_ValidateAllTansferForPartnership" is an array with elements defined as String
'See Complex Types: Arrays in Microsoft Office 2003 Web Services Toolkit Help
'for details on implementing arrays.
'*****************************************************************
'Error Trap
On Error GoTo wsm_ValidateAllTransfersForPartnershipTrap
We finally figured out what was actually in the variant. An array with one element. The one element inside the array is a String array. The following code shows how we looped through it (some of the display details are omitted):
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.