I agree here completely. If the messages are really simple, it's six of
one or half dozen of the other. When the messages start to get complex
(think purchase order, employee data, etc), then I think it tilts to the
code-generation from schema side.
The hardest thing to do with raw XML, from my experience, is to create and
output XML that is schema compliant. This is why I recommend even for
simple structures to start with the schema, generate .NET classes, and use
those.
If you choose to post a static WSDL or use a generated one, this is
orthagonal, as long as what you post as a description corresponds with what
your service consumes and emits.
Dan
--------------------
Message-ID: <96*********************@msnews.microsoft.com>
From: Drew Marsh <dr****@hotmail.no.spamming.com>
Subject: RE: Webmethod Accepting XmlDocument as argument, with WSDL
reflecting
References: <tC**************@cpmsftngxa10.phx.gbl>
Content-Type: text/plain; charset=iso-8859-1; format=flowed
X-Newsreader: JetBrains Omea Reader 381.17
Newsgroups: microsoft.public.dotnet.framework.webservices
Date: Fri, 03 Dec 2004 15:37:07 -0800
NNTP-Posting-Host: 65.223.252.240
Lines: 1
Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP14
.phx.gbl
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:7838
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices
Dan Rogers wrote:
There is no way to infer a specific document type when the input type
is XmlNode, XmlElement, etc. The reason is that these are the XML
equivalent of a generic object class. This is why in the WSDL you see
that the service is saying that it is capable of processing any type
at all, which is a very tall order indeed.
In order to get the WSDL to reflect the type you wish to support, you
need to use a type for inputs/return that is much more strongly typed.
In your case, you have a specific type in mind, so what you need to do
is create a .NET equivalent class that when serialized
creates/consumes XML that adheres to the rules you have defined in an
XML schema.
.. or write the WSDL by hand and continue on the path of pure XML. ;)
Remember, there's nothing that says your web service needs to actually
generate
the WSDL. You can put your static WSDL file right up on the web server with
the ASMX and tell people to hit that URL instead of Foo.asmx?wsdl. It all
depends on how much time you want to spend getting your .NET model inline
with your XSD model or vice/versa. If the models are simple it's usually
not as big of an issue.
HTH,
Drew