You cannot create a form from a Web service that returns an ADO.NET dataset in InfoPath 2003 (822020)
The information in this article applies to:
- Microsoft Office InfoPath 2003
For a Microsoft Visual Basic .NET version of this article, see 831795.
SYMPTOMSWhen an InfoPath form is created from a Web service that returns an ADO.NET DataSet (System.Data.DataSet), you may receive the following error message from InfoPath: The XML data file contains XML Schema Information, which is not allowed. CAUSEInfoPath cannot directly use ADO.NET DataSets. InfoPath works with generic XML payloads. ADO.NET DataSets that are returned by Web services are serialized as a special XML format that prevents the ADO.NET DataSets from working directly with InfoPath. - In the Web Service Description Language file that defines the methods and the properties of a Web service, the DataSet type is represented by an open schema tag, <xsd:any />. InfoPath can infer the schema of an XML document that is returned by a Web service. However, InfoPath must make a sample call to the Web service do this.
- An ADO.NET DataSet contains an inline schema that describes the data that is stored in it. This version of InfoPath does not support inline schemas.
- The data in an ADO.NET DataSet is wrapped in a <diffgr:diffgram> XML element that is not described in the inline schema. The XML elements that contain the data of the ADO.NET DataSet also have additional attributes that are not described in the schema. Because the data does not match the schema, the data cannot be validated in the InfoPath form.
- InfoPath does not have built-in support for change tracking that is similar to an ADO.NET DataSet. For example, an ADO.NET DataSet tracks the fields and the rows that have been added, changed, or deleted since changes were last accepted. (This is the purpose of the diffgram element and the "diffgr" namespace in the XML Stream.) To support change tracking, InfoPath would have to either ship the .NET Framework and host a DataSet object to manage the XML data or re-implement the functionality. Neither of these options is available in this version of InfoPath.
RESOLUTIONThis problem is resolved in Microsoft Office InfoPath 2003 Service Pack 1 (SP1). To resolve this problem, obtain the latest service pack for Microsoft Office 2003. InfoPath 2003 SP1 fully supports typed datasets and lets you create a form from a Web service that returns an ADO.NET DataSet in InfoPath 2003.
For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
870924
How to obtain the latest service pack for Office 2003
To work around this problem, create a new Web service method that takes the ADO.NET DataSet that is returned from the original Web service method. Remove the inline schema, the diffgram elements, and the attributes. Return the cleaned XML to InfoPath. See the "More Information" section for two possible implementations of this workaround. STATUS
This behavior is by design.
Modification Type: | Minor | Last Reviewed: | 7/28/2006 |
---|
Keywords: | kbtshoot kbXML kbprb KB822020 kbAudDeveloper |
---|
|