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 jo...@apache.org on 2004/07/26 09:24:04 UTC

cvs commit: ws-jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl JAXBAttributeSG.java

jochen      2004/07/26 00:24:04

  Modified:    src/test/jaxb build.xml
               .        status.xml
               src/jaxme/org/apache/ws/jaxme/generator/sg/impl
                        JAXBAttributeSG.java
  Added:       src/test/jaxb/jira jaxme-17.xsd
  Log:
  An attributes type was implicitly always generated as a local type, possibly referencing a global type.
  PR: JAXME-18
  
  Revision  Changes    Path
  1.10      +3 -1      ws-jaxme/src/test/jaxb/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/ws-jaxme/src/test/jaxb/build.xml,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- build.xml	23 Jul 2004 07:17:57 -0000	1.9
  +++ build.xml	26 Jul 2004 07:24:04 -0000	1.10
  @@ -100,7 +100,9 @@
   
     <target name="generate" depends="taskdef">
       <xjc target="${srcdir}">
  -      <schema dir="${basedir}" includes="*.xsd">
  +      <schema dir="${basedir}">
  +        <include name="*.xsd"/>
  +        <include name="jira/*.xsd"/> 
           <exclude name="enumeration.xsd"/>
           <exclude name="wildcards.xsd"/>
           <exclude name="rss.xsd"/>
  
  
  
  1.18      +4 -0      ws-jaxme/status.xml
  
  Index: status.xml
  ===================================================================
  RCS file: /home/cvs/ws-jaxme/status.xml,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- status.xml	23 Jul 2004 07:18:00 -0000	1.17
  +++ status.xml	26 Jul 2004 07:24:04 -0000	1.18
  @@ -42,6 +42,10 @@
           XML Schema namespace (http://www.w3.org/2001/XMLSchema-instance).
           See JAXME-17 in Jira.
         </action>
  +      <action dev="JW" type="fix" context="generator">
  +        An attributes type was implicitly always generated as a local
  +        type, possibly referencing a global type. See JAXME-18 in Jira.
  +      </action>
       </release>
       <release version="0.3" date="2004-Jul-19">
         <action dev="CL" type="enhancement" context="generator">
  
  
  
  1.2       +51 -0     ws-jaxme/src/test/jaxb/jira/jaxme-17.xsd
  
  
  
  
  1.4       +10 -1     ws-jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/JAXBAttributeSG.java
  
  Index: JAXBAttributeSG.java
  ===================================================================
  RCS file: /home/cvs/ws-jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/JAXBAttributeSG.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JAXBAttributeSG.java	16 Feb 2004 23:39:55 -0000	1.3
  +++ JAXBAttributeSG.java	26 Jul 2004 07:24:04 -0000	1.4
  @@ -28,6 +28,7 @@
   import org.apache.ws.jaxme.js.DirectAccessible;
   import org.apache.ws.jaxme.js.JavaMethod;
   import org.apache.ws.jaxme.xs.XSAttribute;
  +import org.apache.ws.jaxme.xs.XSType;
   import org.apache.ws.jaxme.xs.XSWildcard;
   import org.apache.ws.jaxme.xs.xml.XsNamespaceList;
   import org.apache.ws.jaxme.xs.xml.XsQName;
  @@ -57,7 +58,15 @@
   		xsWildcard = null;
   		isRequired = !pAttribute.isOptional();
   		name = pAttribute.getName();
  -		typeSG = getFactory().getTypeSG(pAttribute.getType(), pClassContext, name);
  +        XSType type = pAttribute.getType();
  +        if (type.isGlobal()) {
  +        	typeSG = getFactory().getTypeSG(type);
  +            if (typeSG == null) {
  +            	throw new IllegalStateException("Unknown global type: " + type.getName());
  +            }
  +        } else {
  +        	typeSG = getFactory().getTypeSG(pAttribute.getType(), pClassContext, name);
  +        }
   		isWildcard = false;
   		namespaceList = null;
   		processContents = null;
  
  
  

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