Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / April 2006

Tip: Looking for answers? Try searching our database.

Specifying correct XSD in WSDL

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
peter.moss@gmail.com - 07 Apr 2006 11:05 GMT
I wondered if anyone can help.

I have a web service which has a method similar to the following:
    DoSomething(MyObject)

The MyObject was generated from a schema using XSD.EXE.  The schema has
a lot of specific information about MyObject (basic validation, string
lengths etc.).  The problem is when I look at the WSDL the schema
information is not present.
When I look at the class XSD has generated I can indeed see there is no
attribute to specify what the schema should be, however I can't seem
to find out how to specify the schema for the class.

So basically, how do I tell .NET to output my schema in the WSDL and
not the one based on the class metadata?

Thanks in advance.
peter.moss@gmail.com - 07 Apr 2006 11:53 GMT
To add extra questions to this message I have recently discovered,
whilst searching for the solution to the above, that it wouldn't
matter a damn even if I had a correct schema.  Why?  Because the .NET
framework offers no facilities for validating incoming requests against
the schema (makes you wonder what the whole point of having a schema is
if MS choose to ignore it anyway).

My research pulls up the following article
(http://msdn.microsoft.com/msdnmag/issues/03/07/xmlschemavalidation/default.aspx)
published, on MSDN in 2003 (3 years ago).  To quote Microsoft on this
lack of validation:
"WebMethods do not fully validate the messages they process against
the implied schema.  As a result, it's possible for a given WebMethod
invocation to produce a false positive (a successful response with an
incorrect or unintended result) when an exception would have been
expected."
The article on MSDN goes on to highlight the potential issues this
causes.  Again, to quote Microsoft:
"The lack of validation support complicates the error handling that
must be built into each WebMethod."
"...within the WebMethod infrastructure, there are... problems...
it's not possible to get your hands on the underlying XmlSerializer"
"These situations, and many others, cause WebMethods to produce false
positives... it could be catastrophic and is therefore completely
unacceptable."

To conclude, MS clearly and strongly admit that this is completely
unacceptable and potentially disastrous (especially if you presume that
validation _IS_ occurring).

Bearing this in mind have MS made any attempt to fix this
"catastrophic and... completely unacceptable" lack of validation
which will "cause WebMethods to produce false positives"?  After
all, they've had over two years of development on .NET 2.0 since
they've acknowledged this issue.

Can anyone offer any help on both the issues (specifying the correct
schema for the WSDL) and also validating the request against it mainly
because I am writing an application where MS are quite right in
concluding that the result would "be catastrophic" and "is
therefore completely unacceptable.".

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.