Schema for DataSet

Does anyone know how to specify a dataset ( or diffgram) as an element
in a schema?
For example and empty schema is defined as

<?xml version="1.0" encoding="utf-8"?>
<xsd:schema id="NewDataSet" xmlns="" xmlns:xsd="http://www.w3.org/2001/
XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
	<xsd:element name="NewDataSet" msdata:IsDataSet="true"
msdata:UseCurrentLocale="true">
		<xsd:complexType>
			<xsd:choice minOccurs="0" maxOccurs="unbounded" />
		</xsd:complexType>
	</xsd:element>
</xsd:schema>

Now if I have a schema defined as follows, how do I specify that the
"data" element has a dataset type
<?xml version="1.0" encoding="utf-8"?>
<wsschema xmlns="http://www.general.com/WebServiceSchema">
	<xs:schema xmlns:gen_ws="http://www.general.com/WebServiceSchema"
		   xmlns:xs="http://www.w3.org/2001/XMLSchema"
		   targetNamespace="http://www.general.com/WebServiceSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">

		<!-- Define types used by AIX Generalized Web Services -->
		<xs:simpleType name="DataTypeChoice">
			<xs:restriction base="xs:string">
				<xs:enumeration value="boolean"/>
				<xs:enumeration value="datetime"/>
				<xs:enumeration value="decimal"/>
				<xs:enumeration value="integer"/>
				<xs:enumeration value="long"/>
				<xs:enumeration value="short"/>
				<xs:enumeration value="string"/>
			</xs:restriction>
		</xs:simpleType>


		<xs:complexType name="ParamterType">
			<xs:all>
				<xs:element name="name" type="xs:string"/>
				<xs:element name="dataType" type="gen:DataTypeChoice"
default="string"/>
				<xs:element name="value" type="xs:string" />
			</xs:all>

		</xs:complexType>

		<xs:complexType name="ResponseType">
			<xs:all>
				<xs:element name="method" type="xs:string"/>
				<xs:element name="returnValue" type="xs:integer"  />
				<xs:element name="parms"  minOccurs="0">
					<xs:complexType>
						<xs:sequence  maxOccurs="unbounded">
							<xs:element name="parm" type="gen_ws:ParamterType"/>
						</xs:sequence>
					</xs:complexType>
				</xs:element>

				<xs:element name="data"  type="xs:anyType" minOccurs="0"
maxOccurs="1"/>
			</xs:all>
		</xs:complexType>
		<xs:element name="Response" type="gen_ws:ResponseType"/>

	</xs:schema>
</wsschema>

0
SBearss (4)
10/19/2007 2:33:20 PM
dotnet.xml 7266 articles. 0 followers. Follow

0 Replies
512 Views

Similar Articles

[PageSpeed] 54

Reply:

Similar Artilces:

eConnect Schema
Can someone point me to the correct Schema/XML node to enter data to the Transaction Entry screen found in the path Transactions, Financial, Batches, Transaction button ? I believe that would be <taGLTransactionLineInsert>.... -- Bud Cool Microsoft Certified Business Management Solutions Specialist, GP 9.0 Financials Currently supporting: GP 9.0, SP2 "DavidM" wrote: > Can someone point me to the correct Schema/XML node to enter data to the > Transaction Entry screen found in the path Transactions, Financial, Batches, > Transaction button ? > > > ...

Project table schema changes in 9.0
I upgraded a server from GP 8.0 sp5 to GP 9.0 sp2 last weekend. All seems to work fine so far. I have some Crystal Reports that were in the process of being developed and I have questions about 3 Project tables. These tables each have had fields removed. My question is...Where has the data these fields represented been relocated? Has the upgrade taken data from these tables and moved it to other tables? PA10721 -> PA31101 -> PA31102 -> *** Lists the fields added and removed in Project tables *** C:\Program Files\Microsoft Dynamics\GP 9.0 SDK\Content\8.0to9.0\PaTableDetailed_...

