Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > XML Web Service fails with System.InvalidOperationException returning a DataSet with RowErrors

Reply
Thread Tools

XML Web Service fails with System.InvalidOperationException returning a DataSet with RowErrors

 
 
Curly
Guest
Posts: n/a
 
      08-19-2003
QuickStart app "Update.EXE"
(installed to C:\Program Files\Microsoft Visual Studio .NET
2003\SDK\v1.1\QuickStart\winforms\samples\data\upd ate\cs)

....fails with the following error message when row 4
(key/customer ID "LETSS") or row 12 (key/customer ID "TRAIH") is
modified and saved.

This exception should not be raised.

Instead, the DataSet should be returned to the calling client
program so that it can report the RowErrors to the user.
(lines 392 thru 404 of UpdateForm.cs)

These rows contain apostrophes (') in the CompanyName column and
the Web Service UpdateCustomers.asmx contains code that
validates the columns checks for invalid characters using
Acme.InputValidator.IsSafeText()
The web service sets row.RowError and calls row.SetColumnError()
(lines 116 and 117 of UpdateCustomers.asmx.cs)

When these RowErrors are returned to the calling client, an
unexpected exception is raised as below:

"System.InvalidOperationException: There is an error in XML
document (1, 2556). ---> System.NullReferenceException: Object
reference not set to an instance of an object.\r\n at
System.Xml.Serialization.XmlSerializationReader.Un knownNode(XmlNo
de unknownNode, Object o)\r\n at
System.Xml.Serialization.XmlSerializationReader.Un knownNode(Objec
t o)\r\n at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlS erializationRea
der1 .Read3_SaveResponse()\r\n --- End of inner exception
stack trace -- -\r\n at
System.Xml.Serialization.XmlSerializer.Deserialize (XmlReader
xmlReader, String encodingStyle)\r\n at
System.Xml.Serialization.XmlSerializer.Deserialize (XmlReader
xmlReader)\r\n at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse
(Soa pClientMessage message, WebResponse response, Stream
responseStream, Boolean asyncCall)\r\n at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(Strin
g methodName, Object[] parameters)\r\n at
Microsoft.Samples.Windows.Forms.Cs.Update.localhos t.UpdateCustome
rs.S ave(DataSet customersDataSet) in C:\\Program
Files\\Microsoft Visual Studio .NET
2003\\SDK\\v1.1\\QuickStart\\winforms\\samples\\da ta\\update\\cs\
\Cli ent\\Web References\\localhost\\UpdateCustomers.cs:line
31\r\n at
Microsoft.Samples.Windows.Forms.Cs.Update.UpdateFo rm.SaveData()
in c:\\program files\\microsoft visual studio .net
2003\\sdk\\v1.1\\quickstart\\winforms\\samples\\da ta\\update\\cs\
\cli ent\\updateform.cs:line 211\r\n at
Microsoft.Samples.Windows.Forms.Cs.Update.UpdateFo rm.buttonSave_C
lick (Object sender, EventArgs e) in c:\\program
files\\microsoft visual studio .net
2003\\sdk\\v1.1\\quickstart\\winforms\\samples\\da ta\\update\\cs\
\cli ent\\updateform.cs:line 389"

To reproduce this:
- Open solution "Update.sln" in the QuickStart... directory (see
"installed to" directory above)
- F5 (Start)
- Click ">" (next) on the VCR until CustomerID "LETSS",
CompanyName "Let's Stop N Shop" is displayed
* Add a single SPACE to the end of any field.
- Press "Save" button.

-- Mark
Visual Studio .NET 2003 version 7.1.3088
Microsoft .NET Framework 1.1 version 1.1.4322
Windows 2000 Server 5.00.2195 SP4 253,424KB RAM

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Please Help me- Returning DataSet from a Web Service Sumaira Ahmad ASP .Net Web Controls 1 11-03-2004 02:27 AM
Please Help me- Returning DataSet from a Web Service Sumaira Ahmad ASP .Net Web Services 1 11-02-2004 05:04 PM
Please Help me- Returning DataSet from a Web Service Sumaira Ahmad ASP .Net 2 11-02-2004 01:18 AM
Please Help me- Returning DataSet from a Web Service Sumaira Ahmad ASP .Net Datagrid Control 0 11-01-2004 09:23 PM
[Urgent] Is there a size limit on returning a large dataset or a large typed array from web service? Ketchup ASP .Net Web Services 1 05-25-2004 10:11 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57