You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Subramanian Venkatesan <vs...@bea.com> on 2004/09/08 13:41:00 UTC

WebDAV XSD error

Hi!

I am trying to compile a WebDAV XSD with XMLBeans. But I am getting an
error for the "DAV:" namespace.
Error is :
Exception in thread "main" java.lang.StringIndexOutOfBoundsException:
String ind
ex out of range: -1
        at java.lang.StringBuffer.substring(StringBuffer.java:780)
        at
org.apache.xmlbeans.impl.common.NameUtil.getPackageFromNamespace(Name
Util.java:529)
        at
org.apache.xmlbeans.impl.common.NameUtil.getClassNameFromQName(NameUt
il.java:361)
        at
org.apache.xmlbeans.impl.schema.StscJavaizer.pickFullJavaClassName(St
scJavaizer.java:741)
        at
org.apache.xmlbeans.impl.schema.StscJavaizer.assignGlobalJavaNames(St
scJavaizer.java:89)
        at
org.apache.xmlbeans.impl.schema.StscJavaizer.javaizeAllTypes(StscJava
izer.java:58)
        at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compileImpl(
SchemaTypeSystemCompiler.java:203)
        at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(Sche
maTypeSystemCompiler.java:144)
        at
org.apache.xmlbeans.impl.tool.SchemaCompiler.loadTypeSystem(SchemaCom
piler.java:732)
        at
org.apache.xmlbeans.impl.tool.SchemaCompiler.compile(SchemaCompiler.j
ava:784)
        at
org.apache.xmlbeans.impl.tool.SchemaCompiler.main(SchemaCompiler.java
:264)

Anyone knows a workaround for this?

The XSD is :
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.bea.com/webdav/xbean"
xmlns="http://www.bea.com/webdav/xbean"  elementFormDefault="qualified">
	<xs:complexType name="activelockType">
		<xs:sequence>
			<xs:element name="lockscope"
type="lockscopeType"/>
			<xs:element name="locktype"
type="locktypeType"/>
			<xs:element ref="depth"/>
			<xs:element ref="owner" minOccurs="0"/>
			<xs:element ref="timeout" minOccurs="0"/>
			<xs:element name="locktoken"
type="locktokenType" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="allprop">
		<xs:complexType/>
	</xs:element>
	<xs:element name="collection">
		<xs:complexType/>
	</xs:element>
	<xs:element name="creationdate" type="xs:string"/>
	<xs:element name="depth" type="xs:string"/>
	<xs:element name="displayname" type="xs:string"/>
	<xs:element name="dst" type="xs:string"/>
	<xs:element name="exclusive">
		<xs:complexType/>
	</xs:element>
	<xs:element name="getcontentlanguage" type="xs:string"/>
	<xs:element name="getcontentlength" type="xs:string"/>
	<xs:element name="getcontenttype" type="xs:string"/>
	<xs:element name="getetag" type="xs:string"/>
	<xs:element name="getlastmodified" type="xs:string"/>
	<xs:element name="href" type="xs:string"/>
	<xs:complexType name="keepaliveType">
		<xs:sequence>
			<xs:element ref="href" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="linkType">
		<xs:sequence>
			<xs:element ref="src" maxOccurs="unbounded"/>
			<xs:element ref="dst" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="lockdiscovery">
		<xs:complexType>
			<xs:sequence minOccurs="0"
maxOccurs="unbounded">
				<xs:element name="activelock"
type="activelockType"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:complexType name="lockentryType">
		<xs:sequence>
			<xs:element name="lockscope"
type="lockscopeType"/>
			<xs:element name="locktype"
type="locktypeType"/>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="lockinfo">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="lockscope"
type="lockscopeType"/>
				<xs:element name="locktype"
type="locktypeType"/>
				<xs:element ref="owner" minOccurs="0"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:complexType name="lockscopeType">
		<xs:choice>
			<xs:element ref="exclusive"/>
			<xs:element ref="shared"/>
		</xs:choice>
	</xs:complexType>
	<xs:complexType name="locktokenType">
		<xs:sequence>
			<xs:element ref="href" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="locktypeType">
		<xs:sequence>
			<xs:element ref="write"/>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="multistatus">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="response"
type="responseType" maxOccurs="unbounded"/>
				<xs:element ref="responsedescription"
minOccurs="0"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="omit">
		<xs:complexType/>
	</xs:element>
	<xs:element name="owner">
		<xs:complexType mixed="true"/>
	</xs:element>
	<xs:element name="prop">
		<xs:complexType mixed="true"/>
	</xs:element>
	<xs:element name="propertybehavior">
		<xs:complexType>
			<xs:choice>
				<xs:element ref="omit"/>
				<xs:element name="keepalive"
type="keepaliveType"/>
			</xs:choice>
		</xs:complexType>
	</xs:element>
	<xs:element name="propertyupdate">
		<xs:complexType>
			<xs:choice maxOccurs="unbounded">
				<xs:element name="remove"
type="removeType"/>
				<xs:element name="set" type="setType"/>
			</xs:choice>
		</xs:complexType>
	</xs:element>
	<xs:element name="propfind">
		<xs:complexType>
			<xs:choice>
				<xs:element ref="allprop"/>
				<xs:element ref="propname"/>
				<xs:element ref="prop"/>
			</xs:choice>
		</xs:complexType>
	</xs:element>
	<xs:element name="propname">
		<xs:complexType/>
	</xs:element>
	<xs:complexType name="propstatType">
		<xs:sequence>
			<xs:element ref="prop"/>
			<xs:element ref="status"/>
			<xs:element ref="responsedescription"
minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="removeType">
		<xs:sequence>
			<xs:element ref="prop"/>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="resourcetype">
		<xs:complexType mixed="true"/>
	</xs:element>
	<xs:complexType name="responseType">
		<xs:sequence>
			<xs:element ref="href"/>
			<xs:choice>
				<xs:sequence>
					<xs:element ref="href"
minOccurs="0" maxOccurs="unbounded"/>
					<xs:element ref="status"/>
				</xs:sequence>
				<xs:choice>
					<xs:element name="propstat"
type="propstatType" maxOccurs="unbounded"/>
				</xs:choice>
			</xs:choice>
			<xs:element ref="responsedescription"
minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="responsedescription" type="xs:string"/>
	<xs:complexType name="setType">
		<xs:sequence>
			<xs:element ref="prop"/>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="shared">
		<xs:complexType/>
	</xs:element>
	<xs:element name="source">
		<xs:complexType>
			<xs:sequence minOccurs="0"
maxOccurs="unbounded">
				<xs:element name="link"
type="linkType"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="src" type="xs:string"/>
	<xs:element name="status" type="xs:string"/>
	<xs:element name="supportedlock">
		<xs:complexType>
			<xs:sequence minOccurs="0"
maxOccurs="unbounded">
				<xs:element name="lockentry"
type="lockentryType"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="timeout" type="xs:string"/>
	<xs:element name="write">
		<xs:complexType/>
	</xs:element>
</xs:schema>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org