[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.webservices

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

Consultant

8/20/2003 4:52:00 PM

Hi Mark,
I really hope that someone from Microsoft will look into this. I have posted
at least twice as well as responding to others with this issue and have not
had any response from MS. It seems as though any dataset that contains row
errors will cause the web service method that returns this dataset to fail.

Roger

"Mark Cranness" <markcranness@yahnooospam.com.invalid> wrote in message
news:ee4d93b48b499ac59d87c7219c7c14a8@free.teranews.com...
> I am attempting to understand certain aspects of .NET by studing the
> QuickStart sample code.
>
> QuickStart app "Update.EXE"
> (installed to C:\Program Files\Microsoft Visual Studio .NET
> 2003\SDK\v1.1\QuickStart\winforms\samples\data\update\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.
>
> 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.UnknownNode(XmlNode
> unknownNode, Object o)\r\n at
> System.Xml.Serialization.XmlSerializationReader.UnknownNode(Object
> o)\r\n at
> Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1
> .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.SoapHttpClientProtocol.ReadResponse(Soa
> pClientMessage message, WebResponse response, Stream responseStream,
> Boolean asyncCall)\r\n at
> System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
> methodName, Object[] parameters)\r\n at
> Microsoft.Samples.Windows.Forms.Cs.Update.localhost.UpdateCustomers.S
> ave(DataSet customersDataSet) in C:\\Program Files\\Microsoft Visual
> Studio .NET
> 2003\\SDK\\v1.1\\QuickStart\\winforms\\samples\\data\\update\\cs\\Cli
> ent\\Web References\\localhost\\UpdateCustomers.cs:line 31\r\n at
> Microsoft.Samples.Windows.Forms.Cs.Update.UpdateForm.SaveData() in
> c:\\program files\\microsoft visual studio .net
> 2003\\sdk\\v1.1\\quickstart\\winforms\\samples\\data\\update\\cs\\cli
> ent\\updateform.cs:line 211\r\n at
> Microsoft.Samples.Windows.Forms.Cs.Update.UpdateForm.buttonSave_Click
> (Object sender, EventArgs e) in c:\\program files\\microsoft visual
> studio .net
> 2003\\sdk\\v1.1\\quickstart\\winforms\\samples\\data\\update\\cs\\cli
> ent\\updateform.cs:line 389"
>
> To reproduce this:
> - reboot PC
> - Open VS .NET
> - 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.
>
> 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)
>
> -- 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


3 Answers

§pamßuster

6/5/2012 2:13:00 AM

0

"Barry Bruyea" <damnthetorpedoes@duck.com> wrote in message
news:n27ss75vf9i7nqftkqfmicgi35tslajr45@4ax.com...
> On Tue, 05 Jun 2012 06:52:19 -0700, Chom Noamsky <chom@noamsky.here>
> wrote:
>
>>On 6/5/2012 6:47 AM, Seneca wrote:
>>> Whichever party wins this swing (but usually Democrat) state election
>>> will probably be victorious this fall. And will have huge
>>> implications on our future. In other words a victory for recall would
>>> augur well for Obama, congressional Democrats and big unions in November.
>>>
>>> On the other hand, a Republican victory for Scott Walker would mean his
>>> policies of fiscal responsibility, balanced budgets, lower taxes, and
>>> end to collective bargaining for government unions, would be crushing
>>> for Obama's Democrats. So pay close attention to tonight's results. They
>>> could affect Canada and the Western world profoundly.
>>
>>It could turn out that not all retired public school teachers become
>>pretend laissez faire capitalists when they retire.
>
> Imagine having to enroll in Union Managed Health Insurance, much more
> expensive than other plans. Who'd a thunk it?
>


?pam?uster

6/5/2012 2:13:00 AM

0



--
SPAMMED INTO IRRELEVANT GROUPS - AND CUT
=================================================
"Chom Noamsky" <chom@noamsky.here> wrote in message news:jql2ur$i3l$1@dont-email.me...
>

Buster Norris

6/5/2012 10:58:00 PM

0

On Tue, 05 Jun 2012 06:52:19 -0700, Chom Noamsky <chom@noamsky.here>
wrote:

Mind your own business, shiteating Canadian faggot..............


>On 6/5/2012 6:47 AM, Seneca wrote:
>> Whichever party wins this swing (but usually Democrat) state election
>> will probably be victorious this fall. And will have huge
>> implications on our future. In other words a victory for recall would
>> augur well for Obama, congressional Democrats and big unions in November.
>>
>> On the other hand, a Republican victory for Scott Walker would mean his
>> policies of fiscal responsibility, balanced budgets, lower taxes, and
>> end to collective bargaining for government unions, would be crushing
>> for Obama's Democrats. So pay close attention to tonight's results. They
>> could affect Canada and the Western world profoundly.
>
>It could turn out that not all retired public school teachers become
>pretend laissez faire capitalists when they retire.