xsd.exe errors with schemas importing other schemas
Hi, I am working with XSD.exe vs.net command line util. I have an XSD that I am trying to use to generate classes with. However, the XSD references another schema and the XSD.exe is having trouble finding the referenced schema. Does anyone have an example of what the command line params would be so that the tool is aware of all schemas? Does the tool have trouble with the XSD lines: xmlns:r="somewhere.files.referencedxsd" <xs:import schemaLocation=".\referencedxsd.xsd" namespace="somewhere.files.referencedxsd" /> <xs:element ref="r:ReferencedRo...

xml schema: elements with unique attribute values.
Hi all. I�m a bit newbie writing xml schemas. Is it possible to define xml element that must have unique attribute values in same level. For example if i have a xml - document: <list> <subsection name="first"> <!-- subsection contents --> </subsection> <subsection name="first"> <!-- ERRROR!!! --> <!-- subsection contents --> </subsection> <subsection name="second"> <!-- subsection contents --> </subsection> </list> Schema: <xs:complexType n...

Please help with getting the right structure from dataset using GetXML()
Hi everyone, I need your help getting my getXML method to function the way I need it to. I have a stored procedure that returns data into a dataset (I am using VB.NET). I use getXML with dataset and I get the following result: <NewDataSet> <Table> <StudentFirstName>John</StudentFirstName> <StudentMiddleName>J</StudentMiddleName> <StudentLastName>Smith</StudentLastName> <StudentAddressType>Permanent</StudentAddressType> <StudentAddressLine1>123 Some Rd</StudentAddressLine1> <StudentAddressLine...

How to view a complete schema when using schema includes/imports?
I've got a parent schema file that references complex element types that are defined in several "child" schema files and I used the schema imports statement to include them into the parent schema's default namespace. I would like to generate a complete/single-file instance of the schema to simplify things but I can't figure out how to do it. Each schema seems to live in it's respective memory space inside the SchemaIncludesCollection. Any idea how I could traverse all of the "virtual" nodes in the parent schema to create a physical representation of what t...

