Just today I lookup again to previous problem:

I guess it is turned on by default.

After reading http://jira.codehaus.org/browse/XFIRE-295 ,
found the extensibleElements, and extensibleAttributes flag.

Hmm...couldn't found it from any documentation, or maybe I missed something.

Example to solve the problem:

import org.codehaus.xfire.aegis.type.java5.XmlElement;
import org.codehaus.xfire.aegis.type.java5.XmlType;

@XmlType(name="A", extensibleElements=false, extensibleAttributes=false)
public class A {

   public int var1;

   @XmlElement(name="Var1")
   public int getVar1() {
       return var1;
   }

   public void setVar1(int var1) {
       this.var1 = var1;
   }


}


This will generate:

  <xsd:complexType name="*A*">
- <#>   <xsd:sequence>
     <xsd:element minOccurs="*0*" name="*Var1*" nillable="*true*" type="*
xsd:int*" />
 </xsd:sequence>
</xsd:complexType>

Reply via email to