web client design

Discussion in 'ASP .Net Web Services' started by Mimi, Nov 10, 2004.

  1. Mimi

    Mimi Guest

    we are supposed to send to a web service a request object in xml
    formatted by industry standard. We have xml dtd. We can either send
    xml string or I can create a web reference to the web service and call
    their objects to populate the request and send out. My thought is
    sending xml document based on xml dtd file must be a better choice
    because if we switch to different web services with the same code.
    I'm thinking of generating objects base on xml file so if they change
    or update the xml.dtd, we just need to re-generate those objects
    again. Has anyone done that or do you have any suggestion or
    examples? Thanks
     
    Mimi, Nov 10, 2004
    #1
    1. Advertising

  2. Mimi

    Dan Rogers Guest

    Hi Mimi,

    The best course for you is to upgrade your DTD to XML Schema, and use one
    of the tools that help you generate clases from the schema, such as XSD.exe
    or XsdObjectGen.exe. Unfortunately, if you are starting with a DTD, you'll
    have to do a conversion, and then fill in any appropriate type information,
    since DTD didn't have data types.

    I agree with you that sending a string that has what appears to be XML is a
    fragile approach. Better to have strongly typed classes to work with so
    you get the benefits of type checking.

    Regards

    Dan Rogers (danro)
    Microsoft Corporation
    --------------------
    >From: (Mimi)
    >Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
    >Subject: web client design
    >Date: 10 Nov 2004 08:35:44 -0800
    >Organization: http://groups.google.com
    >Lines: 10
    >Message-ID: <>
    >NNTP-Posting-Host: 69.148.226.219
    >Content-Type: text/plain; charset=ISO-8859-1
    >Content-Transfer-Encoding: 8bit
    >X-Trace: posting.google.com 1100104545 26468 127.0.0.1 (10 Nov 2004

    16:35:45 GMT)
    >X-Complaints-To:
    >NNTP-Posting-Date: Wed, 10 Nov 2004 16:35:45 +0000 (UTC)
    >Path:

    cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!tornado.fastwebnet.it!tiscali!new
    sfeed1.ip.tiscali.net!news.glorb.com!postnews.google.com!not-for-mail
    >Xref: cpmsftngxa10.phx.gbl

    microsoft.public.dotnet.framework.aspnet.webservices:26438
    >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
    >
    >we are supposed to send to a web service a request object in xml
    >formatted by industry standard. We have xml dtd. We can either send
    >xml string or I can create a web reference to the web service and call
    >their objects to populate the request and send out. My thought is
    >sending xml document based on xml dtd file must be a better choice
    >because if we switch to different web services with the same code.
    >I'm thinking of generating objects base on xml file so if they change
    >or update the xml.dtd, we just need to re-generate those objects
    >again. Has anyone done that or do you have any suggestion or
    >examples? Thanks
    >
     
    Dan Rogers, Nov 11, 2004
    #2
    1. Advertising

  3. Mimi

    mimi Guest

    Thanks Dan.


    "Dan Rogers" <> wrote in message
    news:...
    > Hi Mimi,
    >
    > The best course for you is to upgrade your DTD to XML Schema, and use one
    > of the tools that help you generate clases from the schema, such as

    XSD.exe
    > or XsdObjectGen.exe. Unfortunately, if you are starting with a DTD,

    you'll
    > have to do a conversion, and then fill in any appropriate type

    information,
    > since DTD didn't have data types.
    >
    > I agree with you that sending a string that has what appears to be XML is

    a
    > fragile approach. Better to have strongly typed classes to work with so
    > you get the benefits of type checking.
    >
    > Regards
    >
    > Dan Rogers (danro)
    > Microsoft Corporation
    > --------------------
    > >From: (Mimi)
    > >Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
    > >Subject: web client design
    > >Date: 10 Nov 2004 08:35:44 -0800
    > >Organization: http://groups.google.com
    > >Lines: 10
    > >Message-ID: <>
    > >NNTP-Posting-Host: 69.148.226.219
    > >Content-Type: text/plain; charset=ISO-8859-1
    > >Content-Transfer-Encoding: 8bit
    > >X-Trace: posting.google.com 1100104545 26468 127.0.0.1 (10 Nov 2004

    > 16:35:45 GMT)
    > >X-Complaints-To:
    > >NNTP-Posting-Date: Wed, 10 Nov 2004 16:35:45 +0000 (UTC)
    > >Path:

    >

    cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!tornado.fastwebnet.it!tiscali!new
    > sfeed1.ip.tiscali.net!news.glorb.com!postnews.google.com!not-for-mail
    > >Xref: cpmsftngxa10.phx.gbl

    > microsoft.public.dotnet.framework.aspnet.webservices:26438
    > >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
    > >
    > >we are supposed to send to a web service a request object in xml
    > >formatted by industry standard. We have xml dtd. We can either send
    > >xml string or I can create a web reference to the web service and call
    > >their objects to populate the request and send out. My thought is
    > >sending xml document based on xml dtd file must be a better choice
    > >because if we switch to different web services with the same code.
    > >I'm thinking of generating objects base on xml file so if they change
    > >or update the xml.dtd, we just need to re-generate those objects
    > >again. Has anyone done that or do you have any suggestion or
    > >examples? Thanks
    > >

    >
     
    mimi, Nov 12, 2004
    #3
    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.

Share This Page