xsd

xsd choice configuration into a wsdl

Hi, i want to configure a wsdl with an operation which can return an object among a list of two. How can i configure it's schema and it's message? This is my wsdl : <?xml version="1.0" encoding="utf-8" standalone="no"?> <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:hl7="urn:hl7-org:v3" xmlns:ihe="urn:ihe:iti:pam:2007...

Generic ServiceContracts and String.Format-style names

I am aware of formatted DataContract names, as described here: http://msdn.microsoft.com/en-us/library/ms731045.aspx (Customizing Data Contract Names for Generic Types near the bottom). Example: [DataContract( Name = "SearchCriteriaFor{0}", Namespace = "http://schema.mycompany.com/MyProject/" )] public class SearchCriteria<T> { ... ...

XSD Namespace backword compatibility

Hello All, We are struggling with some namespace compatibility issues. Currently we store some external data in our database as XML files with namespace as xmlns="http://xyz.com/prodresponse/v2", recently the vendor has changed the namesspace to xmlns="http://xyz.com/prodresponse/v4". The issue is we need to deal with both old and new ...

How to constrain Xml content to a specific length using xsd restrictions?

Using XSD, is it possible to constrain the total text within a Node. In the example below, I want Address Node content to be restricted to 255 characters. <Address> <Line1>Text</Line1> <Line2>Text</Line2> <City></City> <Street></Street> <State></State> <Country></Country> </Address> So, if I only had Line1 and...

XML validation with XSD: how to avoid caring about the sequence of the elements?

Hello everyone: I have following XSD code: <xsd:complexType name="questions"> <xsd:sequence> <xsd:element name="location" type="location"/> <xsd:element name="multipleChoiceInput" type="multipleChoiceInput" minOccurs="0" maxOccurs="unbounded"/> <xsd:element name="textInput" type="textInput" minOccurs="0" max...

Generating XML Schema from JAXB class files in Ant

Is it possible to use the shemagen ant Task to generate an xsd schema from class files instead of from source? ...

Using Subversion for managing Web service contracts

Hi there, I'm looking at using Subversion for managing WSDL and XSD artefacts, where I have a service catalogue of around 60 services. Does anyone know of any articles recommending best practice around this with regards to the granularity between tagging and versions of services. With SVN, it appears that you can only tag from the tru...

Tool for creating a JAXB java class out of xml schema (reverse schemagen)?

How to create a JAXB java class out of a xml schema using a utility? I don't like reverse-engineering of several huge XSD-files to a JAXB-compliant java class. I know there's the jdk utility schemagen - but this works the other way round. What tool can help me? ...

How to create a dataset from an xsd schema in Visual studio 2010

I searched for this here and on msdn but didn't find a satisfactory answer either because things changed from 2005/2008 to 2010 or I don't know how to use VS IDE. So, here is what I am trying to I have an xsd file and I want to perform searching operations on that. For that I figured that I would need corresponding classes and dataset i...

Validating XML with XSDs ... but still allow extensibility

Maybe it's me, but it appears that if you have an XSD <?xml version="1.0" encoding="utf-8"?> <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt; <xs:element name="User"> <xs:complexType> <xs:sequence> <xs:element name="Given...

how to make include element in my own XML schema?

I have writen my own xml schema and one large xml file that is an instance of that schema. Now I would like to define include element in my xsd so that xml file can be made out of several smaller units. How do I do that? For example in my file I have <item>1</item> <item>2</item> <item>3</item> <include src='foo.xml'> and foo.xml has...

axi2(1.5) is not defining the elements in wsdl types

Hi I am trying to create a web service as an "aar" file. But when i deploy it... i can not see the wsdl:types or xsd ... here is the wsdl <wsdl:definitions targetNamespace="http://ws.apache.org/axis2"&gt; <wsdl:documentation>Inverse</wsdl:documentation> <wsdl:types/> <wsdl:message name="getInverseRequest"/> <wsdl:message name="getInver...

Generating a XSD file from Powerdesigner

Is there a simple way to make Powerdesigner generate an XSD file? It generates an XSM file, but it's not the same specification. If there were a simple way of doing it, it would ease my life as heaven :P. ...

XML Schema with complext type containing <xs:all> and <xs:any> ?

I want to define a complex type that contains elements that may or may not exist, and also allows for additional undefined elements so I've got something like this: <xs:complexType name="MyType"> <xs:sequence> <xs:element name="A" type="xs:float" minOccurs="0" maxOccurs="1" /> <xs:element name="B" type="xs:float" minOccurs="0" maxO...

Is it possible to create an xsd that supports a parent node and child node having the same name?

So before anyone tells me I shouldn't do this, I completely agree. However I have an xml DataFeed coming in from a third party. I already am reaching out to them to see if they can change it, but I figured I had better attack it from both sides. The offending tags in the XML are as follows: <Tags> <TagDimension id="Topic"> ...

How to create a schema for an unordered list of XML nodes, with occurance constraints.

Given an XML layout like this, I'm trying to create a XSD schema to validate it. <RootNode> <ChildA /> <ChildC /> <ChildB /> <ChildB /> <ChildA /> </RootNode> The requirements are as follows: ChildA, ChildB and ChildC may occur in any order. (<xs:sequence> unsuitable) ChildA is mandatory but may occur multiple times. Child...

Create an XSD example - Hours of Operation - One of Several Types

An example of some XML that could be sent: <hours-of-operation> <monday hourType="custom"> <open unit="AM">9:00</open> <!-- open/close or closed or 24hour --> <close unit="PM">5:00</close> </monday> <tuesday hourType="closed" /> <wednesday hourType="24hour" /> <thursday hou...

XSD Problem: How to only restrict an element/attribute to be used under another schema

I need to solve this and looks like I need help. Here is the problem definition We have an existing schema X [X is an industry standard schema] for which we are building some extensions in a new schema Y (with a different target namespace]. Now the problem is we want to restrict usage of the elements/attributes of Schema Y to be onl...

How do I extend a base schema with custom elements while remaining open to change from new versions?

Given an XSD as follows: <xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:std="http://..." targetNamespace="..."> <xs:element name="SomeRootNode" type="std:SomeRootNodeType" /> ... </xs:schema> that defines some elements which allow any child from a dif...

Parsing an XSD to list elements

I have been trying to parse one(actually - many) xsd files to write out the list of element-names, respective element-type and documentation. I looked into XSOM, SAXParser, Xerces, JAXP - all of which make it easy to read an xml and read nodes. Reading an xsd without equating to element names (to get a list of all element names) seems d...