Missing CODEGEN values from DataSet Web Reference and Properties are not updated

K

Ken Beard

I've created a web service that has a project reference to a library that
contains a strongly typed dataset. The web service has a function that
returns a dataset returning this strong typed dataset.

I used codeGen in my schema to handle dbnulls.

I declare "xmlns:codegen="urn:schemas-microsoft-com:xml-msprop" with the
schema ID. And I use "codegen:nullValue="_empty"" at each element
declaration.

But when I add the web reference to my windows forms project the strongly
typed dataset I get does not contain the CODEGEN annotations I added! As
well as the property declaration for the column does not have the updated
property in which it returns the empty string instead of null.

I have updated my web reference and I have completely deleted it and
recreated the reference...still no codegen. Any thoughts?

I'm using VS 2003, W2k for desktop, W2kServer for the server....


Thanks

Ken
 
Y

Yan-Hong Huang[MSFT]

Hello Ken,

Thanks very much for your feedback.

The problem is: When a typed dataset with annotations is return via a Web Service, annotations are lost in client side typed
dataset generated proxy. Please correct me if I have misunderstood the issue.

This is a known "by design" behavior in the RTM release of the .NET Framework. Related reports have been filed and are
being investigated to implement it in a future release of .NET framework.

Now the workaround resolution is to add code manually to the generated Typed DataSet Class to define and set extended
properties that match the codegen annotations.

For an example, To one of the generated typed dataset classes[which has annotations] I added the following:

this.columnAddress.ExtendedProperties.Add("nullValue", "_throw");
this.columnCity.ExtendedProperties.Add("nullValue", "_null");
this.columnPostalCode.ExtendedProperties.Add("nullValue", "toy");
this.columnCountry.ExtendedProperties.Add("nullValue", "");
this.columnPhone.ExtendedProperties.Add("nullValue", "_empty");
this.columnShipVia.ExtendedProperties.Add("nullValue", "0");
this.columnOrderDate.ExtendedProperties.Add("nullValue", "2000-01-01");

The proxy generated on the client side would be with the necessary code required for these extended property
annotations..for ex, the client side proxy code is like:

public string Phone {
get {
if (this.IsPhoneNull()) {
return string.Empty;
}
else {
return ((string)(this[this.tableCustomers.PhoneColumn]));
}
}
set {
this[this.tableCustomers.PhoneColumn] = value;
}
}

Hope it helps.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
!Reply-To: "Ken Beard" <[email protected]>
!From: "Ken Beard" <[email protected]>
!Subject: Missing CODEGEN values from DataSet Web Reference and Properties are not updated
!Date: Tue, 15 Jul 2003 08:40:42 -0400
!Lines: 30
!X-Priority: 3
!X-MSMail-Priority: Normal
!X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
!X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
!Message-ID: <[email protected]>
!Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
!NNTP-Posting-Host: 198.234.129.210
!Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet.webservices:18289
!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
!
!I've created a web service that has a project reference to a library that
!contains a strongly typed dataset. The web service has a function that
!returns a dataset returning this strong typed dataset.
!
!I used codeGen in my schema to handle dbnulls.
!
!I declare "xmlns:codegen="urn:schemas-microsoft-com:xml-msprop" with the
!schema ID. And I use "codegen:nullValue="_empty"" at each element
!declaration.
!
!But when I add the web reference to my windows forms project the strongly
!typed dataset I get does not contain the CODEGEN annotations I added! As
!well as the property declaration for the column does not have the updated
!property in which it returns the empty string instead of null.
!
!I have updated my web reference and I have completely deleted it and
!recreated the reference...still no codegen. Any thoughts?
!
!I'm using VS 2003, W2k for desktop, W2kServer for the server....
!
!
!Thanks
!
!Ken
!
!
!
!
!
!
!
 
K

Ken Beard

Thanks for the quick response...and I hope someone decides that this needs
to be addressed in the next version of the framework...just wished that it
was addressed already and published...

Thanks
Ken


Yan-Hong Huang said:
Hello Ken,

Thanks very much for your feedback.

The problem is: When a typed dataset with annotations is return via a Web
Service, annotations are lost in client side typed
dataset generated proxy. Please correct me if I have misunderstood the issue.

This is a known "by design" behavior in the RTM release of the .NET
Framework. Related reports have been filed and are
being investigated to implement it in a future release of .NET framework.

Now the workaround resolution is to add code manually to the generated
Typed DataSet Class to define and set extended
properties that match the codegen annotations.

