Repost - Typed dataset returned from webservice incorrectly defined in proxy - null value problem

Discussion in 'ASP .Net Web Services' started by Randy Hayes, Jan 20, 2004.

  1. Randy Hayes

    Randy Hayes Guest

    Repost...didn't get any responses on the first try...

    I have a web service that has a xsd defined for a dataset. The xsd has all
    of the proper tables/elements, constraints, relations, etc. and works fine
    from the webservice standpoint. I have also defined certain elements in the
    xsd to return empty when null.

    Now I realize that this puts in some msprop attributes on those elements as
    well as some codgen attributes all in place to help out the generation of
    the typed dataset. And when looking at the dataset generated in the
    webservice...it has the logic for the null values. All is well!

    BUT, when referencing the webservice from an app, the proxy generated typed
    dataset is not the same. It has no logic for the null values.

    I noticed that when going to the webservice directly and requesting the
    schema (webservice.asmx?schema=xxxx) the resulting schema DOES NOT include
    all of the namespace information for the dataset generation. In other
    words, not only is the namespace declaration missing, but all of the
    attributes for the elements that were defined as returning "emtpy" when null
    are missing. This explained why the proxy generated typed dataset was the
    way it was.

    My question...how (if at all possible) can this information be included in
    the schema that is returned from the web service and thus returned to the
    proxy generation?

    Randy
     
    Randy Hayes, Jan 20, 2004
    #1
    1. Advertising

  2. Randy Hayes

    MSFT Guest

    Hi Randy,

    I have replied your previous post and stated this is a limitation in .NET
    Web service proxy. For some reason, you may not see my reply. I repost it
    here. If you have any further question, please feel free to post in the
    newgroup.

    From: (MSFT)
    Date: Tue, 20 Jan 2004 02:51:32 GMT
    Subject: RE: Typed dataset returned from webservice incorrectly defined in
    proxy - null value problem
    Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices

    Hi Randy,

    Thank you for using MSDN Newsgroup. I am Luke and I am review this issue
    currently. As I understand, your web service has a typed Dataset. When you
    get the schema from proxy or "webservice.asmx?schema=xxxx", your found the
    schema in result missed some attributes and namespace.

    In fact, the support for XML schema is very limited here. The typical name
    space are like:

    <xs:schema id="DataSet1"
    targetNamespace="http://www.tempuri.org/DataSet1.xsd"
    xmlns:mstns="http://www.tempuri.org/DataSet1.xsd"
    xmlns="http://www.tempuri.org/DataSet1.xsd"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
    attributeFormDefault="qualified" elementFormDefault="qualified" >

    Any other namespace will be ignored in the generated proxy. The attribute
    in the other namespace is also ignored. This design is based on considering
    of compatibility.

    I think the work around is to import the xsd file in client project so that
    we can get same definition for the type dataset.

    Hope this help,

    Luke
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
     
    MSFT, Jan 21, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Programatix
    Replies:
    1
    Views:
    392
    Kathleen Dollard
    Jul 17, 2003
  2. Randy Hayes
    Replies:
    0
    Views:
    144
    Randy Hayes
    Dec 21, 2003
  3. Randy Hayes
    Replies:
    1
    Views:
    162
  4. ev

    Typed dataset problem - VS2005 web proxy ref

    ev, Feb 8, 2006, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    122
  5. Guest
    Replies:
    39
    Views:
    474
    Guest
    Jan 22, 2004
Loading...

Share This Page