You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by "veljko (JIRA)" <ji...@apache.org> on 2008/01/22 15:40:34 UTC

[jira] Commented: (WSCOMMONS-273) Cannot parse complexType with final="extension restriction"

    [ https://issues.apache.org/jira/browse/WSCOMMONS-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12561361#action_12561361 ] 

veljko commented on WSCOMMONS-273:
----------------------------------

Is there a binary distribution for this, and if not, when can we expect one?

Is the latest version on source control system stable so we can at least build on our own and patch, since this is a major blocking issue for Cxf?

Thanks in advance

> Cannot parse complexType with final="extension restriction"
> -----------------------------------------------------------
>
>                 Key: WSCOMMONS-273
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-273
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: XmlSchema
>         Environment: jdk1.5.0_11 on Windows XP
>            Reporter: Pierre Buyle
>            Assignee: Ajith Harshana Ranabahu
>
> When I try to read to following schema
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
>   <xs:complexType name="foo" final="extension restriction">
>     <xs:sequence>
>       <xs:element name="bar" type="xs:int"/>
>     </xs:sequence>
>   </xs:complexType>
> </xs:schema>
> Using this simple code
> import java.io.FileInputStream;
> import java.io.FileNotFoundException;
> import java.io.InputStream;
> import javax.xml.transform.stream.StreamSource;
> import org.apache.ws.commons.schema.XmlSchema;
> import org.apache.ws.commons.schema.XmlSchemaCollection;
> public class TestXmlSchema
> {
> 	public static void main(String[] argh)
> 	{
> 		InputStream is;
> 		try
> 		{
> 			is = new FileInputStream("schema1.xsd");
> 			XmlSchemaCollection schemaCol = new XmlSchemaCollection();
> 			XmlSchema schema = schemaCol.read(new StreamSource(is), null);
> 		}
> 		catch (FileNotFoundException e)
> 		{
> 			e.printStackTrace();
> 		}
> 		
> 	}
> }
> I get the following exception
> Exception in thread "main" org.apache.ws.commons.schema.constants.Enum$EnumValueException: Bad Enumeration value 'extension restriction'
> 	at org.apache.ws.commons.schema.constants.Enum.setValue(Enum.java:49)
> 	at org.apache.ws.commons.schema.constants.Enum.<init>(Enum.java:27)
> 	at org.apache.ws.commons.schema.XmlSchemaDerivationMethod.<init>(XmlSchemaDerivationMethod.java:46)
> 	at org.apache.ws.commons.schema.SchemaBuilder.handleComplexType(SchemaBuilder.java:657)
> 	at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:157)
> 	at org.apache.ws.commons.schema.SchemaBuilder.build(SchemaBuilder.java:82)
> 	at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:359)
> 	at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:304)
> 	at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:315)
> 	at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:333)
> 	at TestXmlSchema.main(TestXmlSchema.java:20)
> According to the W3C's XML Schema Validator (http://www.w3.org/2001/03/webdata/xsv), the used schema is valid.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org