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 / November 2004

Tip: Looking for answers? Try searching our database.

Import Validation

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jim - 29 Nov 2004 11:41 GMT
Hi All

what would be a good method to validate data  that are imported though a
webservice?\

thanks

Jim
Dan Rogers - 29 Nov 2004 20:39 GMT
Hi Jim

You might want to validate the incoming XML before it is marshalled
(whoops, deserialized) into the classes that are passed to your web
methods.  You can do this fairly trivially by adding in a web service
extension that uses a schema collection and then uses a validating reader
to determine if the incoming XML matches the rules defined in a schema.  If
there are errors found, you can write the response (directly as an XML SOAP
fault) and abort the method call.

Another place you can do the same thing is in an HTTP Filter in IIS
(typically written in C++).  In a filter, you get the raw stream received
on the wire and have full control over the response/processing.

I hope this helps

Dan Rogers
Microsoft Corporation
--------------------
>From: "Jim" <peesa_govno@hotmail.com>
>Subject: Import Validation
[quoted text clipped - 9 lines]
>NNTP-Posting-Host: ppp199-36.lns1.syd2.internode.on.net 203.122.199.36
>Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11
phx.gbl
>Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.aspnet.webservices:26848
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
>
[quoted text clipped - 6 lines]
>
>Jim
Jim - 30 Nov 2004 04:11 GMT
Hi Dan
Thanks!

> Hi Jim
>
[quoted text clipped - 42 lines]
> >
> >Jim

Rate this thread:







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.