For an example, To one of the generated typed dataset classes[which has
annotations] I added the following:
this.columnAddress.ExtendedProperties.Add("nullValue", "_throw");
this.columnCity.ExtendedProperties.Add("nullValue", "_null");
this.columnPostalCode.ExtendedProperties.Add("nullValue", "toy");
this.columnCountry.ExtendedProperties.Add("nullValue", "");
this.columnPhone.ExtendedProperties.Add("nullValue", "_empty");
this.columnShipVia.ExtendedProperties.Add("nullValue", "0");
this.columnOrderDate.ExtendedProperties.Add("nullValue", "2000-01-01");

The proxy generated on the client side would be with the necessary code
required for these extended property
annotations..for ex, the client side proxy code is like:

public string Phone {
get {
if (this.IsPhoneNull()) {
return string.Empty;
}
else {
return ((string)(this[this.tableCustomers.PhoneColumn]));
}
}
set {
this[this.tableCustomers.PhoneColumn] = value;
}
}

Hope it helps.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
!Reply-To: "Ken Beard" <[email protected]>
!From: "Ken Beard" <[email protected]>
!Subject: Missing CODEGEN values from DataSet Web Reference and Properties are not updated
!Date: Tue, 15 Jul 2003 08:40:42 -0400
!Lines: 30
!X-Priority: 3
!X-MSMail-Priority: Normal
!X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
!X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
!Message-ID: <[email protected]>
!Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
!NNTP-Posting-Host: 198.234.129.210
!Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet.webservices:18289
!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
!
!I've created a web service that has a project reference to a library that
!contains a strongly typed dataset. The web service has a function that
!returns a dataset returning this strong typed dataset.
!
!I used codeGen in my schema to handle dbnulls.
!
!I declare "xmlns:codegen="urn:schemas-microsoft-com:xml-msprop" with the
!schema ID. And I use "codegen:nullValue="_empty"" at each element
!declaration.
!
!But when I add the web reference to my windows forms project the strongly
!typed dataset I get does not contain the CODEGEN annotations I added! As
!well as the property declaration for the column does not have the updated
!property in which it returns the empty string instead of null.
!
!I have updated my web reference and I have completely deleted it and
!recreated the reference...still no codegen. Any thoughts?
!
!I'm using VS 2003, W2k for desktop, W2kServer for the server....
!
!
!Thanks
!
!Ken
!
!
!
!
!
!
!
 
Y

Yan-Hong Huang[MSFT]

Hello Ken,

Right. This issue is logged into our database. I believe our product team will take actions on it.

