A System.InvalidOperationException exception may occur when you try to use a Visual Studio .NET 2003 client application against a SQL Server 2005 native Web service (907886)
The information in this article applies to:
- Microsoft SQL Server 2005 Standard Edition
- Microsoft SQL Server 2005 Developer Edition
- Microsoft SQL Server 2005 Enterprise Edition
- Microsoft Visual Studio .NET (2003), Professional Edition
- Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2003), Academic Edition
SYMPTOMSWhen you try to use a Microsoft Visual Studio .NET 2003 client application against a Microsoft SQL Server 2005 native Web service, a System.InvalidOperationException exception may occur.CAUSEThis problem occurs because the System.Data.DataSet object that Visual Studio .NET 2003 uses does not support the XML Schema definition language (XSD) schemas that SQL Server 2005 generates.WORKAROUNDTo work around this problem, use the simple Web Services Description Language (WSDL) instead of the default WSDL. For example, use a URL that is similar to the following URL: http://<server>/<endpoint>?wsdlsimple MORE INFORMATIONWhen you use the default WSDL to communicate with a SQL Server 2005 native Web service, the response data type is defined as a DataSet object that contains the XML Schemas (XSD) that SQL Server 2005 generates. The DataSet object that Visual Studio .NET 2003 uses cannot parse the XML Schemas (XSD). Therefore, the application throws an exception.
When you use the simple WSDL to generate the stub class to communicate with a SQL Server 2005 native Web service, the response data type is defined as an array of XML that substitutes the XML Schema (XSD) data types for SQL Server 2005 system types. The application does not perform any additional parsing other than parsing the SOAP message into the array of XML.
Modification Type: | Major | Last Reviewed: | 11/3/2005 |
---|
Keywords: | kbsql2005webdata kbtshoot kbprb KB907886 kbAudDeveloper |
---|
|