Re: Execute stored procedure via web method.
From: Drew Marsh (drub0y_at_hotmail.no.spamming.com)
Date: 12/02/04
- Next message: Dan Rogers: "Re: Execute stored procedure via web method."
- Previous message: Dan Rogers: "Re: Execute stored procedure via web method."
- In reply to: Dan Rogers: "Re: Execute stored procedure via web method."
- Next in thread: Dan Rogers: "Re: Execute stored procedure via web method."
- Reply: Dan Rogers: "Re: Execute stored procedure via web method."
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 02 Dec 2004 15:00:45 -0800
Dan Rogers wrote:
> This is a great example. Russel, well done.
That was my example *to* Russell. ;)
> The only thing I might add is that you can generate a class named
> Command from this schema that lets you bypass any need to directly
> manipulate XML in your code at all. Using a tool like XSD.exe or
> XmlObjectGen.exe, you can read that schema and generate an assembly.
> Then you can change the web method to the following:
Eh, yeah I'm not a big fan of XSD.exe generated classes as they don't really
model the schema as I'd envision them as .NET classes. Specifically its interpretation
of grouping elements, in this case <parameters>. Instead of generating an
property named paramters that's just an array of <parameter> it generates
a whole class in the middle. So if I really wanted to provide a .NET type
I'd probably roll my own with an IXmlSerializable implementation. Not to
mention the WSDL generator might give me grief generating proper schema for
my WSDL... then again I'd opt to write that by hand to ensure correctness
as well. :)
Anyway, it was just meant as an example. In the "real world" I would probably
write the Command class if I were him so you could resuse it without having
to redo all the XML parsing logic.
Later,
Drew
- Next message: Dan Rogers: "Re: Execute stored procedure via web method."
- Previous message: Dan Rogers: "Re: Execute stored procedure via web method."
- In reply to: Dan Rogers: "Re: Execute stored procedure via web method."
- Next in thread: Dan Rogers: "Re: Execute stored procedure via web method."
- Reply: Dan Rogers: "Re: Execute stored procedure via web method."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|