HighTechTalks DotNet Forums  

Validating XML in a WebMethod parameter

Dotnet XML microsoft.public.dotnet.xml


Discuss Validating XML in a WebMethod parameter in the Dotnet XML forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
BillAtWork
 
Posts: n/a

Default Validating XML in a WebMethod parameter - 06-19-2006 , 03:18 AM






Hi,
I've set up a SoapExtension class and XSD schema in order to validate the
parameters of a webservice method call. However, I'm having a problem with
one of the parameters - it's a string which accepts an XML fragment and I
can't get it to validate using the schema. I need to go back to basics with
this I think - can anyone point me to examples/articles of this technique?

i.e. How do I define a webmethod parameter in the XSD schema that will
validate an XML fragment? It's very simple XML too :-) e.g.

<nodea>
<nodeb id="..." />
<nodeb id="...">
<nodec>abc</nodec>
</nodeb>
</nodea>

Thanks.
Bill

Reply With Quote
  #2  
Old   
AT
 
Posts: n/a

Default RE: Validating XML in a WebMethod parameter - 06-19-2006 , 10:08 PM






Hi Bill,

Do you need to validate it with a webservice method or directly in the
schema? If using a method, you can define the parameter as an XmlFragment.
If it loads corrects, it is validate. If there is any misunderstanding
here, please feel free to let me know.

Kevin Yu
Microsoft Online Community Support

================================================== ==========================
==========================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
================================================== ==========================
==========================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.