473,406 Members | 2,390 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Validating XML in a WebMethod parameter

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
Jun 19 '06 #1
1 2068
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.)

Jun 20 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Alin Popovici | last post by:
Hi! I have this problem. I am sending as a parameter for a webmethod a string containing '\r\n' sequences. For some reason, when I debug my webmethod, the paramter is received with the carriage...
24
by: Joseph Geretz | last post by:
Up to this point, our application has been using Windows File Sharing to transfer files to and from our application document repository. This approach does not lend itself toward a secure...
0
by: Ramil Domingo | last post by:
Is there a way to describe a web method in a more structured way like describing the parameters in the web method in a multi-line approach? An example would be. <WebMethod(Description:= "My Web...
5
by: LS | last post by:
Can a WebMethod return an Interface type? Can we pass an interface parameter ? Example : public interface IEntity { long Id { get; set; } string Name { get; set; } }
2
by: Peter McEvoy | last post by:
Folks, I've been building a Webservice API for a contract that will be exposed to the internet at large. There are two endpoints, and each endpoint contains a number of webmethods. Every...
2
by: MrDotNet | last post by:
Hi I want pass NameValueCollection as parameter in webmethod. I try it but that give me error. Here is Error. You must implement the Add(System.String) method on...
5
by: John | last post by:
Hi Is it possible to pass a whole record to a webmethod? How? Thanks Regards
1
by: Cesar | last post by:
Hello, I've developed a .NET C# web service; which has one method named, let's say, upload_your_data. This method has one parameter ( string your_data). The value that this parameter will...
0
by: BillAtWork | last post by:
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...
1
by: chaitanya02 | last post by:
Hello All, Can anyone help me in passing a Datetime parameter to a webmethod, please? *declaration datetime datetime1; webmethod(out string datetime1); is it the right way of declaring a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.