Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 907886 - Last Review: November 3, 2005 - Revision: 1.1
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
SYMPTOMS
When 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.
CAUSE
This 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.
WORKAROUND
To 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 INFORMATION
When 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.
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
- Microsoft Visual Studio .NET 2003 Enterprise Developer
- Microsoft Visual Studio .NET 2003 Academic Edition
| kbsql2005webdata kbtshoot kbprb KB907886 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate
Be the first to leave feedback, to help others about this knowledge base
article.
(Optional) Name
(Optional)
Public URL Or Email
Comments
No
HTML -- Text Only Please