You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jaxme-dev@ws.apache.org by ja...@ws.apache.org on 2004/07/26 09:30:17 UTC

[jira] Closed: (JAXME-18) xjc Ant task fails to determine default package name and throws LocSAXException

Message:

   The following issue has been closed.

   Resolver: Jochen Wiedmann
       Date: Mon, 26 Jul 2004 12:29 AM

An attributes type was implicitly always generated as a local
type, possibly referencing a global type.

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/JAXME-18

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: JAXME-18
    Summary: xjc Ant task fails to determine default package name and throws LocSAXException
       Type: Bug

     Status: Closed
   Priority: Minor
 Resolution: FIXED

    Project: JaxMe

   Assignee: Jochen Wiedmann
   Reporter: John Conlon

    Created: Thu, 22 Jul 2004 8:50 AM
    Updated: Mon, 26 Jul 2004 12:29 AM
Environment: Linux Red Hat 9.0; Sun JDK 1.4.2-b28 JaxMe 0.3 release candidate

Description:
Using JaxMe xjc Ant task -

<xjc schema="${src.test}/xml/Config.xsd" 
     target="${build.java_gen_src}"/>

fails to detect default package name from an XSD and throws a LocSAXException.

Ant Message:
BUILD FAILED
/home/projects/java/jaxb/build.xml:101:
org.apache.ws.jaxme.xs.parser.impl.LocSAXException: At
file:/home/projects/java/jaxb/src/test/xml/Config.xsd, line 43, column
44: Unable to derive package name from an empty namespace URI. Use the
schemaBindings to specify a package name.

Example XSD:
<?xml version = "1.0" encoding = "UTF-8"?>
<schema xmlns = "http://www.w3.org/2001/XMLSchema"
         targetNamespace = "http://www.verticon.com/jaxb/schema"
         xmlns:s = "http://www.verticon.com/jaxb/schema"
         elementFormDefault = "qualified"
         attributeFormDefault = "unqualified">

        <element name = "TestConfiguration"
                 type = "s:TestConfigurationType"/>

        <complexType name = "TestConfigurationType">
                <choice>
                        <element name = "ChildOne" type =
"s:ChildOneType"/>
                        <element name = "ChildTwo" type =
"s:ChildTwoType"/>
                </choice>
        </complexType>

        <complexType name = "ChildTwoType">
                        <choice>
                                <element name = "Resource"  type = "s:ResourceType"/>
                                <element name = "Commands"  type = "string"/>
                        </choice>
               <attribute name = "name" use = "required" type =
"string"/>
               <attribute name = "type" use = "required" type =
"s:ChildTwoTypeType"/>
        </complexType>

         <complexType name = "ChildOneType">
                <attribute name = "location" use = "required" type = "anyURI"/>
                <attribute name = "name" use = "required" type =
"string"/>
        </complexType>

        <complexType name = "ResourceType">
                <attribute name = "location" use = "required" type = "anyURI"/>
        </complexType>


       <simpleType name='ChildTwoTypeType'>
          <annotation>
              <documentation>supported child two types</documentation>
          </annotation>
          <restriction base='string'>
            <enumeration value='groovy'>
              <annotation>
                  <documentation>Groovy scripting
language.</documentation>
              </annotation>
            </enumeration>
            <enumeration value='jython'>
              <annotation>
                  <documentation>Jython scripting
language.</documentation>
              </annotation>
            </enumeration>
          </restriction>
      </simpleType>

</schema>
Note 1. The Sun RI xjc Ant task will accept and build the generated source.
Note 2. This can be worked around by using a
package attribute in the xjc Ant task. 


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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