<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to schema</title><link>https://sourceforge.net/p/tinywsdl/wiki/schema/</link><description>Recent changes to schema</description><atom:link href="https://sourceforge.net/p/tinywsdl/wiki/schema/feed" rel="self"/><language>en</language><lastBuildDate>Fri, 11 Jul 2014 12:46:49 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/tinywsdl/wiki/schema/feed" rel="self" type="application/rss+xml"/><item><title>schema modified by redmitry</title><link>https://sourceforge.net/p/tinywsdl/wiki/schema/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -18,7 +18,7 @@

 &lt;br /&gt;This is done to do not depend on any particular XML Schema parser.

-**tinyXMLSchema** is an XML Schema extension based on [Apache XML Schema 2](http://ws.apache.org/commons/xmlschema20/) library and provided as an extension package.
+**tinyXMLSchema** is an XML Schema extension based on [Apache XML Schema 2](http://ws.apache.org/xmlschema/xmlschema-core/index.html) library and provided as an extension package.
 When **tinyXMLSchema** is present, the code above works and it is possible to get Apache XmlSchema object:

 ~~~~~~
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">redmitry</dc:creator><pubDate>Fri, 11 Jul 2014 12:46:49 -0000</pubDate><guid>https://sourceforge.net14d596ddf35d95c75e6d848b3ec4e36eb0711316</guid></item><item><title>WikiPage schema modified by Ratoo</title><link>https://sourceforge.net/p/tinywsdl/wiki/schema/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -1,7 +1,7 @@
 Working with XML Schema
 ---

-tinyWSDL does not parse XML Schemas so working with XML Schema is similar to working with unknown extensions.
+**tinyWSDL** does not parse XML Schemas so working with XML Schema is similar to working with unknown extensions.

 ~~~~~~
 Types types = description.getTypes();
@@ -18,14 +18,24 @@

 &lt;br /&gt;This is done to do not depend on any particular XML Schema parser.

-tinyXMLSchema is an XML Schema extension based on Apache XML Schema 2 and provided as an another extension package.
-When tinyXMLSchema is present, the code above works and it is possible to get Apache XmlSchema object:
+**tinyXMLSchema** is an XML Schema extension based on [Apache XML Schema 2](http://ws.apache.org/commons/xmlschema20/) library and provided as an extension package.
+When **tinyXMLSchema** is present, the code above works and it is possible to get Apache XmlSchema object:

 ~~~~~~
 SchemaTypesExtensions extensions = (SchemaTypesExtensions)types.getComponentExtensions(WSDLPredefinedExtension.SCHEMA.URI);
 for (Schema schema : extensions.getSchemas()) {
   XmlSchema xmlSchema = schema.getSchema();
 }
+~~~~~~
+
+&lt;br /&gt;Inserting a new XML Schema:
+
+~~~~~~
+SchemaTypesExtensions extensions = (SchemaTypesExtensions)types.getComponentExtensions(WSDLPredefinedExtension.SCHEMA.URI);
+Schema schema = extensions.newSchema();
+XmlSchema xmlSchema = (XmlSchema)schema.getSchema();
+xmlSchema.setTargetNamespace("http://example.com");
+extensions.addSchema(schema);
 ~~~~~~

 &lt;br /&gt;Also ElementDeclaration object (for example obtained from InterfaceFault) will return XmlSchemaElement as its content:
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ratoo</dc:creator><pubDate>Fri, 14 Dec 2012 16:16:02 -0000</pubDate><guid>https://sourceforge.net47c25d347d914319bfb145c7ce73d2483f3a72e0</guid></item><item><title>WikiPage schema modified by Ratoo</title><link>https://sourceforge.net/p/tinywsdl/wiki/schema/</link><description>Working with XML Schema
---

tinyWSDL does not parse XML Schemas so working with XML Schema is similar to working with unknown extensions.

~~~~~~
Types types = description.getTypes();
List&lt;Element&gt; elements = types.getExtensionElements(SchemaTypesExtensions.XML_SCHEMA_ELEM);
~~~~~~

&lt;br/&gt;Note that even SchemaTypesExtensions is defined there is no implementation provided, 
so the code below returns an empty list.

~~~~~~
SchemaTypesExtensions extensions = (SchemaTypesExtensions)types.getComponentExtensions(WSDLPredefinedExtension.SCHEMA.URI);
List&lt;? extends Schema&gt; schemas = extensions.getSchemas();
~~~~~~

&lt;br/&gt;This is done to do not depend on any particular XML Schema parser.

tinyXMLSchema is an XML Schema extension based on Apache XML Schema 2 and provided as an another extension package.
When tinyXMLSchema is present, the code above works and it is possible to get Apache XmlSchema object:

~~~~~~
SchemaTypesExtensions extensions = (SchemaTypesExtensions)types.getComponentExtensions(WSDLPredefinedExtension.SCHEMA.URI);
for (Schema schema : extensions.getSchemas()) {
  XmlSchema xmlSchema = schema.getSchema();
}
~~~~~~

&lt;br/&gt;Also ElementDeclaration object (for example obtained from InterfaceFault) will return XmlSchemaElement as its content:

~~~~~~
ElementDeclaration elementDeclaration = interfaceFault.getElementDeclaration();
XmlSchemaElement xmlSchemaElement = elementDeclaration.getContent();
~~~~~~

Obviously when tinyXmlSchema extension is used Apache Xml Schema 2.0 core library must be also present.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ratoo</dc:creator><pubDate>Tue, 31 Jul 2012 15:05:24 -0000</pubDate><guid>https://sourceforge.net324bdb63b26189f4d5b94185eb576aab5d5c03d3</guid></item></channel></rss>