Thanks very much.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
!Reply-To: "Ken Beard" <[email protected]>
!From: "Ken Beard" <[email protected]>
!References: <[email protected]> <[email protected]>
!Subject: Re: Missing CODEGEN values from DataSet Web Reference and Properties are not updated
!Date: Thu, 17 Jul 2003 08:56:17 -0400
!Lines: 120
!X-Priority: 3
!X-MSMail-Priority: Normal
!X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
!X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
!Message-ID: <[email protected]>
!Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
!NNTP-Posting-Host: 198.234.129.210
!Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA06.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08.phx.gbl!
TK2MSFTNGP11.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet.webservices:18334
!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
!
!Thanks for the quick response...and I hope someone decides that this needs
!to be addressed in the next version of the framework...just wished that it
!was addressed already and published...
!
!Thanks
!Ken
!
!
!!> Hello Ken,
!>
!> Thanks very much for your feedback.
!>
!> The problem is: When a typed dataset with annotations is return via a Web
!Service, annotations are lost in client side typed
!> dataset generated proxy. Please correct me if I have misunderstood the
!issue.
!>
!> This is a known "by design" behavior in the RTM release of the .NET
!Framework. Related reports have been filed and are
!> being investigated to implement it in a future release of .NET framework.
!>
!> Now the workaround resolution is to add code manually to the generated
!Typed DataSet Class to define and set extended
!> properties that match the codegen annotations.
!>
!> For an example, To one of the generated typed dataset classes[which has
!annotations] I added the following:
!>
!> this.columnAddress.ExtendedProperties.Add("nullValue", "_throw");
!> this.columnCity.ExtendedProperties.Add("nullValue", "_null");
!> this.columnPostalCode.ExtendedProperties.Add("nullValue", "toy");
!> this.columnCountry.ExtendedProperties.Add("nullValue", "");
!> this.columnPhone.ExtendedProperties.Add("nullValue", "_empty");
!> this.columnShipVia.ExtendedProperties.Add("nullValue", "0");
!> this.columnOrderDate.ExtendedProperties.Add("nullValue", "2000-01-01");
!>
!> The proxy generated on the client side would be with the necessary code
!required for these extended property
!> annotations..for ex, the client side proxy code is like:
!>
!> public string Phone {
!> get {
!> if (this.IsPhoneNull()) {
!> return string.Empty;
!> }
!> else {
!> return ((string)(this[this.tableCustomers.PhoneColumn]));
!> }
!> }
!> set {
!> this[this.tableCustomers.PhoneColumn] = value;
!> }
!> }
!>
!> Hope it helps.
!>
!> Best regards,
!> Yanhong Huang
!> Microsoft Online Partner Support
!>
!> Get Secure! - www.microsoft.com/security
!> This posting is provided "AS IS" with no warranties, and confers no
!rights.
!>
!> --------------------
!> !Reply-To: "Ken Beard" <[email protected]>
!> !From: "Ken Beard" <[email protected]>
!> !Subject: Missing CODEGEN values from DataSet Web Reference and Properties
!are not updated
!> !Date: Tue, 15 Jul 2003 08:40:42 -0400
!> !Lines: 30
!> !X-Priority: 3
!> !X-MSMail-Priority: Normal
!> !X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
!> !X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
!> !Message-ID: <[email protected]>
!> !Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
!> !NNTP-Posting-Host: 198.234.129.210
!> !Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
!> !Xref: cpmsftngxa06.phx.gbl
!microsoft.public.dotnet.framework.aspnet.webservices:18289
!> !X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
!> !
!> !I've created a web service that has a project reference to a library that
!> !contains a strongly typed dataset. The web service has a function that
!> !returns a dataset returning this strong typed dataset.
!> !
!> !I used codeGen in my schema to handle dbnulls.
!> !
!> !I declare "xmlns:codegen="urn:schemas-microsoft-com:xml-msprop" with the
!> !schema ID. And I use "codegen:nullValue="_empty"" at each element
!> !declaration.
!> !
!> !But when I add the web reference to my windows forms project the strongly
!> !typed dataset I get does not contain the CODEGEN annotations I added! As
!> !well as the property declaration for the column does not have the updated
!> !property in which it returns the empty string instead of null.
!> !
!> !I have updated my web reference and I have completely deleted it and
!> !recreated the reference...still no codegen. Any thoughts?
!> !
!> !I'm using VS 2003, W2k for desktop, W2kServer for the server....
!> !
!> !
!> !Thanks
!> !
!> !Ken
!> !
!> !
!> !
!> !
!> !
!> !
!> !
!>
!>
!
!
!
 
Y

Yan-Hong Huang[MSFT]

Hi Eric,

The number is not public. I have posted the workaround in the former posts. Please check this thread for it. Thanks.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
!From: (e-mail address removed) (Eric Tan)
!Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
!Subject: Re: Missing CODEGEN values from DataSet Web Reference and Properties are not updated
!Date: 27 Jul 2003 10:23:34 -0700
!Organization: http://groups.google.com/
!Lines: 27
!Message-ID: <[email protected]>
!References: <[email protected]> <[email protected]>
<[email protected]> <[email protected]>
!NNTP-Posting-Host: 165.21.154.17
!Content-Type: text/plain; charset=ISO-8859-1
!Content-Transfer-Encoding: 8bit
!X-Trace: posting.google.com 1059326614 25653 127.0.0.1 (27 Jul 2003 17:23:34 GMT)
!X-Complaints-To: (e-mail address removed)
!NNTP-Posting-Date: 27 Jul 2003 17:23:34 GMT
!Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-online.de!news-spur1.maxwell.syr.edu!
news.maxwell.syr.edu!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!postnews1.google.com!not-for-mail
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet.webservices:18485
!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
!
!Hi,
!
!Do you have any ticket number for reference?
!
!I am seeing the same problem with my client app using typed dataset
!over web services losing all annotated codegen:typedName. Do you have
!any good workaround?
!
!Thanks.
!
!Eric
!
[email protected] (Yan-Hong Huang[MSFT]) wrote in message @cpmsftngxa06.phx.gbl>...
!> Hello Ken,
!>
!> Right. This issue is logged into our database. I believe our product team will take actions on it.
!>
!> Thanks very much.
!>
!> Best regards,
!> Yanhong Huang
!> Microsoft Online Partner Support
!>
!> Get Secure! - www.microsoft.com/security
!> This posting is provided "AS IS" with no warranties, and confers no rights.
!>
!> --------------------
!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top