web client design

M

Mimi

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
 
D

Dan Rogers

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
--------------------
 
M

mimi

Thanks Dan.


Dan Rogers said:
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
 

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,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top