473,326 Members | 2,588 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,326 software developers and data experts.

XSD and XMLDocument Dilemma - please help

Hi all,

many probably have noticed that i have been posting on here alot lately, and
after many informative posts i am getting down and making progress with my
web service design, but now again i am stuck! and i ask for your help once
again.

I was originally planning to send back strings if i needed to return XML
data, something i have now found to be frowned at by some developers:

http://blogs.msdn.com/mpowell/archiv...12/130637.aspx

I have decided to return a XMLDocument considering that it gets serialized
into XML and can be sent back and consumed with no problems (In theory) by
third party applications. The reason i have taken this approach is because i
need to ensure my data is in the correct format and has the correct
structure, and for this i am using a collection on XSD files which will
contain the XML representation of my request and responses from my web
service. I will then go onto build my own WSDL file and start coding my Web
service.

My question is, if i have created a response that maps to XML for instance:

<xs:element name="Start">
<xs:complexType>
<xs:sequence>
<xs:element name="elements">
<xs:complexType>
<xs:sequence>
<xs:element name="element">
<xs:simpleType>
<xs:restriction base="xs:string" />
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>

XML:
<start>
<elements>
<element>E1</element>
<element>E2</element>
</elements>
</start>

if i build my WSDL file to have the XSD schema above to the response of my
method that returns the above XML will it validate it? or should i add the
Schema directly To the XML generated, this way may invalidate my need to
generate my own WSDL, but I feel for this solutions as this is going to be a
large production web service that i should design the messages thoroughly.

I hope that i have explained myself properly, if anyone needs any clarity
then please do not hesitate to ask. I guess as concise version of this
question would be, if i design my XSD's and build my WDSL and the return type
for a method is a XMLDoc, will my XSD validation still work as the XMLDoc
will be serialised in XML or will it mess up?

Thanks,

Rob

Nov 23 '05 #1
0 1098

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

Similar topics

5
by: KathyB | last post by:
If someone could just explain this to me...I just don't get it! I have an aspx page where I retrieve several session variables and use xmlDocument to transform xml file with xsl file into an...
0
by: Andrea N. | last post by:
I'm new to .NET XML classes, so here my dilemma I really like the XMLDataDocument concept of synchronizing automatically XMLDocument and DataSet with a common schema. Can I automatically...
13
by: Matthew Wieder | last post by:
In my C# application, I have class which has method that opens an XML document, modifies it and saves it out. I run that method for several different XML documents. What I've found is that the...
7
by: SQLScott | last post by:
I have a Web Service in which I am trying to pass an XMLDocument as a parameter to one of the methods. I would like to use the XMLTextReader to read the XML but I am getting the following error: ...
6
by: David Thielen | last post by:
Hi; I am calling SelectSingleNode("/xml/s:Schema/s:ElementType/@name") where "/xml/s:Schema/s:ElementType/@name is a legit xpath statement (xml is the name of the rootnode) and that xpath...
5
by: Bob P | last post by:
I have an example below that is not working correctly. I have a web application that passes a System.Xml.XmlDocument object "oInputDoc" around to functions byval. I do not want the "oInputDoc"...
1
by: itsme | last post by:
Hello, How can one copy an XmlDocument "A" into another XmlDocument "B" When I say "copy", I mean to replace the XmlDocument "A" completely by the XmlDocument "B". I am trying to use...
2
by: feng | last post by:
I think I didn't phrase my quetion clear enough in the last post. Here is what I need: In my VB.Net code, I already have a XML created in XMLDocument formate. I can also convert it into a string...
4
by: =?Utf-8?B?TWFyaw==?= | last post by:
Hi... We've got a lot of places in our code where we read relatively small xml user preference blocks. Currently that's creating a new XmlDocument in every spot. I was thinking we might see...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.