Schema Mappings
Hi All, I have a couple of questions on Schema Mappings... I've setup CRM so that when an account is made the user has the option of choosing what added extras the client has. Examples of this are: Anti Virus, Anti Spam etc. I've set this up as a simple drop down menu on the account General tab. I want this drop down menu to link with another similar menu I've created under the case (incident) General tab. I'd like to set it up so that when you change one it effects the other (ie change accounts and it changes the case drop down. I tried mapping the schema fields to achiev...

Dataset and XML
Hi I have an SQL Server stored procedure wich returns ceratin data and I have it in a Dataset. I am supposed to change that data into an specific standard XML format and write it to file. I am using Visual Studio 2005 wich is completely new to me. Could you help with some hints about how can I do that. I have been looking a lot about this from the Net but every thing I have found is very simple: GetXml() But that is not enough for me. I need to change that XML so that I get it in the previously defined standard format Thanks for any help Gabriel Hi Sorry for cross posting. I posted this a...

XML validate by XSD schema with C#
I am validating XML files on a server which has no internet access and the validadation in C# does not work. Schema with which I am validating has namespaces like: xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#". I have these schemas all locally on the disk, but it does not work. If I try on a computer with internet access then it works just fine. Does someone know what to do. Function with which I validate looks like this: private bool ValidXml(string XmlFile, string XSDLoc, string tns) { // . . . string targetNamespaceU...

Schema Question
Hi, I am fairly new to XML schemas and why to use them. I am integrating with another application via xml. My questions are schemas only good to validate the XML documents or can I use the schema to help me parse the xml document? Thanks Well, following link will be useful to you. http://www.w3schools.com/schema/schema_why.asp ~ Ankit http://ankitjain.info/ankit/2006/07/01/forcing-download-on-web-page randy wrote: > Hi, > > I am fairly new to XML schemas and why to use them. I am integrating with > another application via xml. My questions are schemas only goo...

Setting a reference to a schema doesn't work?
Hello NG! Using the System.Xml.XmlDocument I want to create such a xml-file: <?xml version="1.0" encoding="utf-8"?> <RootElement xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="RootElement.xsd "> .... </RootElement> (That's what XMLSpy generates when assigning a schema to an xml-file.) I tried... pDoc = New System.Xml.XmlDocument pDoc.AppendChild(pDoc.CreateXmlDeclaration("1.0", "utf-8", "")) pRoot = pDoc.AppendChild(pDoc.CreateElement("RootElement")) ...

Adding Elements to Dataset GetXml
I am using a Dataset with two tables (Customer, Order) and adding a DataRelation object with Nested property set to True. I do not have a schema defined for the dataset. Calling GetXml results in the following: <Customer> <Order /> <Order /> <Order /> </Customer> But what I would like is an additional element that represents the collection of child "Orders": <Customer> <Orders> <Order /> <Order /> <Order /> </Orders> </Customer> Is there a simple way of adding this additional ...

Where do I put my schema?
Hi, I'm developing a internet site for a customer. The customer is supposed to upload XML documents to the site and the documents shall be validated against a xsd schema. How do I publish the schema so that my customer may use it for namespace validation on their side? The site is an aspx site that has forms authentication. We do not want to put the schema on the site without any authentication. cheers, mortb It can go anywhere your client has the ability to find it. If you want them to authenticate, then put it behind that authentication. It's just a file, like an image ...

System Folders: Schema and schema-root
Hi, I have migrated from Exchange 2000 to Exchange 2003 (native Win 2000 AD-domain). Comparing PF -> System Folders with a clean Exchange 2003 Installation (native Win 2003 AD) I notice some differences in the System Folders; On the clean Exchange 2003: No 'Schema' system folder I renamed the Schema folder on the migrated servers and so far no problems. Is this folder still of any use in a Exchange 2003 environment? On the clean Exchange 2003: No 'schema-root\microsof\exchangeV1\exchweb and further. Because of earlier problems (There were 2 schema-root folders) I r...

DataSets, Web Services, DiffGrams, Arrays, and Interoperability
I built the example application outlined in this artical: http://msdn.microsoft.com/library/default.asp? url=/library/en-us/dnservice/html/service02112003.asp There were a number of questions along the same lines posted to the page's discussion forum but no one replied with a solution. The problem I am experiencing is with the 3rd example. On the server you code the following web service: [WebMethod()] [return: XmlElement(typeof(Items[]))] public XmlDataDocument GetTypedXmlDataDocument() { sqlDataAdapter1.Fill(typedDataSet1); XmlDataDocument dataDoc = new XmlDataD...

How to create DB schema from XML schema
Hello All, We have XSD file with XML schema and want to generate database or SQL from it. Visual studio reads XSD file and shows everything graphically fine. Is there anyway, we could actually transfer the graphical information to database? Best regards, Neo ...

How to move all dbo schema objects to another schema?
Does anyone know of a way to move all objects in a db from schema dbo to another schema? mat (mat@notarealdotcom.adr) writes: > Does anyone know of a way to move all objects in a db from schema dbo to > another schema? In theory: SELECT 'ALTER SCHEMA newschema TRANSFER dbo.' + quotename(name) FROM sys.objects WHERE schema_id = 1 Excute and run result. But before you go ahead, beware of that in practice it is a lot more difficult. For starters you should probably add a WHERE clause to the SELECT, so that you don't include object types like cons...

No Schema Manager in Deployment Manager 3.0
Folks I've got a weird one - I can't find Schema Manager! My Deployment Manager has 3 nodes - Server Manager, License Manager & User Manager. Has this moved in 3.0? Cheers Hany Answered my own question - Settings | Customisation | <<Entity>> | Attributes Interesting - does that mean that some of colleagues get a change of job title - Attribute Administrators? ;-) "Electronic Workplace" <info@electronicworkplace.losethisbit.com> wrote in message news:u4yH0xj8FHA.4036@TK2MSFTNGP11.phx.gbl... > Folks > > I've got a weird one - I ...

Modular schemas
I'm working with the w3c's "Modular Xhtml schema". The problem I have is that when I try to add the Schema Driver File to my schema collection, I get the following error: "Cannot resolve schemaLocation attribute." The error occurs on the first <xs:include schemaLocation="xxxxx.xsd" />. The only way I have been able to fix the problem is to use a fully qualified file path i.e.: <xs:include schemaLocation="file://D:\\myFolder\mySchema.xsd" /> There HAS to be a better way. If any of you have looked at modular schemas, or even used AN...

Using value from Dataset 2 in calculation in Dataset 1
Hello- Bumping in to an exception that I cant seem to get around. Report has two datasets. I need to use a value that dataset2 returns. (Dataset 2 is just a stored proc that returns a single value.) Dataset1 has a calculated field that needs to reduce the value in a field by the value that is returned from dataset2. I think the way to do this is to reference the textbox.value that holds the value from dataset2: calculated field = field_from_dataset1.value - sum(ReportItems! credit.value) where ReportItems!credit.value is the textbox that has the value returned from DS2. ...

How to use schema validate xml file?
I have created my schema format(xxx.xsd) for my xml files, but how can I use it validate my xml files? "Knighterrant" <knighterrant@mop.com> wrote in message news:O5o9lmTrFHA.3264@TK2MSFTNGP12.phx.gbl... >I have created my schema format(xxx.xsd) for my xml files, but how can I >use it validate my xml files? private void Validate(string path) { XmlValidatingReader valReader = null; try { valReader = new XmlValueLengthValidatingReader(new StreamReader(path)); valReader.ValidationType = ValidationType.Schema; // to validate according to schema, not defined in xml file ...

Mapping an xml schema to a different dataset schema
Hello everyone, I have just started to use Xml in .net so excuse me if this is a simple question. I have an Xml docuement that contains data in the following format: - <SearchResult xmlns="http://tempuri.org/XMLFile1.xsd"> <QueryInformation> <ActualQueryString /> <TotalResults /> <ResultsPerPage /> <SearchTime /> <StoppedWords /> <TheasurusWords /> <StemmedWords /> <SortMethod /> <Messages /> </QueryInformation> <Results id=...

xml schema and database strucure
hi, i am new to xml. i have been given some xml schemas, xsl files, sample xml file and sample html file. what i have to do is i) based on the sample html file, create a form which could take input. ii) store the input data in database iii) generate the xml file for that data ( based on sample XML file). Will anybody guide me which way to proceed. i mean what should i do? I have made a form to take input using asp.net. now i want to store that input data in SQL server tables but i don't know what tables would be there so that my final xml could match with the given sample xml. will anybo...

CRM Database Schema
We are using Microsoft SQL Reporting Services to write reports for Microsoft CRM and I am wondering if anyone knows where there is some good documentation for understanding the database schema and the relationships between tables. Thank you in advance. If you add the tables into a DB Diagram in Enterprise Manager it will automatically show links between the tables that are based on the FK's between them. Matt Parks ---------------------------------------- ---------------------------------------- On Fri, 4 Jun 2004 10:05:02 -0500, "Jim" <jim@nospam.com> wrote: We are ...

Using schema
I'm having much trouble in relating a xml file with a shema definition in order to validate the xml document and get advantage of the intellisense features of the .net ide. What steps I have to follow? Thanks Hi Mario, Check out : http://msdn.microsoft.com/library/en-us/vbcon/html/vbwlkCreatingXMLFileWithAssociatedXMLSchema.asp for a complete walkthrough. In short, if you don't have a pre-existing schema, you can just use the "Generate schema" menu option, which will generate an XSD file for you, and also associate your XML file with that XSD. Now, intellisense shou...