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

Discussion in 'ASP .Net Web Services' started by Ken Beard, Jul 15, 2003.

  1. Ken Beard

    Ken Beard Guest

    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
     
    Ken Beard, Jul 15, 2003
    #1
    1. Advertisements

  2. 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" <>
    !From: "Ken Beard" <>
    !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: <>
    !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
    !
    !
    !
    !
    !
    !
    !
     
    Yan-Hong Huang[MSFT], Jul 17, 2003
    #2
    1. Advertisements

  3. Ken Beard

    Ken Beard Guest

    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


    Service, annotations are lost in client side typed
    Framework. Related reports have been filed and are
    Typed DataSet Class to define and set extended
    annotations] I added the following:
    required for these extended property
     
    Ken Beard, Jul 17, 2003
    #3
  4. 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" <>
    !From: "Ken Beard" <>
    !References: <> <>
    !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: <>
    !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" <>
    !> !From: "Ken Beard" <>
    !> !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: <>
    !> !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
    !> !
    !> !
    !> !
    !> !
    !> !
    !> !
    !> !
    !>
    !>
    !
    !
    !
     
    Yan-Hong Huang[MSFT], Jul 18, 2003
    #4
  5. 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: (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: <>
    !References: <> <>
    <> <>
    !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:
    !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
    !
    ! (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.
    !>
    !> --------------------
    !
     
    Yan-Hong Huang[MSFT], Jul 28, 2003
    #5
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.