You receive an "unspecified client error" error message when you run a Visual Basic for Applications program (840925)
The information in this article applies to:
- Microsoft Visual Basic for Applications 6.0
SYMPTOMSWhen you run a Microsoft Visual Basic for Applications (VBA)
program that calls an XML Web service method, you may receive the following
error message: Run-time error '-2147221504
(80040000)':
Client:Unspecified client error. CAUSEAn ArrayList object may contain elements of any
data type. Therefore, when the Microsoft .NET Framework generates Web Services
Description Language (WSDL) code that corresponds to an XML Web service method
that returns an ArrayList object, the WSDL code does not specify the data type of
the element that corresponds to the ArrayList object. When you try to call this XML Web service method, the Microsoft SOAP Toolkit cannot recognize the data type
of the element that corresponds to the ArrayList object. Therefore, the SOAP
Toolkit raises an error.WORKAROUNDIn the WSDL code that corresponds to the XML Web service
method, specify the data type of the element that corresponds to the ArrayList
object as anyType. To do this, follow these steps:
- Locate the WSDL code that corresponds to your XML Web
service, and then save this code as a WSDL contract file on your local
computer.
- In the WSDL contract file, locate the following WSDL code.
<s:complexType name="ArrayOfAnyType">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="anyType" nillable="true" />
</s:sequence>
</s:complexType> - Replace the code that you located in step 2 with
the following code.
<s:complexType name="ArrayOfAnyType">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="anyType" nillable="true" type="s:anyType"/>
</s:sequence>
</s:complexType> - Save and then close the WSDL contract file.
- In the proxy class file for the XML Web service, replace
the existing path of the WSDL contract information with the path of the WSDL
contract file that you saved on your local computer in step 4.
STATUS This
behavior is by design.REFERENCESFor more information, visit the following Microsoft
Developer Network (MSDN) Web sites:
Modification Type: | Major | Last Reviewed: | 6/21/2004 |
---|
Keywords: | kbXML kbWebClasses KbClientServer kbClientProtocols kbClient kbToolkit kberrmsg kbWebServices kbprb KB840925 kbAudDeveloper |
---|
|